It seems Windows is particularly denying access (temporarily, as written everywhere in this post) to my built .exe and another executable named “cefsubproc.exe” which Xojo includes in my built app folder. I think this executable is an helper for rendering HTML documents with the “HTMLViewer” control, right? I have one in my app and I selected WebKit instead of the native HTML viewer, since I’m under Windows 7 and (lol) I couldn’t do anything useful under INTERNET EXPLORER 6, of course.
The thing is I can run the built .exe 100% of the time, but once I quit it, there is then an introduced delay of 1 to 10 minutes before I can move, rename or delete the .exe as well as “cefsubproc.exe”. It’s like if Windows allows me to run my built app, but it is immobilized until it decides it’s fine to delete those two files. They are NOT running in the task manager at all when they are denied access to move, rename and delete.
One possible way to debug this would be:
- Start your compiled EXE
- Make sure it runs fine
- Start Task Manager, find you exe and note every process that runs with, a screenshot is best
- Quit you program
- Go back in Task Manager and check is your app EXE as well as other processes are still running.
Did you check the Windows Logs for possible entries that would shed some light ?
This is a common misconception; the IE11 renderer is quite good (even in Windows 7) - you just need to ask for it using some registry keys. Go to HTMLViewer - Xojo Documentation and scroll down to Windows IE Version
Weren’t there some known bugs with these cefsubproc processes not quitting properly?
Edit: <https://xojo.com/issue/55867> which is listed as fixed in 2019r3 - but maybe you found another way to trigger it?
Looks like you are spot on ! But the OP seems to be running 2021r3.1 . . . is it a case of regression ? Or could it be that the fix would not work on Windows 7 ?
OK, but as I wrote above twice, when Windows denies access to those 2 .exe files for a while, they are not running in the task manager at all. Quitting my app makes them immediately disappear from the task manager process list… but they are still locked for a couple minutes, preventing me from building again in Xojo (unless of course I swap to non-build folder and vice versa, which is a trick I’m doing right now to save time when this happens, instead of doing nothing and staring at my screen for 1-10 minutes)
Mike D: Weren’t there some known bugs with these cefsubproc processes not quitting properly?
Very interesting… I also noticed that cefsubproc.exe runs at 5% all the time and my fans are spinning faster than normal. 5% may not sound like much, but I’m running this on an 8-core 4ghz CPU! O.o
And on windows, that 5% means 5% of your total 8x100 = 800% cores, meaning 40% of a single core (on macOS the % is given as a % of a single core).
Try my IE11 hint above, it may solve both of your issues?
IE11 does not support CSS3, which I use in my app for fancy font effects. Also, almost nobody uses W7 anymore, so I think I can ignore my own OS native browser, at least regarding my app. I use WebKit because it’s much, much closer to what Edge has to offer under W10, which almost everybody uses today.
Remember that the issue is not the high CPU usage of cefsubproc.exe it’s that seemingly because of it, Windows locks my built .exe and cefsubproc.exe for 1-10 minutes after I exit my built app. The most annoying thing is that this prevents me from building again in Xojo, among other things.
Open a command window (cmd.exe) and then
c:\Program Files\Xojo\Xojo 2021r3.1\Xojo.exe
But this got me thinking. If your app was created in 2005, I bet it’s 32-bit… but the IDE only installs the 64-bit vc-redist libs…
To test this, go to the Windows build settings and change it to build as 64 bit. Let’s see if that works. If you want to keep your app as 32-bit. Open Extras/Windows Runtime and then the folder that has the two exe files vc_redist apps and run the 32-bit version.