13
0

(YDK) possible fix for Catalina event loop crashes

```
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libydk.dylib 0x0000000110d8942d -[GdkQuartzView setNeedsDisplay:] + 93
1 com.apple.AppKit 0x00007fff34af6848 -[NSView(NSViewContentStyle) _recursivelyInvalidateCachedContentStyle] + 120
2 com.apple.AppKit 0x00007fff34af60fb -[NSView _setSuperview:] + 521
3 com.apple.AppKit 0x00007fff34b200a6 -[NSView removeFromSuperview] + 140
4 com.apple.AppKit 0x00007fff34ba882f -[NSView removeFromSuperviewWithoutNeedingDisplay] + 36
5 com.apple.AppKit 0x00007fff34b27168 -[NSView _finalize] + 977
6 com.apple.AppKit 0x00007fff34b26c0c -[NSView dealloc] + 121
7 com.apple.AppKit 0x00007fff34e30db4 -[NSFrameView dealloc] + 119
8 com.apple.AppKit 0x00007fff34e30d36 -[NSTitledFrame dealloc] + 62
9 com.apple.AppKit 0x00007fff34e30ce9 -[NSThemeFrame dealloc] + 603
10 com.apple.Foundation 0x00007fff39ed5992 NSKVODeallocate + 172
11 com.apple.AppKit 0x00007fff34d85884 -[NSWindow dealloc] + 1083
12 com.apple.AppKit 0x00007fff34d85442 -[NSWindow _dealloc] + 76
13 libobjc.A.dylib 0x00007fff6f6f3054 AutoreleasePoolPage::releaseUntil(objc_object**) + 134
14 libobjc.A.dylib 0x00007fff6f6d7dba objc_autoreleasePoolPop + 175
15 com.apple.CoreFoundation 0x00007fff377c9cb5 _CFAutoreleasePoolPop + 22
16 com.apple.Foundation 0x00007fff39e7d04e -[NSAutoreleasePool drain] + 126
17 libydk.dylib 0x0000000110d8ef29 gdk_event_prepare + 73
18 libglib-2.0.0.dylib 0x00000001110ded45 g_main_context_prepare + 533
19 libglib-2.0.0.dylib 0x00000001110df800 g_main_context_iterate + 128
20 libglib-2.0.0.dylib 0x00000001110dfcc2 g_main_loop_run + 210
21 libytk.dylib 0x0000000110a4f11f gtk_main + 191
22 libgtkmm2ext.dylib 0x00000001104cef1e Gtkmm2ext::UI::run(Receiver&) + 318
23 com.harrisonconsoles.Mixbus10 0x000000010dc6fb9c main + 2652
```
This commit is contained in:
Robin Gareus 2024-04-19 15:38:12 +02:00
parent 136b7f42d5
commit 08e394f681
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -604,14 +604,21 @@
- (void) setNeedsDisplay:(BOOL)yn
{
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
if (GDK_WINDOW_DESTROYED (gdk_window)) {
return;
}
GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
if (!impl) {
[super setNeedsDisplay:yn];
return;
}
NSRect nsrect = [self bounds];
GdkRectangle r = { nsrect.origin.x, nsrect.origin.y, nsrect.size.width, nsrect.size.height };
private = GDK_WINDOW_OBJECT (gdk_window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
GDK_NOTE (EVENTS, g_print ("setNeedsDisplay, current NDR %p\n", impl->needs_display_region));
if (!impl->needs_display_region)
@ -650,6 +657,10 @@
private = GDK_WINDOW_OBJECT (gdk_window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
if (!impl) {
return;
}
GDK_NOTE (EVENTS, g_print ("setNeedsDisplayInRect, current NDR %p\n", impl->needs_display_region));
if (!impl->needs_display_region)