Hi all,
Xojo 2023 R2 on MacOS Ventura.
When I use .EmbedWithin on one of my container controls, it hard-crashes the program after the method where the EmbedWithin is executed takes place. I have (through trial-and-error) traced the crash to the presence of the ZirconProgressIndicator in the container, which is open source, but since it’s a hard crash the IDE doesn’t catch the crash point, so I don’t know how to debug it.
Has anyone dealt with an issue like this before? What’s the proper approach to debugging this?
If it’s hard crashing on macOS you should be able to see the stack trace from the system which should give you an idea of where along the way there’s a problem. How macOS reports crashes – The Eclectic Light Company
2 Likes
Thanks for that, Tim. I’ve got the crash report but I’m not sure how to parse that data into anything actionable. It’s clear it’s the Xojo framework that’s crashing but I’m struggling to figure out what in the component’s code could cause that.
In any case, I think the easiest solution would be to use a different control to display progress, but I already spent a couple days customizing this control for my own uses, heh. Sunk-cost fallacy and all that.
Cheers
If the crash log shows that the problem is within the Xojo Framework, you should file an issues ticket. You may wish to post the log here to see if anyone can help identify the problem.
Pinging @Thom_McGrath might help too ( oops just did
)
1 Like
Yeah, the crash log would be helpful. Look for “thread x crashed” and grab that entire block. Wether or not the rest will be needed depends on what that thread says.
1 Like
Here’s the block:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 AppKit 0x1af1d4728 -[NSApplication _crashOnException:] + 240
1 AppKit 0x1af01ca10 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 644
2 AppKit 0x1af6f8cfc ___NSRunLoopObserverCreateWithHandler_block_invoke + 64
3 CoreFoundation 0x1abccd9f0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
4 CoreFoundation 0x1abccd8dc __CFRunLoopDoObservers + 532
5 CoreFoundation 0x1abcccf14 __CFRunLoopRun + 776
6 CoreFoundation 0x1abccc4b8 CFRunLoopRunSpecific + 612
7 HIToolbox 0x1b551edf0 RunCurrentEventLoopInMode + 292
8 HIToolbox 0x1b551ea80 ReceiveNextEventCommon + 220
9 HIToolbox 0x1b551e984 _BlockUntilNextEventMatchingListInModeWithFilter + 76
10 AppKit 0x1aeef397c _DPSNextEvent + 636
11 AppKit 0x1aeef2b18 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
12 XojoFramework 0x103c5886c 0x103b74000 + 936044
13 XojoFramework 0x103c588f4 0x103b74000 + 936180
14 My Application.debug 0x102a28904 DesktopApplication._CallFunctionWithExceptionHandling%%o<DesktopApplication>p + 164
15 XojoFramework 0x103de2f80 CallFunctionWithExceptionHandling(void (*)()) + 180
16 XojoFramework 0x103c58890 0x103b74000 + 936080
17 AppKit 0x1aeee6f7c -[NSApplication run] + 464
18 XojoFramework 0x103de17dc RuntimeRun + 48
19 My Application.debug 0x102a7617c REALbasic._RuntimeRun + 28
20 My Application.debug 0x102d3a138 _Main + 712 (/#main:289)
21 My Application.debug 0x102d37888 main + 36
22 dyld 0x1ab897f28 start + 2236
Thread 1:
0 libsystem_pthread.dylib 0x1abbead8c start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x1abbead8c start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x1abbead8c start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x1abbead8c start_wqthread + 0
Thread 5:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x1abbaff54 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1abbc2280 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1abbb8bb8 mach_msg_overwrite + 604
3 libsystem_kernel.dylib 0x1abbb02d0 mach_msg + 24
4 CoreFoundation 0x1abcce7e4 __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x1abccd0c4 __CFRunLoopRun + 1208
6 CoreFoundation 0x1abccc4b8 CFRunLoopRunSpecific + 612
7 AppKit 0x1af01df54 _NSEventThread + 172
8 libsystem_pthread.dylib 0x1abbeffa8 _pthread_start + 148
9 libsystem_pthread.dylib 0x1abbeada0 thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000012187c600 x1: 0x0000000121838651 x2: 0xfffffffffffffff0 x3: 0x000000012187d630
x4: 0xfffffffffffbb001 x5: 0x0000000000000020 x6: 0x000000012187c600 x7: 0x0000000000001070
x8: 0x000000020441d000 x9: 0xaba4cc84f7cb000f x10: 0xaba4cc84f7cb000f x11: 0x000000000000007f
x12: 0x0000000000000034 x13: 0x000000011f050330 x14: 0x0100000206c8c5b1 x15: 0x0000000206c8c5b0
x16: 0x00000001abc1e640 x17: 0x0000000207c19b90 x18: 0x0000000000000000 x19: 0x0000600000846970
x20: 0x00006000013387c0 x21: 0x00001755542fa9fc x22: 0x000000011f009060 x23: 0x000000016d6a5ff0
x24: 0x0000000000000000 x25: 0x0000000000000001 x26: 0x0000600003715c20 x27: 0x0000600000818330
x28: 0x00000001abccdf60 fp: 0x000000016d6a5e60 lr: 0x11258001af1d4720
sp: 0x000000016d6a5e30 pc: 0x00000001af1d4728 cpsr: 0x60001000
far: 0x000060000377a4e8 esr: 0xf2000001 (Breakpoint) brk 1
Thanks in advance for any insight.
That looks like a framework issue to me. If you can create a sample project and put in an issue, please ping me. I don’t think it’s my code’s fault, but I’d like to be sure.
I don’t think it’s your code’s fault either.
I’ve modified your code as well to add a “play button” in the center that eventually turns into the cancel button once the processing task has begun, but I don’t see any code that should cause an issue.
I believe it’s something in the .EmbedWithin’s code that’s going haywire.
Will put together a sample project with the vanilla control later tonight. Thanks for taking a look.