A user said that my app is hanging. I asked him to sample the process in Activity Monitor. But I can’t make out what is causing the hang. Is it really the change in the dock tile?
Looks like some mess based on a modal window + background tasks + plugin calls. Not a Xojo issue. I think that only you with the plugins support can find out.
By the way, not wrong, but fixing this mistype in the plugin may be cosmetically interesting CallDelegeateOnMainThreadBlock(void*)
Which problem should I check? There is one background task and the progress window. Unfortunately, for creating PDFs out of Html I need to load the Html into a HtmlViewer which makes a bit of spaghetti code.
No more details? Can the user reproduce the hang, what is he doing before? Which Mac? Which system?
May you can send him a version without Dock animation?
macOS 15.3.2, ARM, the user had the hang a couple of times. Hang is not reproducible. I’m not sure if the dock animation is the reason for the hang or if it masks the real reason.
Hangs are really rare. I had one earlier this year and there it was quite simple to see which function caused the hang.
I think that there’s some kind of deadlock occurring. And it may be related to a modal mode window locking things + background/timer things requesting locks too. All those at API level and I see plugins acting in the mix. I guess MBS can take a look to see if they find a clearer clue because they are 1000x better than me in MacOS internals.
This makes much more sense. The CallDelegateOnMainThreadMBS simplifies code so I’m not sure if this is a culprit or not. I can only send something to Christian if I can reproduce the problem.
But I found something. Normally, I use a ShowModalWithin and here I only use a Show so this is something I can test.