[Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina)
Zoë Peterson
zoe at scootersoftware.com
Tue Jun 11 16:43:15 CEST 2019
On 6/11/2019 9:19 AM, Dmitry Boyarintsev via lazarus wrote:
> Can we actually try to set the value for the instance variable?
>
> Can anyone try and modify TCocoaApplication.run to look like this. (If
> you're using trunk, you'll need to have {$define COCOALOOPOVERRIDE}
> defines in cocoadefines.inc}
David did the research on this one, but IMHO, this is a bad idea. As he
said, the inherited run does more than just set _running before it
starts calling nextEventMatchingMask; that's is just the bit that causes
an obvious crash. It's also poking around the implementation rather
than relying on the public API, so it will be more likely to break again
going forward.
If it's a problem to check isRunning every time through
nextEventMatchingMask, and alternative with the same behavior would be
to swizzle in the runloop variant before calling inherited run and
switching it back once we get into it.
--
Zoë Peterson
Scooter Software
More information about the lazarus
mailing list