Mike_D
(Mike D)
May 30, 2018, 2:27pm
1
I’m remote debugging a 32 bit console app using Xojo 2018 R1.1 on macOS to Windows 10, and it seems like on occasion the console app just locks up (stops showing any more StdOut messages, and hitting Pause or Stop in the IDE on macOS does nothing.
I think this is happening when an error is is thrown inside a thread - perhaps something to do with calling a Handler on a nil’d object ?
Anyone else seen something like this?
Mike_D
(Mike D)
May 30, 2018, 2:44pm
2
Update - ok, it looks like a rather serious bug that was easy to demonstrate:
An Unhandled exception inside a Thread in a Console app is ignored in Win32 builds
Steps: Remote debug attached app from macOS to Windows 10.
When the nilObjectException is reached, resume the app.
On Mac it works as expected - the nilObjectException is propagated up to app.UnhandledException.
On Windows the error is not caught.
Regression Testing:
This does not seem related to the Remote debugger - I see the same thing when building a compiled app.
x86 vs x64 builds both have the same issue.
<https://xojo.com/issue/52346 >
Mike_D
(Mike D)
May 30, 2018, 2:49pm
3
More regression testing:
RealStudio 2011r3: works as expected
Xojo 2014R2.1 : broken
Xojo 2018R1.1 : broken
Mike_D
(Mike D)
May 30, 2018, 2:54pm
4
Here’s an example of the output.
Mac
Console App 1.0.0.0 running x64
App.Run
App.ThreadRun will cause a NilObjectException on loop 8
Thread Loop 1
Thread Loop 2
Thread Loop 3
Thread Loop 4
Thread Loop 5
Thread Loop 6
Event Loop Thread.State = 3
Thread Loop 7
Thread Loop 8
App.UnhandledException 0 RuntimeRaiseException
RaiseNilObjectException
App.ThreadRun%%o<App>o<Thread>
Delegate.IM_Invoke%%o<Thread>
rbframework.dylib$6559
rbframework.dylib$6299
_pthread_body
_pthread_body
Exception Message:
Exception Error Number: 0
An exception of class NilObjectException was not handled. The application must shut down.
Windows
Console App 1.0.0.0 running x32
App.Run
App.ThreadRun will cause a NilObjectException on loop 8
Thread Loop 1
Thread Loop 2
Thread Loop 3
Thread Loop 4
Thread Loop 5
Thread Loop 6
Event Loop Thread.State = 3
Thread Loop 7
Thread Loop 8
Event Loop Thread.State = 4
Event Loop Thread.State = 4
Event Loop Thread.State = 4
Event Loop Thread.State = 4
...