Worker are orphaned if the App is force closed or crashes

I’ve created a test case on Windows 64bit - as a Worker, compiled to an EXE. The App is copying thousands of files - 50 megs to 4 gigs. I find that once the Disk I/O becomes saturated (queued I/O), if the App is force closed or crashes, the 4 Workers will become orphaned and never close, even though their parent App is gone. The 4 Workers will bring the 8 core system to near 100% CPU load and it will not stop unless the Task Manager is used to Force Quit the 4 Workers.

I submitted a Bug Report with a Link to a Video and Test Files. XoJo Support says they can not reproduce this issue and closed the Bug Report.

I’m hoping other members of the Forum will download my Test Apps and Video and attempt to reproduce this for themselves so that I can have XoJo reopen this Bug Report.

https://colorburstrip.com/XoJo/Workers_Fail_to_Close.zip
The Link includes a sample PNG (42 megs) and a simple App to create 50 copies in a folder. The second App is the XoJo PictureResizer Worker Sample with some minor changes. I’ve keep the Output at 100% size to produce more Disk I/O. I set a marker below the Progress Bar where it suggest that the Force Quit (Red X at the Top right) is to be clicked to force Quit the App.

If more disk I/O is needed, change the File Copy App to make 100 copies (source included).

When testing, be sure to compile to a Windows 64 bit EXE. This will not fail as a Debug Run since the Workers are run as Threads in Debug-Run mode.

Thanks for your help.

Expected behavior. They are separate processes, so they will not close down unless you code it.

I’m not sure about that, from Use Multiple CPU Cores with Worker – Xojo Blog

“Workers automatically stop when they have no more jobs to do or if they lose communication with your app.”

It would seem that this isn’t happening here.

I can’t really help any further Larry as I don’t have a valid licence to build Worker app, sorry.

2 Likes

It is really a shame, make you wonder what kind of QA they have. Anyway, I tested your app and have the same behavior.

image

If the main app is closed, the workers keep running indefinitelly using 100% of a core each.

I dont have a licence beyond 2019 to test the code (new features look to buggy)

Thank you for taking a look at this issue. The Link that I’ve provided - https://colorburstrip.com/XoJo/Workers_Fail_to_Close.zip
Includes finished EXE Apps ready to run on Windows. Therefore, there’s no need to have a current XoJo license. I’ve included the Source Files for anyone to see how I’m testing this condition.

What example do I need to run? I’d like to test on macOS.

Edit: I used the example PictureResizer-Full Size. Yes, bug is reproducible with Xojo 2020r2.1, BS on M1.

You may make a Feedback case.
Workers should be coded by Xojo Inc. to kill themselves if connection to parent app is lost, e.g. IPC socket closed.

Like this?

Thanks to everyone for all your help - XoJo has reopened my Case as Reproduced.

5 Likes