Xojo 2020R2 app crashes with display window problem in Catalina

One of my users is running Catalina and can no longer run my app. It crashes before anything is displayed on the screen.
It worked fine before when compiles with Xojo 2018R2 but my latest version compiled with 2020R2 with a new M1 Mac with the same code crashes. The error description refers to display windows.

From error report -
ermination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [1806]
Application Specific Information:

Crashing on exception: The window has been marked as needing another Display Window pass, but it has already had more Display Window passes than there are views in the window.

Take this text and Google it.

Can you post the information from the crashing thread? How does your code look like to open the window? Have you tried to build on an Intel Mac?

I will get the user to send the full crash report.
I only have one Mac now (M1 Mac Mini) so can’t build on Intel.

Releasing a version you cannot test yourself is not advised. It’s way too early for devs to only have an ARM device.

I know a ‘Illegal instruction: 4’ error is typically a GCC problem with compiling on a newer system that triggers on older systems.

1 Like

I understand this but I have a two device licence, one used for Windows and one used for Mac compiling.
It is impractical to repeatedly transfer the Xojo licence between the Mac Intel and Mac M1 devices every time I want to test a compile from each architecture.
Besides, I could test it for weeks and not replicate this error. I know because hundreds of users have been running the same M1 compiled program on Intel Macs for a month and only one person has reported this error.

You could remote-debug to the intel Mac however.

Or debug on another Mac. The two licences are for building only; you can still debug on 10 computers, without an active licence, if you’d like.

It has nothing to do with a debug version, it is running a version that is compiled on an M1 Mac on a users older operating system that in very rare cases causes a crash.
I do not have a Mac installation for every older OS that Xojo apps will run on and that is the only way I could (maybe in some rare instance) replicate the error that this user is experiencing.

The last couple of times this issue has come up, it was drawing code that needed to be improved to prevent infinite events. In other words, check to make sure your Paint code only draws and isn’t inadvertently causing a Paint loop.

2 Likes

Thanks Tim,
I have had this problem before where a Window doesn’t load all the controls and appears frozen. The problem was code in paint events updating the interface triggering another paint event.
Is there a good way to make sure code in a paint event only fires once. I was thinking of setting a boolean variable eg. alreadyRun to true at the end of the code.

Make sure that your paint event

  1. Only does painting, move all logic somewhere else.
  2. Doesn’t overlap other other controls or have controls overlapping it.

I would advise against this as the Paint event may get called by the OS 100s of times, and it should respond each and every time.

What happens when a user changes their theme or accent color, sends the app to the background? if you ignore this event, it may not update or worse the OS flushes the buffer and you are left with zero content, which may be even harder to debug and figure out.

can’t you build for universal instead??