B4J Question B4J slow

claudiob4

Member
Licensed User
Longtime User
Hi all, I have a problem with B4J which has become very slow to start and load programs. Times exceed 40 seconds. The feeling is that it looks for a connection that does not respond and waits for the timeout to start. I have already uninstalled and reinstalled B4J and Java Sdk but nothing to do. When I compile debugging, it frequently gives me the message B4J does not answer, and then it finally starts. My version is 6.30. If I disable the wifi the waiting times are reduced to 10 seconds.
Some idea?
 

claudiob4

Member
Licensed User
Longtime User
I installed procmon. B4J does not call anything on the Internet or on external drives. I've been using B4J for years, but I have this problem only in this last month.
 
Upvote 0

claudiob4

Member
Licensed User
Longtime User
I installed procmon. B4J does not call anything on the Internet or on external drives.
I've been using B4J for years, but I have this problem only in this last month.
 
Upvote 0

Diceman

Active Member
Licensed User
I installed procmon. B4J does not call anything on the Internet or on external drives. I've been using B4J for years, but I have this problem only in this last month.

ProcMon
Ok, run ProcMon (not ProcExp) and set up a filter "Process Name" "is" "b4j.exe" and select "Add" button. See Filter.png.
Now run B4J.exe and you should see a window like "ProcessMonitor.Png". This window shows all of the file and registry activity that b4j.exe is accessing.

When B4J pauses, scroll down to the bottom of the ProcMon grid to see what is the last file it tried to open. This may be the file it is having a problem with. Make sure it is referencing valid active drives and not a NAS drive that is turned off.

Other suggestions.
1) Reboot your computer and delete all of your temporary files from the window temp directory. This often gets cluttered and files may be damaged in this directory.
2) Do a ChkDsk c: /r This may take overnight to complete. Do it for each of your drives. You may want to put it in a batch file. Remember to open the batch file with administrator rights.
3) Run CCleaner from https://www.ccleaner.com and see if there is a problem with your registry. Just analyze the registry without fixing it. If you do fix problems with the registry, make sure you have a full backup of your drive and you have backed up your registry and copied it to a thumb drive.

I'm sure once you've discovered what's causing the delay, you'll have a good laugh.
 

Attachments

  • Filter.png
    Filter.png
    33.2 KB · Views: 219
  • PricessMonitor.png
    PricessMonitor.png
    85.2 KB · Views: 207
Upvote 0

claudiob4

Member
Licensed User
Longtime User
When I launch B4J:
if I'm not connected to the Internet it starts quickly.
If I'm connected it takes almost a minute.

Try 1
In ProcMon I set the filter for B4J.EXE.
I'm connected to the internet.
Launch B4J and then close it.
This operation produces about 14,000 events: Logfile1.csv

Try 2
In ProcMon I set the filter for B4J.EXE.
I'm connected to the internet.
Launch B4J.
I open a simple project: ... \ Test2 \ Test.b4j
I close B4J.
This operation produces about 57,000 events: Logfile2_1.csv + Logfile2_2.csv + Logfile2_3.csv

I can not determine anything significant. I am attaching the file if you want to have a look.
 

Attachments

  • Logfile1.zip
    242.2 KB · Views: 252
  • Logfile2_1.zip
    319.6 KB · Views: 239
  • Logfile2_2.zip
    273.4 KB · Views: 244
  • Logfile2_3.zip
    236.4 KB · Views: 238
Upvote 0

Diceman

Active Member
Licensed User
claudiob4,
The only significant delay I've seen is around a 30 second delay in logfile2_3. Logfile1 also has a delay similar to logfile2_3.
I could be wrong, but it looks to me like you are compiling test.b4j in both log files.

The times are in the first column and you will see there is approx a 31 second delay from first line to last line.

logfile2_2:
B4X:
"11.46.27,0441656","B4J.exe","1720","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST2\Files","SUCCESS",""
"11.46.27,0652452","B4J.exe","1720","ReadFile","C:\Program Files (x86)\Anywhere Software\B4J\Logic.dll","SUCCESS","Offset: 16.896, Length: 16.384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal"
"11.46.27,0656004","B4J.exe","1720","ReadFile","C:\Program Files (x86)\Anywhere Software\B4J\Logic.dll","SUCCESS","Offset: 115.200, Length: 16.384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal"
"11.46.27,1898640","B4J.exe","1720","ReadFile","C:\Windows\Microsoft.NET\Framework\v4.0.30319\NativeImages\mscorlib.ni.dll","SUCCESS","Offset: 11.672.064, Length: 32.768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal"
"11.46.27,2733357","B4J.exe","1720","ReadFile","C:\Windows\Microsoft.NET\Framework\v4.0.30319\NativeImages\mscorlib.ni.dll","SUCCESS","Offset: 16.067.072, Length: 32.768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal"
"11.46.27,2753159","B4J.exe","1720","ReadFile","C:\Windows\Microsoft.NET\Framework\v4.0.30319\NativeImages\mscorlib.ni.dll","SUCCESS","Offset: 517.120, Length: 16.384, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal"
"11.46.28,1675015","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 9188, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.28,6205402","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 3208"
"11.46.30,6223950","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 3208, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.30,6372499","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 11084"
"11.46.32,6526608","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 11084, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.32,6679525","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 5728"
"11.46.34,6684617","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 5728, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.34,6809503","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 11236"
"11.46.37,1817594","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 11236, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.37,2453101","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 9308"
"11.46.39,2638148","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 9308, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.39,3742253","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 3536"
"11.46.41,3763886","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 3536, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.41,5006493","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 5380"
"11.46.43,5140069","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 5380, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.43,6524515","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 10928"
"11.46.45,6542710","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 10928, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.45,7933707","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 7920"
"11.46.47,8103393","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 7920, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.47,9337790","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 8324"
"11.46.49,9371602","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 8324, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.50,0768769","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 6448"
"11.46.52,0826699","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 6448, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.52,2305122","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 8716"
"11.46.54,2472191","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 8716, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.54,3710545","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 11188"
"11.46.56,3729783","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 11188, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.46.56,5129515","B4J.exe","1720","Thread Create","","SUCCESS","Thread ID: 11160"
"11.46.57,7961378","B4J.exe","1720","CreateFile","\\192.168.1.177\cgct\TEST\Test.b4j","BAD NETWORK PATH","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a"
"11.46.57,7983079","B4J.exe","1720","CreateFile","\\192.168.1.177\cgct\TEST\","BAD NETWORK PATH","Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a"
"11.46.57,8000595","B4J.exe","1720","CreateFile","C:\velenov\B4X\B4J\OSCILLATORE\SendMail\SendMail.b4j","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"11.46.57,8003184","B4J.exe","1720","QueryNetworkOpenInformationFile","C:\velenov\B4X\B4J\OSCILLATORE\SendMail\SendMail.b4j","SUCCESS","CreationTime: 21/06/2018 15.17.47, LastAccessTime: 21/06/2018 15.17.47, LastWriteTime: 01/07/2018 17.53.34, ChangeTime: 30/07/2018 15.27.54, AllocationSize: 01/01/1601 02.00.00, EndOfFile: 01/01/1601 02.00.00, FileAttributes: A"
"11.46.57,8003897","B4J.exe","1720","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\SendMail\SendMail.b4j","SUCCESS",""
"11.46.57,8027217","B4J.exe","1720","CreateFile","C:\velenov\B4X\B4J\SERVER\JACK\SendMail\SendMail.b4j","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"11.46.57,8029224","B4J.exe","1720","QueryNetworkOpenInformationFile","C:\velenov\B4X\B4J\SERVER\JACK\SendMail\SendMail.b4j","SUCCESS","CreationTime: 12/07/2016 15.06.38, LastAccessTime: 12/07/2016 15.06.38, LastWriteTime: 19/06/2018 18.21.33, ChangeTime: 30/07/2018 15.27.57, AllocationSize: 01/01/1601 02.00.00, EndOfFile: 01/01/1601 02.00.00, FileAttributes: A"
"11.46.57,8029834","B4J.exe","1720","CloseFile","C:\velenov\B4X\B4J\SERVER\JACK\SendMail\SendMail.b4j","SUCCESS",""
"11.46.57,8061365","B4J.exe","1720","Thread Exit","","SUCCESS","Thread ID: 6908, User Time: 0.3125000, Kernel Time: 0.0156250"
"11.46.58,0297941","B4J.exe","1720","CreateFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST2\test.b4j","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"11.46.58,0299817","B4J.exe","1720","QueryNetworkOpenInformationFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST2\test.b4j","SUCCESS","CreationTime: 23/07/2018 10.27.11, LastAccessTime: 23/07/2018 10.27.11, LastWriteTime: 23/07/2018 10.27.11, ChangeTime: 30/07/2018 15.27.54, AllocationSize: 01/01/1601 02.00.00, EndOfFile: 01/01/1601 02.00.00, FileAttributes: A"
"11.46.58,0300701","B4J.exe","1720","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST2\test.b4j","SUCCESS",""


I don't know why logfile1 is opening test.b4j because you told me it was just suppose to be starting b4j and then exiting b4j which should have taken 5 seconds at most. You may want to re-run procmon.exe for test#1 and capture another log file and see for yourself when you run Bj4 and exit without compiling. Display the results in a text editor and scan for long delays.

Again there is a 30 second delay.

logfile1:
B4X:
"11.17.54,7430717","B4J.exe","6132","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST2\test.b4j","SUCCESS",""
"11.17.54,7442417","B4J.exe","6132","CreateFile","C:\velenov\B4X\B4J\OSCILLATORE\DOWNLSTORICO\DownlStor.b4j","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"11.17.54,7444401","B4J.exe","6132","QueryNetworkOpenInformationFile","C:\velenov\B4X\B4J\OSCILLATORE\DOWNLSTORICO\DownlStor.b4j","SUCCESS","CreationTime: 07/07/2018 19.21.16, LastAccessTime: 24/07/2018 17.27.08, LastWriteTime: 24/07/2018 17.27.08, ChangeTime: 30/07/2018 15.27.54, AllocationSize: 01/01/1601 02.00.00, EndOfFile: 01/01/1601 02.00.00, FileAttributes: A"
"11.17.54,7445142","B4J.exe","6132","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\DOWNLSTORICO\DownlStor.b4j","SUCCESS",""
"11.17.54,7456466","B4J.exe","6132","CreateFile","C:\velenov\B4X\B4J\OSCILLATORE\PRICEMANAGER\TriploRockThink.b4j","NAME NOT FOUND","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a"
"11.17.54,7463508","B4J.exe","6132","CreateFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST\Test.b4j","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"11.17.54,7465868","B4J.exe","6132","QueryNetworkOpenInformationFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST\Test.b4j","SUCCESS","CreationTime: 04/06/2018 10.34.51, LastAccessTime: 04/06/2018 10.34.52, LastWriteTime: 04/07/2018 17.05.27, ChangeTime: 30/07/2018 15.27.54, AllocationSize: 01/01/1601 02.00.00, EndOfFile: 01/01/1601 02.00.00, FileAttributes: A"
"11.17.54,7466598","B4J.exe","6132","CloseFile","C:\velenov\B4X\B4J\OSCILLATORE\TEST\Test.b4j","SUCCESS",""
"11.17.55,5930074","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7012"
"11.17.55,5931288","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 1432"
"11.17.55,5956302","B4J.exe","6132","RegOpenKey","HKLM\SYSTEM\CurrentControlSet\Control\Session Manager","REPARSE","Desired Access: Query Value, Enumerate Sub Keys"
"11.17.55,5956821","B4J.exe","6132","RegOpenKey","HKLM\System\CurrentControlSet\Control\Session Manager","SUCCESS","Desired Access: Query Value, Enumerate Sub Keys"
"11.17.55,5957334","B4J.exe","6132","RegSetInfoKey","HKLM\System\CurrentControlSet\Control\SESSION MANAGER","SUCCESS","KeySetInformationClass: KeySetHandleTagsInformation, Length: 0"
"11.17.55,5957682","B4J.exe","6132","RegQueryValue","HKLM\System\CurrentControlSet\Control\SESSION MANAGER\ResourcePolicies","NAME NOT FOUND","Length: 24"
"11.17.55,5958064","B4J.exe","6132","RegCloseKey","HKLM\System\CurrentControlSet\Control\SESSION MANAGER","SUCCESS",""
"11.17.58,6031703","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7012, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.17.58,7904897","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7648"
"11.18.00,7978621","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7648, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.00,9383445","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 9560"
"11.18.02,9442961","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 9560, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.03,0843611","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 10640"
"11.18.05,0997475","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 10640, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.05,2245066","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 6736"
"11.18.07,2357334","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 6736, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.07,3604697","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7632"
"11.18.09,3716464","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7632, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.09,4964682","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 1772"
"11.18.11,5078131","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 1772, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.11,6327439","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 3012"
"11.18.13,6401739","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 3012, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.13,7182226","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 6816"
"11.18.15,7197176","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 6816, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.15,7350829","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7760"
"11.18.18,7364211","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7760, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.19,0995508","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7992"
"11.18.21,1087814","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7992, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.21,2335656","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 10832"
"11.18.23,2362078","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 10832, User Time: 0.0000000, Kernel Time: 0.0000000"
"11.18.23,3766697","B4J.exe","6132","Thread Create","","SUCCESS","Thread ID: 7960"
"11.18.25,3804455","B4J.exe","6132","Thread Exit","","SUCCESS","Thread ID: 7960, User Time: 0.0000000, Kernel Time: 0.0000000"

When you get a delay loading B4J, is there a lot of disk activity or cpu activity? Process Explorer (not Procmon) will show you a graph of your system resources using View > System Information.

If there is a lot of disk activity make sure your page file is healthy.

You can open a DOS window using Admin access and run:
sfc /scannow
to do a system file check to make sure your system files are not damaged.

I would do as Erel suggests and reinstall .net framework.

MS also has a Microsoft .NET Framework Repair Tool at https://www.microsoft.com/en-us/download/details.aspx?id=30135 and info is at https://support.microsoft.com/en-us/help/2698555/microsoft-net-framework-repair-tool-is-available

Of course this goes without saying, but make sure you have a complete backup of everything before you start mucking about.
 

Attachments

  • ProcMon_SystemInfo.png
    ProcMon_SystemInfo.png
    47 KB · Views: 192
Upvote 0

claudiob4

Member
Licensed User
Longtime User
Diceman, in try 1 I launch B4J.EXE and then I close it immediately. This takes from 11.17.30 to 11.19.07, 1 minute and 37 seconds.
In try 2 launch B4J.EXE, I open the file test.b4j and then close it immediately. In this case it takes from 11.44.55 to 11.47.08, 2 minutes and 13 seconds.
Never launch the compilation.
These operations are normally performed in a few seconds.

Now I will try to run sfc/scannow and reinstall .Net Framework.
Meanwhile, thank you for your time.
 
Upvote 0
Top