Closed Pmaguire205 closed 10 months ago
Thanks for including the crash dump details. However, we would need to have a reproducible test case to be able to investigate further. Can you attach a minimal version of your code and details of how to reproduce?
Thanks for including the crash dump details. However, we would need to have a reproducible test case to be able to investigate further. Can you attach a minimal version of your code and details of how to reproduce?
I have included the function and the button connected to the function which I click on which results in the crash sometimes.
I've taken the library to slightly tweak the original message:
1) The crash dump is now in a details section 2) The example source code is marked up as such
This makes the text slightly easier to navigate.
Looking at the crash report this appears to be an issue triggered by Tk itself. That said, the example code is incomplete which makes it hard to reproduce the issue.
I have not reproduced this crash, but given KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED
in the stack trace, this may be yet another issue resolved (edit: prevented, but not resolved) in Tcl/Tk 8.6.13 by https://core.tcl-lang.org/tk/info/d638e7ca3616
@Pmaguire205 : Is this something you can easily test using our Python 3.12 installer (which includes Tcl/Tk 8.6.13)?
This crash has the same cause as #92603. It has been fixed upstream for Tk 8.6.14, and the fix is backported for inclusion in the Python 3.11.7 and 3.12.1 installers: #108693
Thanks for the update. Closing this issue as it is fixed in the next release.
When I hit a button in my code it crashes. But not all the time only sometimes and the code works on my windows computer .
Crash report
Translated Report (Full Report Below) ------------------------------------- Process: Python [2691] Path: /Library/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.11.1 (3.11.1) Code Type: ARM-64 (Native) Parent Process: Python [2110] Responsible: Python [2110] User ID: 501 Date/Time: 2023-02-02 22:46:46.0822 +0000 OS Version: macOS 13.1 (22C65) Report Version: 12 Anonymous UUID: F6EEBACE-F95D-4CE8-AA15-826665FC67F2 Time Awake Since Boot: 1800 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000001e Exception Codes: 0x0000000000000001, 0x000000000000001e Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [2691] VM Region Info: 0x1e is not in any region. Bytes before following region: 105553518919650 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL ...(unallocated) Kernel Triage: VM - pmap_enter retried due to resource shortage Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x19392464c object_isClass + 16 1 Foundation 0x194c38dfc KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 76 2 Foundation 0x194c38bc0 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 308 3 Foundation 0x194c47b14 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 720 4 CoreFoundation 0x193d2d354 -[CFPrefsSource forEachObserver:] + 316 5 CoreFoundation 0x193d6a390 -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 112 6 CoreFoundation 0x193d6a1fc ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 432 7 CoreFoundation 0x193d6a040 __CFDictionaryApplyFunction_block_invoke + 28 8 CoreFoundation 0x193d31fb4 CFBasicHashApply + 148 9 CoreFoundation 0x193d23b90 CFDictionaryApplyFunction + 320 10 CoreFoundation 0x193d69fb4 _CFPrefsDeliverPendingKVONotificationsGuts + 300 11 CoreFoundation 0x193d144dc -[_CFXPreferences _deliverPendingKVONotifications] + 96 12 CoreFoundation 0x193e617b4 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 340 13 CoreFoundation 0x193d2b338 __41-[_CFXPreferences registerDefaultValues:]_block_invoke + 128 14 CoreFoundation 0x193d13598 withKeysAndValues + 292 15 CoreFoundation 0x193d2b290 -[_CFXPreferences registerDefaultValues:] + 116 16 CoreFoundation 0x193d2b1e4 _CFXPreferencesRegisterDefaultValues + 80 17 Metal 0x19cf8d9b0 invocation function for block in initWrapperType() + 100 18 libdispatch.dylib 0x193b02504 _dispatch_client_callout + 20 19 libdispatch.dylib 0x193b03d50 _dispatch_once_callout + 32 20 Metal 0x19cf8d928 invocation function for block in MTLDeviceArrayInitialize() + 1284 21 libdispatch.dylib 0x193b02504 _dispatch_client_callout + 20 22 libdispatch.dylib 0x193b03d50 _dispatch_once_callout + 32 23 Metal 0x19cf665ac MTLCopyAllDevices + 244 24 CoreImage 0x19dae0078 CIMetalCopyDefaultDevice + 88 25 CoreImage 0x19db7e67c invocation function for block in can_use_metal() + 40 26 libdispatch.dylib 0x193b02504 _dispatch_client_callout + 20 27 libdispatch.dylib 0x193b03d50 _dispatch_once_callout + 32 28 CoreImage 0x19dae5450 -[CIContext initWithOptions:] + 832 29 CoreUI 0x19b7c7808 __38+[CUIShapeEffectStack sharedCIContext]_block_invoke + 56 30 libdispatch.dylib 0x193b02504 _dispatch_client_callout + 20 31 libdispatch.dylib 0x193b03d50 _dispatch_once_callout + 32 32 CoreUI 0x19b7c77cc +[CUIShapeEffectStack sharedCIContext] + 64 33 CoreUI 0x19b7dd1e4 -[CUIShapeEffectStack newFlattenedImageFromShapeCGImage:withScale:cache:] + 188 34 CoreUI 0x19b7d7568 DrawThreePartImageWithOperation + 672 35 CoreUI 0x19b83f63c -[CUIThemeFacet _drawSpecificRenditionKey:inFrame:context:isFocused:focusRingColor:isFlipped:effects:] + 176 36 CoreUI 0x19b83f7ec -[CUIThemeFacet drawInFrame:isFocused:focusRingColor:context:effects:] + 140 37 CoreUI 0x19b847344 CUICoreThemeRenderer::DrawSimple(CUIRenditionKey*, CUIDescriptor const*, bool) + 568 38 CoreUI 0x19b7bdbc4 CUIRenderer::Draw(CGRect, CGContext*, __CFDictionary const*, __CFDictionary const**) + 1060 39 CoreUI 0x19b7bd760 CUIDraw + 224 40 HIToolbox 0x19d435908 _HIThemeCUIDrawWithOptions + 184 41 HIToolbox 0x19d4c4424 _HIThemeDrawButtonInternal(CGRect const*, HIThemeButtonDrawInfo const*, HIThemeButtonDrawInfo const*, ThemeEraseXUPP*, ThemeButtonDrawXUPP*, void*, CGContext*, unsigned int, CGRect*) + 3884 42 HIToolbox 0x19d4c34ec HIThemeDrawButton + 32 43 libtk8.6.dylib 0x10062e574 ComboboxElementDraw + 428 44 libtk8.6.dylib 0x1005f5b64 Ttk_DrawNodeList + 132 45 libtk8.6.dylib 0x1005ef948 EntryDisplay + 564 46 libtcl8.6.dylib 0x1009049b0 TclServiceIdle + 84 47 libtcl8.6.dylib 0x1008e906c Tcl_DoOneEvent + 296 48 libtk8.6.dylib 0x100620d80 -[TKContentView(TKWindowEvent) generateExposeEvents:] + 208 49 libtk8.6.dylib 0x100620ae4 -[TKContentView(TKWindowEvent) drawRect:] + 180 50 AppKit 0x197101c38 _NSViewDrawRect + 124 51 AppKit 0x1977b4988 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1088 52 AppKit 0x1971014ac -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 556 53 QuartzCore 0x19b413b2c CABackingStoreUpdate_ + 224 54 QuartzCore 0x19b46faa0 invocation function for block in CA::Layer::display_() + 64 55 QuartzCore 0x19b412d04 -[CALayer _display] + 1644 56 QuartzCore 0x19b411e88 CA::Layer::display_if_needed(CA::Transaction*) + 788 57 QuartzCore 0x19b5762d8 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 456 58 QuartzCore 0x19b3f4404 CA::Transaction::commit() + 652 59 AppKit 0x197110d58 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272 60 AppKit 0x1977eece0 ___NSRunLoopObserverCreateWithHandler_block_invoke + 64 61 CoreFoundation 0x193d67dc8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 62 CoreFoundation 0x193d67cb4 __CFRunLoopDoObservers + 532 63 CoreFoundation 0x193d672ec __CFRunLoopRun + 784 64 CoreFoundation 0x193d66888 CFRunLoopRunSpecific + 612 65 libtcl8.6.dylib 0x100931f78 Tcl_WaitForEvent + 280 66 libtcl8.6.dylib 0x1008e902c Tcl_DoOneEvent + 232 67 _tkinter.cpython-311-darwin.so 0x1001ae728 _tkinter_tkapp_mainloop_impl + 252 68 Python 0x10102f0c0 method_vectorcall_FASTCALL + 100 69 Python 0x101140d4c _PyEval_EvalFrameDefault + 52772 70 Python 0x101132cac PyEval_EvalCode + 276 71 Python 0x10112d50c builtin_exec + 428 72 Python 0x101082644 cfunction_vectorcall_FASTCALL_KEYWORDS + 80 73 Python 0x101140d4c _PyEval_EvalFrameDefault + 52772 74 Python 0x10114689c _PyEval_Vector + 156 75 Python 0x101021d6c method_vectorcall + 164 76 Python 0x101143980 _PyEval_EvalFrameDefault + 64088 77 Python 0x101132cac PyEval_EvalCode + 276 78 Python 0x1011b016c PyRun_StringFlags + 212 79 Python 0x1011affd4 PyRun_SimpleStringFlags + 84 80 Python 0x1011d2d78 Py_RunMain + 388 81 Python 0x1011d449c pymain_main + 52 82 Python 0x1011d4cd4 Py_BytesMain + 40 83 dyld 0x19395fe50 start + 2544 Thread 1: 0 libsystem_pthread.dylib 0x193c83e18 start_wqthread + 0 Thread 2: 0 libsystem_pthread.dylib 0x193c83e18 start_wqthread + 0 Thread 3: 0 libsystem_kernel.dylib 0x193c54a00 __select + 8 1 select.cpython-311-darwin.so 0x100c49d84 select_select_impl + 380 2 Python 0x101142900 _PyEval_EvalFrameDefault + 59864 3 Python 0x10114689c _PyEval_Vector + 156 4 Python 0x10101ddb4 _PyObject_FastCallDictTstate + 96 5 Python 0x1010aacfc slot_tp_init + 180 6 Python 0x1010a1678 type_call + 136 7 Python 0x10101da94 _PyObject_MakeTpCall + 128 8 Python 0x101140e34 _PyEval_EvalFrameDefault + 53004 9 Python 0x10114689c _PyEval_Vector + 156 10 Python 0x101143980 _PyEval_EvalFrameDefault + 64088 11 Python 0x10114689c _PyEval_Vector + 156 12 Python 0x101021e4c method_vectorcall + 388 13 Python 0x101243a50 thread_run + 200 14 Python 0x1011bfcbc pythread_wrapper + 48 15 libsystem_pthread.dylib 0x193c8906c _pthread_start + 148 16 libsystem_pthread.dylib 0x193c83e2c thread_start + 8 Thread 4: 0 libsystem_kernel.dylib 0x193c54a00 __select + 8 1 libtcl8.6.dylib 0x100932754 NotifierThreadProc + 664 2 libsystem_pthread.dylib 0x193c8906c _pthread_start + 148 3 libsystem_pthread.dylib 0x193c83e2c thread_start + 8 Thread 5: 0 libsystem_pthread.dylib 0x193c83e18 start_wqthread + 0 Thread 6: 0 libsystem_pthread.dylib 0x193c83e18 start_wqthread + 0 Thread 7:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x193c49d70 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x193c5b8a4 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x193c525c4 mach_msg_overwrite + 540 3 libsystem_kernel.dylib 0x193c4a0ec mach_msg + 24 4 CoreFoundation 0x193d68bc0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x193d674ac __CFRunLoopRun + 1232 6 CoreFoundation 0x193d66888 CFRunLoopRunSpecific + 612 7 AppKit 0x197112410 _NSEventThread + 172 8 libsystem_pthread.dylib 0x193c8906c _pthread_start + 148 9 libsystem_pthread.dylib 0x193c83e2c thread_start + 8 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001437eb320 x1: 0x000000016fcad600 x2: 0x00006000008c5540 x3: 0x0000600002ba9040 x4: 0x0000000000000004 x5: 0x0000000000001020 x6: 0x0000000000000000 x7: 0x0000000193ee0b0d x8: 0x0000000000000000 x9: 0x0000600002ba9020 x10: 0x0000651db4bd0000 x11: 0x0000600002ba8000 x12: 0x0000000000000020 x13: 0x00000000001ff800 x14: 0x00000000000007fb x15: 0x00000000a1444082 x16: 0x000000019392463c x17: 0x00000001effed988 x18: 0x0000000000000000 x19: 0x00006000008c5540 x20: 0x000000016fcad600 x21: 0x0000000000000001 x22: 0x0000600002bef400 x23: 0x000000016fcad670 x24: 0x0000000000000001 x25: 0x000000016fcad600 x26: 0x0000600002ba9380 x27: 0x000000016fcadbe0 x28: 0x0000000000000000 fp: 0x000000016fcad5f0 lr: 0x0000000194c38dfc sp: 0x000000016fcad5b0 pc: 0x000000019392464c cpsr: 0x20001000 far: 0x000000000000001e esr: 0x92000006 (Data Abort) byte read Translation fault Binary Images: 0x193914000 - 0x193959d9f libobjc.A.dylib (*)This is the function that I use that is connected to the button I am clicking on that results in this crash. However with the same input statements it sometimes works.
And this is the button: