Ticket UUID: | 6c88c5270a8f8a07a0a22efbdbcba5c60dd00129 | |||
Title: | Aqua : mac_styles crash on menu binding | |||
Type: | Bug | Version: | ||
Submitter: | nab | Created on: | 2020-09-04 10:41:24 | |
Subsystem: | 66. Aqua Window Operations | Assigned To: | marc_culler | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2023-04-03 11:41:42 | |
Resolution: | Fixed | Closed By: | chrstphrchvz | |
Closed on: | 2023-04-03 11:41:42 | |||
Description: |
Hi Marc, maybe my Mac is ill... at least the only difference between some times ago and now is that I switched to XCode 11.7 using mac_styles branch here's a crash that happen with a Cmd+o binding (aka Open File in my app). please note that this routine in my app is over-simple... Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00007c000000001c Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [24898] VM Regions Near 0x7c000000001c: Stack 0000700003c87000-0000700003d09000 [ 520K] rw-/rwx SM=COW thread 36 --> MALLOC_TINY 00007fe509c00000-00007fe509d00000 [ 1024K] rw-/rwx SM=COW Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff6cfd98fe object_isClass + 24 1 com.apple.Foundation 0x00007fff36776268 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 50 2 com.apple.Foundation 0x00007fff36775ffd -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 294 3 com.apple.Foundation 0x00007fff36784d9a -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 971 4 com.apple.CoreFoundation 0x00007fff340d8dc3 -[CFPrefsSource forEachObserver:] + 253 5 com.apple.CoreFoundation 0x00007fff34118b54 -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 91 6 com.apple.CoreFoundation 0x00007fff34118a1e ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 463 7 com.apple.CoreFoundation 0x00007fff34118845 __CFDictionaryApplyFunction_block_invoke + 22 8 com.apple.CoreFoundation 0x00007fff340de38f CFBasicHashApply + 115 9 com.apple.CoreFoundation 0x00007fff340cecd7 CFDictionaryApplyFunction + 129 10 com.apple.CoreFoundation 0x00007fff341187c4 _CFPrefsDeliverPendingKVONotificationsGuts + 231 11 com.apple.CoreFoundation 0x00007fff340bee58 -[_CFXPreferences _deliverPendingKVONotifications] + 85 12 com.apple.CoreFoundation 0x00007fff340bf8f8 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 430 13 com.apple.CoreFoundation 0x00007fff340bf3ba -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 364 14 com.apple.CoreFoundation 0x00007fff3411cdbc -[_CFXPreferences setValue:forKey:appIdentifier:container:configurationURL:] + 104 15 com.apple.CoreFoundation 0x00007fff3411cd28 _CFPreferencesSetAppValueWithContainerAndConfiguration + 113 16 com.apple.Foundation 0x00007fff367cc43c -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 55 17 com.apple.AppKit 0x00007fff313e1af9 -[NSWindow _reallySetFrame:] + 519 18 com.apple.AppKit 0x00007fff313e145e -[NSWindow _oldPlaceWindow:fromServer:] + 195 19 com.apple.AppKit 0x00007fff313df975 -[NSWindow _setFrameCommon:display:fromServer:] + 1352 20 com.apple.AppKit 0x00007fff314c46ef -[NSWindow setFrameOrigin:] + 393 21 com.apple.AppKit 0x00007fff316308be -[NSWindow center] + 315 22 com.apple.AppKit 0x00007fff31d7e499 -[NSSavePanel viewDidAdvanceToRunPhase:] + 60 23 com.apple.CoreFoundation 0x00007fff340f78ac __invoking___ + 140 24 com.apple.CoreFoundation 0x00007fff340f7751 -[NSInvocation invoke] + 303 25 com.apple.ViewBridge 0x00007fff66e2b684 __deferNSXPCInvocationOntoMainThread_block_invoke + 228 26 com.apple.ViewBridge 0x00007fff66e1a0d8 __wrapBlockWithVoucher_block_invoke + 37 27 com.apple.ViewBridge 0x00007fff66e19ea7 __deferBlockOntoMainThread_block_invoke_2 + 507 28 com.apple.CoreFoundation 0x00007fff341159ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 29 com.apple.CoreFoundation 0x00007fff34115934 __CFRunLoopDoBlocks + 379 30 com.apple.CoreFoundation 0x00007fff34114e2d __CFRunLoopRun + 2450 31 com.apple.CoreFoundation 0x00007fff34113e3e CFRunLoopRunSpecific + 462 32 com.apple.ViewBridge 0x00007fff66e18f2f __invokeRunLoopInModeForDuration_block_invoke_2 + 25 33 com.apple.ViewBridge 0x00007fff66e18e81 invokeRunLoopInModeForDuration + 498 34 com.apple.ViewBridge 0x00007fff66e18c85 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_3 + 86 35 com.apple.ViewBridge 0x00007fff66e18c2d __CONSIDER_WHO_REQUESTED_THIS_WAIT_BEFORE_SENDING_BUG_TO_VIEWBRIDGE__ + 7 36 com.apple.ViewBridge 0x00007fff66e18bf6 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_2 + 122 37 com.apple.ViewBridge 0x00007fff66e18b1e __29-[NSCFRunLoopSemaphore wait:]_block_invoke + 302 38 com.apple.ViewBridge 0x00007fff66e186e0 +[NSCFRunLoopSemaphore _observe:whilePerforming:] + 597 39 com.apple.ViewBridge 0x00007fff66e178b0 -[NSCFRunLoopSemaphore wait:] + 402 40 com.apple.ViewBridge 0x00007fff66e17634 -[NSCFRunLoopSemaphore wait] + 38 41 com.apple.AppKit 0x00007fff31d7e72c -[NSSavePanel beginServicePanel] + 320 42 com.apple.AppKit 0x00007fff31d7f0f8 -[NSSavePanel runModal] + 98 43 Tk 0x0000000101d04e02 Tk_GetOpenFileObjCmd + 2306 44 Tcl 0x0000000101ad0651 0x101ab1000 + 128593 45 Tcl 0x0000000101acc642 Tcl_EvalObjv + 370 46 Tcl 0x0000000101acdfba 0x101ab1000 + 118714 47 Tcl 0x0000000101aced09 TclNREvalObjEx + 265 48 Tcl 0x0000000101aceb5e TclEvalObjEx + 30 49 com.LightingStudioDevice.DLight 0x00000001018a5dbf FileFromUICommand + 1279 50 Tcl 0x0000000101acc642 Tcl_EvalObjv + 370 51 Tcl 0x0000000101acdfba 0x101ab1000 + 118714 52 Tcl 0x0000000101acd44a Tcl_EvalEx + 26 53 Tk 0x0000000101c36d77 Tk_BindEvent + 6759 54 Tk 0x0000000101c3e2c8 TkBindEventProc + 360 55 Tk 0x0000000101c4608f Tk_HandleEvent + 879 56 Tk 0x0000000101c46694 WindowEventProc + 100 57 Tcl 0x0000000101b8970c Tcl_ServiceEvent + 172 58 Tcl 0x0000000101b899f8 Tcl_DoOneEvent + 392 59 com.LightingStudioDevice.DLight 0x0000000101905d7a main + 634 | |||
User Comments: |
chrstphrchvz added on 2023-04-03 11:41:42:
I suspect that this crash was actually fixed more recently by [d638e7ca3616]/[16cad963a3ae], given reports like [ef5d3e29a429]. marc_culler (claiming to be Marc Culler) added on 2020-09-07 18:11:35: Great. I'll close the ticket. nab added on 2020-09-07 17:12:26: so it appears that your latest commit to mac_styles fixes all those crash with Mojave :) Thank you again Marc for the quick fixing best regards, nicolas nab added on 2020-09-07 16:37:13: I'm building your latest commit and will spread it to friends. I'll let you know. one note, I've spread a release with https://core.tcl-lang.org/tk/info/0baa95353a2dbdd1 and it didn't crash on their computer neither ++ marc_culler (claiming to be Marc Culler) added on 2020-09-07 16:27:28: So this seems to be a problem with the virtual events which notify an application that its accent color or highlight color changed. That needs a Key Value Observer for the SystemDefaults object. It seems that Mojave can't handle that. There is nothing I can do about fixing bugs in old (or any) versions of macOS. So I think the answer is to disable that feature on Mojave. I pushed a new commit that attempts to do that. Please let me know if it fixes the crash. nab added on 2020-09-07 14:07:21: I'm lucky today :) https://core.tcl-lang.org/tk/info/0baa95353a2dbdd1 does NOT crash https://core.tcl-lang.org/tk/info/99e9fc5ee3ea4ccd does crash Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000001c Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [73825] VM Regions Near 0x1c: --> __TEXT 0000000103251000-0000000103598000 [ 3356K] r-x/r-x SM=COW /Users/USER/*/DLight.app/Contents/MacOS/DLight Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff663478fe object_isClass + 24 1 com.apple.Foundation 0x00007fff2fae4268 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 50 2 com.apple.Foundation 0x00007fff2fae3ffd -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 294 3 com.apple.Foundation 0x00007fff2faf2d9a -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 971 4 com.apple.CoreFoundation 0x00007fff2d446dc3 -[CFPrefsSource forEachObserver:] + 253 5 com.apple.CoreFoundation 0x00007fff2d486b54 -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 91 6 com.apple.CoreFoundation 0x00007fff2d486a1e ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 463 7 com.apple.CoreFoundation 0x00007fff2d486845 __CFDictionaryApplyFunction_block_invoke + 22 8 com.apple.CoreFoundation 0x00007fff2d44c38f CFBasicHashApply + 115 9 com.apple.CoreFoundation 0x00007fff2d43ccd7 CFDictionaryApplyFunction + 129 10 com.apple.CoreFoundation 0x00007fff2d4867c4 _CFPrefsDeliverPendingKVONotificationsGuts + 231 11 com.apple.CoreFoundation 0x00007fff2d42ce58 -[_CFXPreferences _deliverPendingKVONotifications] + 85 12 com.apple.CoreFoundation 0x00007fff2d42d8f8 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 430 13 com.apple.CoreFoundation 0x00007fff2d42d3ba -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 364 14 com.apple.CoreFoundation 0x00007fff2d48adbc -[_CFXPreferences setValue:forKey:appIdentifier:container:configurationURL:] + 104 15 com.apple.CoreFoundation 0x00007fff2d48ad28 _CFPreferencesSetAppValueWithContainerAndConfiguration + 113 16 com.apple.Foundation 0x00007fff2fb3a43c -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 55 17 com.apple.AppKit 0x00007fff2a74faf9 -[NSWindow _reallySetFrame:] + 519 18 com.apple.AppKit 0x00007fff2a74f45e -[NSWindow _oldPlaceWindow:fromServer:] + 195 19 com.apple.AppKit 0x00007fff2a74d975 -[NSWindow _setFrameCommon:display:fromServer:] + 1352 20 com.apple.AppKit 0x00007fff2a8326ef -[NSWindow setFrameOrigin:] + 393 21 com.apple.AppKit 0x00007fff2a99e8be -[NSWindow center] + 315 22 com.apple.AppKit 0x00007fff2b0ec499 -[NSSavePanel viewDidAdvanceToRunPhase:] + 60 23 com.apple.CoreFoundation 0x00007fff2d4658ac __invoking___ + 140 24 com.apple.CoreFoundation 0x00007fff2d465751 -[NSInvocation invoke] + 303 25 com.apple.ViewBridge 0x00007fff60199684 __deferNSXPCInvocationOntoMainThread_block_invoke + 228 26 com.apple.ViewBridge 0x00007fff601880d8 __wrapBlockWithVoucher_block_invoke + 37 27 com.apple.ViewBridge 0x00007fff60187ea7 __deferBlockOntoMainThread_block_invoke_2 + 507 28 com.apple.CoreFoundation 0x00007fff2d4839ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 29 com.apple.CoreFoundation 0x00007fff2d483934 __CFRunLoopDoBlocks + 379 30 com.apple.CoreFoundation 0x00007fff2d482e2d __CFRunLoopRun + 2450 31 com.apple.CoreFoundation 0x00007fff2d481e3e CFRunLoopRunSpecific + 462 32 com.apple.ViewBridge 0x00007fff60186f2f __invokeRunLoopInModeForDuration_block_invoke_2 + 25 33 com.apple.ViewBridge 0x00007fff60186e81 invokeRunLoopInModeForDuration + 498 34 com.apple.ViewBridge 0x00007fff60186c85 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_3 + 86 35 com.apple.ViewBridge 0x00007fff60186c2d __CONSIDER_WHO_REQUESTED_THIS_WAIT_BEFORE_SENDING_BUG_TO_VIEWBRIDGE__ + 7 36 com.apple.ViewBridge 0x00007fff60186bf6 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_2 + 122 37 com.apple.ViewBridge 0x00007fff60186b1e __29-[NSCFRunLoopSemaphore wait:]_block_invoke + 302 38 com.apple.ViewBridge 0x00007fff601866e0 +[NSCFRunLoopSemaphore _observe:whilePerforming:] + 597 39 com.apple.ViewBridge 0x00007fff601858b0 -[NSCFRunLoopSemaphore wait:] + 402 40 com.apple.ViewBridge 0x00007fff60185634 -[NSCFRunLoopSemaphore wait] + 38 41 com.apple.AppKit 0x00007fff2b0ec72c -[NSSavePanel beginServicePanel] + 320 42 com.apple.AppKit 0x00007fff2b0ed0f8 -[NSSavePanel runModal] + 98 43 Tk 0x00000001038561d2 Tk_GetOpenFileObjCmd + 2306 44 Tcl 0x000000010361d651 0x1035fe000 + 128593 45 Tcl 0x0000000103619642 Tcl_EvalObjv + 370 46 Tcl 0x000000010361afba 0x1035fe000 + 118714 47 Tcl 0x000000010361bd09 TclNREvalObjEx + 265 48 Tcl 0x000000010361bb5e TclEvalObjEx + 30 49 com.LightingStudioDevice.DLight 0x00000001033ee40f FileFromUICommand + 1279 50 Tcl 0x0000000103619642 Tcl_EvalObjv + 370 51 Tcl 0x000000010361afba 0x1035fe000 + 118714 52 Tcl 0x000000010361a44a Tcl_EvalEx + 26 53 Tk 0x0000000103788197 Tk_BindEvent + 6759 54 Tk 0x000000010378f6e8 TkBindEventProc + 360 55 Tk 0x00000001037974af Tk_HandleEvent + 879 56 Tk 0x0000000103797ab4 WindowEventProc + 100 57 Tcl 0x00000001036d670c Tcl_ServiceEvent + 172 58 Tcl 0x00000001036d69f8 Tcl_DoOneEvent + 392 59 com.LightingStudioDevice.DLight 0x000000010344e3ea main + 634 nab added on 2020-09-07 13:58:30: according to answer I've got it's the same if using the mouse or the shortcut ++ nab added on 2020-09-07 13:53:09: Hi Marc, the first crash on this ticket was with symbols. the latest Tk command is: 43 Tk 0x0000000101d04e02 Tk_GetOpenFileObjCmd + 2306 >Does it crash if you use the menu with the mouse rather than the shortcut? I'll ask >Does it crash on all systems? If not, which ones? it seems very related to Mojave >But probably the most useful thing to know right now would be which commit created the problem. I'll try >BTW, since you use com.LightingStudioDevice.DLight in your Info.plist, that is probably the the saved file that you should delete. this file does not exists !?? it's just the Bundle identifier before switching back to previous XCode, I'll bisect thanks, ++ marc_culler added on 2020-09-07 13:36:03: It would really help a lot to know which line in the source code this is: 35 Tk 0x00000001080911d2 0x107fb8000 + 889298 since that was the last Tk function called before the crash. Can't you generate a crash report with symbols? How about installing the debug Tk library in your application, given that you are using bleeding edge code in your app? Also, there are many basic questions unanswered, like: Does it crash if you use the menu with the mouse rather than the shortcut? Does it crash on all systems? If not, which ones? But probably the most useful thing to know right now would be which commit created the problem. BTW, since you use com.LightingStudioDevice.DLight in your Info.plist, that is probably the the saved file that you should delete. I have not been convinced that this is a Tk bug yet. Tk should be allowed to call [NSSavePanel runModal] without a crash. And the fact that the crash is linked to using a new XCode is even more suspicious. How about removing your XCode and going back to the older one? nab added on 2020-09-07 06:26:33: so... same crash on Mojave with the latest mac_styles branch on friend's computer. Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000726c2d2d2d48 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [20867] VM Regions Near 0x726c2d2d2d48: Stack 000070000ed1d000-000070000ed9f000 [ 520K] rw-/rwx SM=NUL thread 36 --> MALLOC_TINY 00007f92da400000-00007f92da500000 [ 1024K] rw-/rwx SM=COW Application Specific Information: Performing @selector(tkMenuItemInvoke:) from sender NSMenuItem 0x6000013bfcc0 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff74b91b73 object_isClass + 31 1 com.apple.Foundation 0x00007fff4c61fe18 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 57 2 com.apple.Foundation 0x00007fff4c61fb6f -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 355 3 com.apple.Foundation 0x00007fff4c636806 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 707 4 com.apple.CoreFoundation 0x00007fff4a3ee78c -[CFPrefsSource forEachObserver:] + 268 5 com.apple.CoreFoundation 0x00007fff4a3f91fc -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 77 6 com.apple.CoreFoundation 0x00007fff4a3f910a ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 422 7 com.apple.CoreFoundation 0x00007fff4a3b6a4d __CFDictionaryApplyFunction_block_invoke + 22 8 com.apple.CoreFoundation 0x00007fff4a3b6836 CFBasicHashApply + 105 9 com.apple.CoreFoundation 0x00007fff4a3b67b5 CFDictionaryApplyFunction + 130 10 com.apple.CoreFoundation 0x00007fff4a3f8eec _CFPrefsDeliverPendingKVONotificationsGuts + 246 11 com.apple.CoreFoundation 0x00007fff4a3ae261 -[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:] + 242 12 com.apple.CoreFoundation 0x00007fff4a3edb0e __41-[_CFXPreferences registerDefaultValues:]_block_invoke + 92 13 com.apple.CoreFoundation 0x00007fff4a3ec834 withKeysAndValues + 234 14 com.apple.CoreFoundation 0x00007fff4a3edaac -[_CFXPreferences registerDefaultValues:] + 65 15 com.apple.CoreFoundation 0x00007fff4a3eda3d _CFXPreferencesRegisterDefaultValues + 82 16 com.apple.Foundation 0x00007fff4c623045 -[NSUserDefaults(NSUserDefaults) registerDefaults:] + 261 17 com.apple.AppKit 0x00007fff47baf344 nextRenderingMoment + 268 18 com.apple.AppKit 0x00007fff47baef99 -[NSScreenDisplayLink _schedule] + 93 19 com.apple.AppKit 0x00007fff47baef05 -[NSScreenDisplayLink initWithScreen:handler:] + 282 20 com.apple.AppKit 0x00007fff47baedd2 -[NSScreen(NSDisplayLink1) displayLinkWithHandler:] + 59 21 com.apple.AppKit 0x00007fff47baed91 -[NSScreen(NSDisplayLink1) displayLinkWithTarget:selector:] + 77 22 com.apple.AppKit 0x00007fff47c1aa0c -[NSAnimation(NSInternal) _createDisplayLink:] + 50 23 com.apple.AppKit 0x00007fff47c19b07 -[NSAnimation startAnimation] + 406 24 com.apple.AppKit 0x00007fff47c98db4 -[_NSWindowTransformAnimation startAnimation] + 551 25 com.apple.AppKit 0x00007fff479e9970 NSPerformVisuallyAtomicChange + 132 26 com.apple.AppKit 0x00007fff47b0379b -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 917 27 com.apple.AppKit 0x00007fff47bf6308 -[NSApplication _orderFrontModalWindow:relativeToWindow:] + 692 28 com.apple.AppKit 0x00007fff47bf5ad1 -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 747 29 com.apple.AppKit 0x00007fff47bf57dd -[NSApplication beginModalSessionForWindow:] + 37 30 com.apple.AppKit 0x00007fff47bf5741 __35-[NSApplication runModalForWindow:]_block_invoke_2 + 39 31 com.apple.AppKit 0x00007fff47bf5707 __35-[NSApplication runModalForWindow:]_block_invoke + 70 32 com.apple.AppKit 0x00007fff47bf4f71 _NSTryRunModal + 100 33 com.apple.AppKit 0x00007fff47bf4e56 -[NSApplication runModalForWindow:] + 128 34 com.apple.AppKit 0x00007fff48112722 -[NSSavePanel runModal] + 476 35 Tk 0x00000001080911d2 0x107fb8000 + 889298 36 Tcl 0x0000000107e4f651 0x107e30000 + 128593 37 Tcl 0x0000000107e4b642 Tcl_EvalObjv + 370 38 Tcl 0x0000000107e4cfba 0x107e30000 + 118714 39 Tcl 0x0000000107e4dd09 TclNREvalObjEx + 265 40 Tcl 0x0000000107e4db5e TclEvalObjEx + 30 41 com.LightingStudioDevice.DLight 0x0000000107bd8b3e FileFromUICommand + 2446 nab added on 2020-09-07 03:31:41: for the first crash, run is 10.15, build is 10.15, target is 10.9 for the second/third, run is 10.14, build is 10.15, target is 10.9 ++ marc_culler (claiming to be Marc Culler) added on 2020-09-06 20:02:36: The second crash was completely different from the first crash, so I need to see the crash report from the third crash. Preferably with symbols. Also, what is the run system, what is the build system and what is the target system? nab added on 2020-09-06 19:47:18: not here, still crashing like the first report and I think mac_styles is good enough (in terms of stability, speed, CPU is not so good at the moment but....) to distribute it :) ++ marc_culler (claiming to be Marc Culler) added on 2020-09-06 19:20:29: Cool! We hit the jackpot. It should work now. BTW mac_styles is beta software. It is expected to have bugs. If that makes your users mad then they should use stable software. nab added on 2020-09-06 18:54:58: Hi Marc, core8.6 branch crash in the same way. latest commit in mac_styles branch still crash. I've tried my app on my wife's computer which runs macOS10.14 and all is fine, I can run the opneFile panel, save panel without a crash... I've received another crash report from another user... same macOS, but there I guess (because the user was a little bit angry and didn't gave me much details...) the app does not even run. I'm really sorry to report you all these crash without being able to produce a script to reproduce them... Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2]' abort() called terminating with uncaught exception of type NSException Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff32ad09ad __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff5d1c9a17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff32b0f9a4 -[CFPrefsConfigurationFileSource initWithConfigurationPropertyList:containingPreferences:] + 0 3 CoreFoundation 0x00007fff32a0c112 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 0 4 Tk 0x000000010a829096 Tk_MacOSXIsAppInFront + 1974 5 Tk 0x000000010a82811c TkGenWMDestroyEvent + 252 6 CoreFoundation 0x00007fff32a7d226 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 7 CoreFoundation 0x00007fff32a7d1a0 ___CFXRegistrationPost_block_invoke + 63 8 CoreFoundation 0x00007fff32a7d10a _CFXRegistrationPost + 404 9 CoreFoundation 0x00007fff32a855b8 ___CFXNotificationPost_block_invoke + 87 10 CoreFoundation 0x00007fff329edf44 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1642 11 CoreFoundation 0x00007fff329ed2f7 _CFXNotificationPost + 732 12 Foundation 0x00007fff34c75a5b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66 13 AppKit 0x00007fff3016350e -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] + 2840 14 AppKit 0x00007fff30161521 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 283 15 AppKit 0x00007fff301613a5 -[NSWindow orderWindow:relativeTo:] + 152 16 Tk 0x000000010a8311f2 TkMacOSXRegisterOffScreenWindow + 706 17 Tk 0x000000010a8261e8 XMapWindow + 312 18 Tk 0x000000010a7720f8 Tk_MapWindow + 200 19 Tk 0x000000010a8315ee TkpWmSetState + 94 20 Tk 0x000000010a82d689 TkMacOSXUnregisterMacWindow + 10025 21 Tcl 0x000000010a5cf651 Tcl_GetVersion + 1905 22 Tcl 0x000000010a5cb642 Tcl_EvalObjv + 370 23 Tcl 0x000000010a5ccfba Tcl_EvalEx + 2954 24 Tcl 0x000000010a5cc44a Tcl_EvalEx + 26 25 DLight 0x000000010a3c4e34 main + 916 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff5ead32c2 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff5eb8ebf1 pthread_kill + 284 2 libsystem_c.dylib 0x00007fff5ea3d6a6 abort + 127 3 libc++abi.dylib 0x00007fff5bc18641 abort_message + 231 4 libc++abi.dylib 0x00007fff5bc187df default_terminate_handler() + 267 5 libobjc.A.dylib 0x00007fff5d1cbee3 _objc_terminate() + 97 6 libc++abi.dylib 0x00007fff5bc2419e std::__terminate(void (*)()) + 8 7 libc++abi.dylib 0x00007fff5bc23f86 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27 8 libc++abi.dylib 0x00007fff5bc16f99 __cxa_throw + 113 9 libobjc.A.dylib 0x00007fff5d1c9b51 objc_exception_throw + 362 10 com.apple.CoreFoundation 0x00007fff32b0f9a4 _CFThrowFormattedException + 202 11 com.apple.CoreFoundation 0x00007fff32a0c112 -[__NSArrayM objectAtIndex:] + 178 12 Tk 0x000000010a829096 0x10a735000 + 999574 13 Tk 0x000000010a82811c 0x10a735000 + 995612 14 com.apple.CoreFoundation 0x00007fff32a7d226 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 15 com.apple.CoreFoundation 0x00007fff32a7d1a0 ___CFXRegistrationPost_block_invoke + 63 16 com.apple.CoreFoundation 0x00007fff32a7d10a _CFXRegistrationPost + 404 17 com.apple.CoreFoundation 0x00007fff32a855b8 ___CFXNotificationPost_block_invoke + 87 18 com.apple.CoreFoundation 0x00007fff329edf44 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1642 19 com.apple.CoreFoundation 0x00007fff329ed2f7 _CFXNotificationPost + 732 20 com.apple.Foundation 0x00007fff34c75a5b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66 21 com.apple.AppKit 0x00007fff3016350e -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] + 2840 22 com.apple.AppKit 0x00007fff30161521 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 283 23 com.apple.AppKit 0x00007fff301613a5 -[NSWindow orderWindow:relativeTo:] + 152 24 Tk 0x000000010a8311f2 0x10a735000 + 1032690 25 Tk 0x000000010a8261e8 XMapWindow + 312 26 Tk 0x000000010a7720f8 Tk_MapWindow + 200 27 Tk 0x000000010a8315ee TkpWmSetState + 94 28 Tk 0x000000010a82d689 0x10a735000 + 1017481 29 Tcl 0x000000010a5cf651 0x10a5b0000 + 128593 30 Tcl 0x000000010a5cb642 Tcl_EvalObjv + 370 31 Tcl 0x000000010a5ccfba 0x10a5b0000 + 118714 32 Tcl 0x000000010a5cc44a Tcl_EvalEx + 26 33 com.LightingStudioDevice.DLight 0x000000010a3c4e34 main + 916 marc_culler (claiming to be Marc Culler) added on 2020-09-06 17:44:45: Nicolas, I took a stab in the dark. See if this is better in the current mac_styles. - Marc marc_culler (claiming to be Marc Culler) added on 2020-09-06 14:30:46: Nicolas, Please test with core-8-6-branch and see if you can still make it crash. nab added on 2020-09-06 12:54:24: Hi Marc, here's a report from a user of my app. the FileFromUICommand() is asking for an apple open panel or save panel. this crash happen on macOS 10.14.6 I hope the Application Specific Information will give you useful information ++ Nicolas Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000487c8cb36e70 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [18913] VM Regions Near 0x487c8cb36e70: mapped file 000000011e572000-000000011e971000 [ 4092K] r--/rw- SM=COW Object_id=3fbcfa95 --> MALLOC_NANO 0000600000000000-0000600008000000 [128.0M] rw-/rwx SM=ALI Application Specific Information: Performing @selector(tkMenuItemInvoke:) from sender NSMenuItem 0x600000ae45a0 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff74b91b73 object_isClass + 31 1 com.apple.Foundation 0x00007fff4c61fe18 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 57 2 com.apple.Foundation 0x00007fff4c61fb6f -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 355 3 com.apple.Foundation 0x00007fff4c636806 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 707 4 com.apple.CoreFoundation 0x00007fff4a3ee78c -[CFPrefsSource forEachObserver:] + 268 5 com.apple.CoreFoundation 0x00007fff4a3f91fc -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 77 6 com.apple.CoreFoundation 0x00007fff4a3f910a ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 422 7 com.apple.CoreFoundation 0x00007fff4a3b6a4d __CFDictionaryApplyFunction_block_invoke + 22 8 com.apple.CoreFoundation 0x00007fff4a3b6836 CFBasicHashApply + 105 9 com.apple.CoreFoundation 0x00007fff4a3b67b5 CFDictionaryApplyFunction + 130 10 com.apple.CoreFoundation 0x00007fff4a3f8eec _CFPrefsDeliverPendingKVONotificationsGuts + 246 11 com.apple.CoreFoundation 0x00007fff4a3ae261 -[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:] + 242 12 com.apple.CoreFoundation 0x00007fff4a3edb0e __41-[_CFXPreferences registerDefaultValues:]_block_invoke + 92 13 com.apple.CoreFoundation 0x00007fff4a3ec834 withKeysAndValues + 234 14 com.apple.CoreFoundation 0x00007fff4a3edaac -[_CFXPreferences registerDefaultValues:] + 65 15 com.apple.CoreFoundation 0x00007fff4a3eda3d _CFXPreferencesRegisterDefaultValues + 82 16 com.apple.Foundation 0x00007fff4c623045 -[NSUserDefaults(NSUserDefaults) registerDefaults:] + 261 17 com.apple.AppKit 0x00007fff47baf344 nextRenderingMoment + 268 18 com.apple.AppKit 0x00007fff47baef99 -[NSScreenDisplayLink _schedule] + 93 19 com.apple.AppKit 0x00007fff47baef05 -[NSScreenDisplayLink initWithScreen:handler:] + 282 20 com.apple.AppKit 0x00007fff47baedd2 -[NSScreen(NSDisplayLink1) displayLinkWithHandler:] + 59 21 com.apple.AppKit 0x00007fff47baed91 -[NSScreen(NSDisplayLink1) displayLinkWithTarget:selector:] + 77 22 com.apple.AppKit 0x00007fff47c1aa0c -[NSAnimation(NSInternal) _createDisplayLink:] + 50 23 com.apple.AppKit 0x00007fff47c19b07 -[NSAnimation startAnimation] + 406 24 com.apple.AppKit 0x00007fff47c98db4 -[_NSWindowTransformAnimation startAnimation] + 551 25 com.apple.AppKit 0x00007fff479e9970 NSPerformVisuallyAtomicChange + 132 26 com.apple.AppKit 0x00007fff47b0379b -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 917 27 com.apple.AppKit 0x00007fff47bf6308 -[NSApplication _orderFrontModalWindow:relativeToWindow:] + 692 28 com.apple.AppKit 0x00007fff47bf5ad1 -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 747 29 com.apple.AppKit 0x00007fff47bf57dd -[NSApplication beginModalSessionForWindow:] + 37 30 com.apple.AppKit 0x00007fff47bf5741 __35-[NSApplication runModalForWindow:]_block_invoke_2 + 39 31 com.apple.AppKit 0x00007fff47bf5707 __35-[NSApplication runModalForWindow:]_block_invoke + 70 32 com.apple.AppKit 0x00007fff47bf4f71 _NSTryRunModal + 100 33 com.apple.AppKit 0x00007fff47bf4e56 -[NSApplication runModalForWindow:] + 128 34 com.apple.AppKit 0x00007fff48112722 -[NSSavePanel runModal] + 476 35 Tk 0x000000010f9021d2 0x10f829000 + 889298 36 Tcl 0x000000010f6c3651 0x10f6a4000 + 128593 37 Tcl 0x000000010f6bf642 Tcl_EvalObjv + 370 38 Tcl 0x000000010f6c0fba 0x10f6a4000 + 118714 39 Tcl 0x000000010f6c1d09 TclNREvalObjEx + 265 40 Tcl 0x000000010f6c1b5e TclEvalObjEx + 30 41 com.LightingStudioDevice.DLight 0x000000010f44bb5e FileFromUICommand + 2446 nab added on 2020-09-05 14:45:37: unfortunately I don't succeed to produce a simple script to trigger this crash, sorry. ++ marc_culler (claiming to be Marc Culler) added on 2020-09-05 14:37:03: I can't really do anything about it without being able to generate the crash myself. Can you provide a short script that produces the crash??? nab added on 2020-09-05 14:27:59: Hi Marc, wrong bet... after restarting the computer, it still crash. it's not a big deal for me because I've a workaround, but I thought I should let you know about that crash. best regards, Nicolas marc_culler (claiming to be Marc Culler) added on 2020-09-04 22:21:07: Well, the last Tk function called before the crash was Tk_GetOpenFileObjCmd which doesn't do anything but open an Apple file requester. The crash happened while the file requester was reading your preferences settings. This shouldn't happen, of course, but I don't see anything we could do about it. This not the first report of problems with preferences. Maybe the database can become corrupted. I bet that if you remove the MacWindowStyle command and reboot your computer you will not see the crash. nab added on 2020-09-04 13:20:56: one note about that, after adding ::tk::unsupported::MacWindowStyle appearance . darkaqua I cannot reproduce the crash ++ |