Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

Flatnotebook onMouseMotion events crash Python on MacOS

Open newville opened this issue 3 years ago • 3 comments

Operating system: MacOS 12.2.1, Monterey with Apple M1 Max chipset wxPython version & source: 4.1.1 from Anaconda Python, conda-forge (py39h591e7dd_3) ('wxWidgets 3.1.5') Python version & source: Python 3.9.10 | packaged by conda-forge | (main, Feb 1 2022, 21:28:27)

Description of the problem:

I believe this does not happen on Intel chips - I have seen it only on Apple M1 Max.

Mouse Motions on Flatnotebook tabs will eventually crash Python. This can be reproduced with the demo agw/FlatNotebook.py code (https://github.com/wxWidgets/Phoenix/blob/master/demo/agw/FlatNotebook.py)

The page initially displays fine, but changing tabs a few times, and then switching back will crash as the mouse moves over the Tabs. Typical output from the demo code is:

Python 3.9.10 | packaged by conda-forge | (main, Feb  1 2022, 21:28:27)
[Clang 11.1.0 ]
wx.version: 4.1.1 osx-cocoa (phoenix) wxWidgets 3.1.5
07:11:47 AM: Page Changing From 0 To 1
07:11:47 AM: Page Changed To 1
07:11:49 AM: Page Changing From 1 To 0
07:11:49 AM: Page Changed To 0
2022-03-06 07:11:49.887 python[7399:2003394] 'FlatNotebook' is not a valid UTI string.  Cannot use an invalid UTI as a type returned from -writeableTypesForPasteboard: in class wxPasteBoardWriter.
Fatal Python error: PyGILState_Release: thread state 0x7fe64b8044d0 must be current when releasing
Python runtime state: initialized

Current thread 0x0000000204dc1600 (most recent call first):
  File "/Users/Newville/xraylarch/lib/python3.9/site-packages/wx/lib/agw/flatnotebook.py", line 5843 in OnMouseMove
  File "/Users/Newville/xraylarch/lib/python3.9/site-packages/wx/core.py", line 2237 in MainLoop
  File "/Users/Newville/Codes/wxpython_demo/4.1.0/demo/run.py", line 163 in main
  File "/Users/Newville/Codes/wxpython_demo/4.1.0/demo/agw/FlatNotebook.py", line 993 in <module>
/Users/Newville/xraylarch/bin/pythonw: line 3:  7399 Abort trap: 6           /Users/Newville/xraylarch/python.app/Contents/MacOS/python "$@"

with a MacOS crash report for Python3.9 of

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               python3.9 [7238]
Path:                  /Users/USER/*/python.app/Contents/MacOS/python
Identifier:            python3.9
Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        Exited process [7237]
Responsible:           iTerm2 [2229]
User ID:               501

Date/Time:             2022-03-06 07:08:42.6341 -0600
OS Version:            macOS 12.2.1 (21D62)
Report Version:        12
Anonymous UUID:        C346B56C-25D1-F9B6-8621-9CF7B31D4517

Sleep/Wake UUID:       B6FA30D7-14DA-4B7E-87F9-7482F19C0655

Time Awake Since Boot: 310000 seconds
Time Since Wake:       1303 seconds

System Integrity Protection: enabled

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:
abort() called


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   ???                           	    0x7ff8b0502940 ???
1   libsystem_kernel.dylib        	    0x7ff81ff3c112 __pthread_kill + 10
2   libsystem_c.dylib             	    0x7ff81febed10 abort + 123
3   python3.9                     	       0x104cc47dd fatal_error_exit + 13
4   python3.9                     	       0x104cc4693 fatal_error + 51
5   python3.9                     	       0x104cc5b58 _Py_FatalErrorFormat + 280
6   python3.9                     	       0x104cc8781 PyGILState_Release + 257
7   _core.cpython-39-darwin.so    	       0x170d23599 wxPyCallback::EventThunker(wxEvent&) + 553
8   libwx_baseu-3.1.5.0.0.dylib   	       0x112362fed wxEvtHandler::SearchDynamicEventTable(wxEvent&) + 301
9   libwx_baseu-3.1.5.0.0.dylib   	       0x112362d0b wxEvtHandler::ProcessEventLocally(wxEvent&) + 59
10  libwx_baseu-3.1.5.0.0.dylib   	       0x112362bc0 wxEvtHandler::ProcessEvent(wxEvent&) + 96
11  _core.cpython-39-darwin.so    	       0x170ec0409 sipwxPanel::ProcessEvent(wxEvent&) + 121
12  libwx_baseu-3.1.5.0.0.dylib   	       0x1123632dc wxEvtHandler::SafelyProcessEvent(wxEvent&) + 12
13  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x1113db35c wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent*) + 172
14  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x1113d081c wxWidgetCocoaImpl::mouseEvent(NSEvent*, NSView*, void*) + 236
15  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x1113cf0a6 wxOSX_mouseEvent(NSView*, objc_selector*, NSEvent*) + 118
16  AppKit                        	    0x7ff822b00568 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 7150
17  AppKit                        	    0x7ff822afe75a -[NSWindow(NSEventRouting) sendEvent:] + 352
18  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x1113ac0b9 -[wxNSWindow sendEvent:] + 233
19  AppKit                        	    0x7ff822afcb28 -[NSApplication(NSEvent) sendEvent:] + 352
20  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x1112cf31a -[wxNSApplication sendEvent:] + 170
21  AppKit                        	    0x7ff822db61a7 -[NSApplication _handleEvent:] + 65
22  AppKit                        	    0x7ff82297d93e -[NSApplication run] + 623
23  libwx_osx_cocoau_core-3.1.5.0.0.dylib	       0x11139a47b wxGUIEventLoop::OSXDoRun() + 171
24  libwx_baseu-3.1.5.0.0.dylib   	       0x112330e4d wxCFEventLoop::DoRun() + 29
25  libwx_baseu-3.1.5.0.0.dylib   	       0x11226ad7e wxEventLoopBase::Run() + 158
26  libwx_baseu-3.1.5.0.0.dylib   	       0x112235933 wxAppConsoleBase::MainLoop() + 99
27  _core.cpython-39-darwin.so    	       0x170f1dfaf meth_wxPyApp_MainLoop(_object*, _object*) + 223
28  python3.9                     	       0x104b8c80a cfunction_call + 90
29  python3.9                     	       0x104b2a126 _PyObject_MakeTpCall + 134
30  python3.9                     	       0x104c66a93 call_function + 323
31  python3.9                     	       0x104c644e4 _PyEval_EvalFrameDefault + 44596
32  python3.9                     	       0x104b2b4c2 _PyFunction_Vectorcall + 242
33  python3.9                     	       0x104c669ff call_function + 175
34  python3.9                     	       0x104c64442 _PyEval_EvalFrameDefault + 44434
35  python3.9                     	       0x104b2b4c2 _PyFunction_Vectorcall + 242
36  python3.9                     	       0x104d5333b atexit_callfuncs + 139
37  python3.9                     	       0x104cc4fd9 Py_FinalizeEx + 73
38  python3.9                     	       0x104cf469a Py_RunMain + 42
39  python3.9                     	       0x104cf5e01 pymain_main + 49
40  python3.9                     	       0x104ab9f58 main + 56
41  dyld                          	       0x204f264fe start + 462

Thread 1:: com.apple.rosetta.exceptionserver
0   runtime                       	    0x7ff7ffd638e4 0x7ff7ffd5f000 + 18660
1   runtime                       	    0x7ff7ffd70928 0x7ff7ffd5f000 + 71976
2   runtime                       	    0x7ff7ffd720a4 0x7ff7ffd5f000 + 77988

Thread 2:
0   ???                           	    0x7ff8b0502940 ???
1   libsystem_kernel.dylib        	    0x7ff81ff38506 __psynch_cvwait + 10
2   libomp.dylib                  	       0x10df3a0db void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 299
3   libomp.dylib                  	       0x10df1cfa7 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1655
4   libomp.dylib                  	       0x10df18dd6 __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 166
5   libomp.dylib                  	       0x10df1c57d __kmp_fork_barrier(int, int) + 445
6   libomp.dylib                  	       0x10def725a __kmp_launch_thread + 330
7   libomp.dylib                  	       0x10df3894a __kmp_launch_worker(void*) + 330
8   libsystem_pthread.dylib       	    0x7ff81ff724f4 _pthread_start + 125
9   libsystem_pthread.dylib       	    0x7ff81ff6e00f thread_start + 15

Thread 3:
0   ???                           	    0x7ff8b0502940 ???
1   libsystem_kernel.dylib        	    0x7ff81ff38506 __psynch_cvwait + 10
2   libomp.dylib                  	       0x10df3a0db void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 299
3   libomp.dylib                  	       0x10df1cfa7 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1655
4   libomp.dylib                  	       0x10df18dd6 __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 166
5   libomp.dylib                  	       0x10df1c57d __kmp_fork_barrier(int, int) + 445
6   libomp.dylib                  	       0x10def725a __kmp_launch_thread + 330
7   libomp.dylib                  	       0x10df3894a __kmp_launch_worker(void*) + 330
8   libsystem_pthread.dylib       	    0x7ff81ff724f4 _pthread_start + 125
9   libsystem_pthread.dylib       	    0x7ff81ff6e00f thread_start + 15

Thread 4:: com.apple.NSEventThread
0   ???                           	    0x7ff8b0502940 ???
1   libsystem_kernel.dylib        	    0x7ff81ff35aba mach_msg_trap + 10
2   CoreFoundation                	    0x7ff820038df1 __CFRunLoopServiceMachPort + 319
3   CoreFoundation                	    0x7ff8200374af __CFRunLoopRun + 1329
4   CoreFoundation                	    0x7ff8200368a9 CFRunLoopRunSpecific + 567
5   AppKit                        	    0x7ff822afafd8 _NSEventThread + 132
6   libsystem_pthread.dylib       	    0x7ff81ff724f4 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff81ff6e00f thread_start + 15

Thread 5:
0   runtime                       	    0x7ff7ffd81814 0x7ff7ffd5f000 + 141332

Thread 6:
0   runtime                       	    0x7ff7ffd81814 0x7ff7ffd5f000 + 141332

Thread 7:
0   runtime                       	    0x7ff7ffd81814 0x7ff7ffd5f000 + 141332


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000003  rbp: 0xcccccccccccccccd  rsp: 0x0000000000000002
   r8: 0x0000000204fa1600   r9: 0xcccccccccccccccd  r10: 0x0000000000000000  r11: 0x00007ff861728810
  r12: 0x0000000000000103  r13: 0x0000000000000000  r14: 0x0000000000000006  r15: 0x0000000000000016
  rip: <unavailable>       rfl: 0x0000000000000283
 tmp0: 0xffffffffffffffff tmp1: 0x00007ff8b0502914 tmp2: 0x00007ff81ff3c108


Binary Images:
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
    0x7ff81ff35000 -     0x7ff81ff6bfff libsystem_kernel.dylib (*) <c1d58a50-5a4d-3bcb-a1fc-ec0902ce34d3> /usr/lib/system/libsystem_kernel.dylib
    0x7ff81fe3d000 -     0x7ff81fec5fff libsystem_c.dylib (*) <4b160c81-ec52-3243-aaba-49f719bbf617> /usr/lib/system/libsystem_c.dylib
       0x104ab8000 -        0x104e18fff python3.9 (*) <d498ce4a-2c33-3fcb-9250-a903314aad01> /Users/USER/*/python3.9
       0x170beb000 -        0x1712bcfff _core.cpython-39-darwin.so (*) <34fd6b93-1b09-33a2-967b-9b7e95d0601c> /Users/USER/*/_core.cpython-39-darwin.so
       0x11222e000 -        0x1123c1fff libwx_baseu-3.1.5.0.0.dylib (*) <d82bcc79-bafb-39ad-956c-896c0914f72d> /Users/USER/*/libwx_baseu-3.1.5.0.0.dylib
       0x1112b8000 -        0x111741fff libwx_osx_cocoau_core-3.1.5.0.0.dylib (*) <80b3b722-5b0e-3932-b8a0-57981920d7f0> /Users/USER/*/libwx_osx_cocoau_core-3.1.5.0.0.dylib
    0x7ff82294e000 -     0x7ff8237dffff com.apple.AppKit (6.9) <9d3ab204-4858-3120-b002-5c38b02edec4> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x204f21000 -        0x204f8cfff dyld (*) <7de33963-bbc5-3996-ba6e-f1d562c17c95> /usr/lib/dyld
    0x7ff7ffd5f000 -     0x7ff7ffd8efff runtime (*) <faca02c7-0a4c-3629-a746-55ddcfee9116> /usr/libexec/rosetta/runtime
       0x10ded6000 -        0x10df5cfff libomp.dylib (*) <c961d041-8b0d-3003-97e5-388f5d757642> /Users/USER/*/libomp.dylib
    0x7ff81ff6c000 -     0x7ff81ff77fff libsystem_pthread.dylib (*) <ee564342-d8f2-396d-b642-40092cf34d82> /usr/lib/system/libsystem_pthread.dylib
    0x7ff81ffb9000 -     0x7ff8204b9fff com.apple.CoreFoundation (6.9) <1d1db08b-810c-316e-b9d9-eecdff8ee6e3> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=3.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=3.3G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               128K        1 
Activity Tracing                   256K        1 
CG backing stores                 4864K        4 
CG image                           188K       26 
CG raster data                    4104K        3 
ColorSync                          232K       26 
CoreAnimation                       40K        3 
CoreGraphics                         4K        1 
CoreUI image data                  308K        4 
Foundation                          16K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           303.6M       59 
MALLOC guard page                  192K       10 
MALLOC_MEDIUM (reserved)           1.1G        9         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
Rosetta Arena                     4096K        2 
Rosetta Generic                    808K      199 
Rosetta JIT                      128.0M        1 
Rosetta Return Stack               100K       10 
Rosetta Thread Context             120K       12 
STACK GUARD                         12K        3 
Stack                             34.1M        7 
Stack Guard                         28K        4 
VM_ALLOCATE                      419.3M      209 
VM_ALLOCATE (reserved)             1.0G       20         reserved VM address space (unallocated)
__DATA                            25.4M      470 
__DATA_CONST                      20.6M      220 
__DATA_DIRTY                       985K      134 
__FONT_DATA                          4K        1 
__LINKEDIT                       712.4M       91 
__OBJC_RO                         81.8M        1 
__OBJC_RW                         3136K        2 
__TEXT                           457.0M      467 
__UNICODE                          588K        1 
dyld private memory               1024K        1 
mapped file                        5.1G      735 
shared memory                      800K       14 
unshared pmap                     9552K        6 
===========                     =======  ======= 
TOTAL                              9.7G     2760 
TOTAL, minus reserved VM space     7.2G     2760 



-----------
Full Report
-----------

{"app_name":"python3.9","timestamp":"2022-03-06 07:08:44.00 -0600","app_version":"","slice_uuid":"d498ce4a-2c33-3fcb-9250-a903314aad01","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.2.1 (21D62)","incident_id":"D61DB11A-E917-43A9-9E28-D34D8B41F2CE","name":"python3.9"}
{
  "uptime" : 310000,
  "procLaunch" : "2022-03-06 07:02:44.2421 -0600",
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,4",
  "procStartAbsTime" : 7584517728419,
  "coalitionID" : 1406,
  "osVersion" : {
    "train" : "macOS 12.2.1",
    "build" : "21D62",
    "releaseType" : "User"
  },
  "captureTime" : "2022-03-06 07:08:42.6341 -0600",
  "incident" : "D61DB11A-E917-43A9-9E28-D34D8B41F2CE",
  "bug_type" : "309",
  "pid" : 7238,
  "procExitAbsTime" : 7593116599627,
  "translated" : true,
  "cpuType" : "X86-64",
  "procName" : "python3.9",
  "procPath" : "\/Users\/USER\/*\/python.app\/Contents\/MacOS\/python",
  "parentProc" : "Exited process",
  "parentPid" : 7237,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "C346B56C-25D1-F9B6-8621-9CF7B31D4517",
  "responsiblePid" : 2229,
  "responsibleProc" : "iTerm2",
  "wakeTime" : 1303,
  "sleepWakeUUID" : "B6FA30D7-14DA-4B7E-87F9-7482F19C0655",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "asi" : {"libsystem_c.dylib":["abort() called"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":1999515,"threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":14757395258967641293},"r12":{"value":259},"rosetta":{"tmp2":{"value":140703664685320},"tmp1":{"value":140706086660372},"tmp0":{"value":18446744073709551615}},"rbx":{"value":0},"r8":{"value":8673433088,"symbolLocation":0,"symbol":"_main_thread"},"r15":{"value":22},"r10":{"value":0},"rdx":{"value":0},"rdi":{"value":0},"r9":{"value":14757395258967641293},"r13":{"value":0},"rflags":{"value":643},"rax":{"value":0},"rsp":{"value":2},"r11":{"value":140704763512848,"symbolLocation":448,"symbol":"__sFX"},"rcx":{"value":0},"r14":{"value":6},"rsi":{"value":3}},"queue":"com.apple.main-thread","frames":[{"imageOffset":140706086660416,"imageIndex":0},{"imageOffset":28946,"symbol":"__pthread_kill","symbolLocation":10,"imageIndex":1},{"imageOffset":531728,"symbol":"abort","symbolLocation":123,"imageIndex":2},{"imageOffset":2148317,"symbol":"fatal_error_exit","symbolLocation":13,"imageIndex":3},{"imageOffset":2147987,"symbol":"fatal_error","symbolLocation":51,"imageIndex":3},{"imageOffset":2153304,"symbol":"_Py_FatalErrorFormat","symbolLocation":280,"imageIndex":3},{"imageOffset":2164609,"symbol":"PyGILState_Release","symbolLocation":257,"imageIndex":3},{"imageOffset":1279385,"symbol":"wxPyCallback::EventThunker(wxEvent&)","symbolLocation":553,"imageIndex":4},{"imageOffset":1265645,"symbol":"wxEvtHandler::SearchDynamicEventTable(wxEvent&)","symbolLocation":301,"imageIndex":5},{"imageOffset":1264907,"symbol":"wxEvtHandler::ProcessEventLocally(wxEvent&)","symbolLocation":59,"imageIndex":5},{"imageOffset":1264576,"symbol":"wxEvtHandler::ProcessEvent(wxEvent&)","symbolLocation":96,"imageIndex":5},{"imageOffset":2970633,"symbol":"sipwxPanel::ProcessEvent(wxEvent&)","symbolLocation":121,"imageIndex":4},{"imageOffset":1266396,"symbol":"wxEvtHandler::SafelyProcessEvent(wxEvent&)","symbolLocation":12,"imageIndex":5},{"imageOffset":1192796,"symbol":"wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent*)","symbolLocation":172,"imageIndex":6},{"imageOffset":1148956,"symbol":"wxWidgetCocoaImpl::mouseEvent(NSEvent*, NSView*, void*)","symbolLocation":236,"imageIndex":6},{"imageOffset":1142950,"symbol":"wxOSX_mouseEvent(NSView*, objc_selector*, NSEvent*)","symbolLocation":118,"imageIndex":6},{"imageOffset":1779048,"symbol":"-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]","symbolLocation":7150,"imageIndex":7},{"imageOffset":1771354,"symbol":"-[NSWindow(NSEventRouting) sendEvent:]","symbolLocation":352,"imageIndex":7},{"imageOffset":999609,"symbol":"-[wxNSWindow sendEvent:]","symbolLocation":233,"imageIndex":6},{"imageOffset":1764136,"symbol":"-[NSApplication(NSEvent) sendEvent:]","symbolLocation":352,"imageIndex":7},{"imageOffset":95002,"symbol":"-[wxNSApplication sendEvent:]","symbolLocation":170,"imageIndex":6},{"imageOffset":4620711,"symbol":"-[NSApplication _handleEvent:]","symbolLocation":65,"imageIndex":7},{"imageOffset":194878,"symbol":"-[NSApplication run]","symbolLocation":623,"imageIndex":7},{"imageOffset":926843,"symbol":"wxGUIEventLoop::OSXDoRun()","symbolLocation":171,"imageIndex":6},{"imageOffset":1060429,"symbol":"wxCFEventLoop::DoRun()","symbolLocation":29,"imageIndex":5},{"imageOffset":249214,"symbol":"wxEventLoopBase::Run()","symbolLocation":158,"imageIndex":5},{"imageOffset":31027,"symbol":"wxAppConsoleBase::MainLoop()","symbolLocation":99,"imageIndex":5},{"imageOffset":3354543,"symbol":"meth_wxPyApp_MainLoop(_object*, _object*)","symbolLocation":223,"imageIndex":4},{"imageOffset":870410,"symbol":"cfunction_call","symbolLocation":90,"imageIndex":3},{"imageOffset":467238,"symbol":"_PyObject_MakeTpCall","symbolLocation":134,"imageIndex":3},{"imageOffset":1763987,"symbol":"call_function","symbolLocation":323,"imageIndex":3},{"imageOffset":1754340,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":44596,"imageIndex":3},{"imageOffset":472258,"symbol":"_PyFunction_Vectorcall","symbolLocation":242,"imageIndex":3},{"imageOffset":1763839,"symbol":"call_function","symbolLocation":175,"imageIndex":3},{"imageOffset":1754178,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":44434,"imageIndex":3},{"imageOffset":472258,"symbol":"_PyFunction_Vectorcall","symbolLocation":242,"imageIndex":3},{"imageOffset":2732859,"symbol":"atexit_callfuncs","symbolLocation":139,"imageIndex":3},{"imageOffset":2150361,"symbol":"Py_FinalizeEx","symbolLocation":73,"imageIndex":3},{"imageOffset":2344602,"symbol":"Py_RunMain","symbolLocation":42,"imageIndex":3},{"imageOffset":2350593,"symbol":"pymain_main","symbolLocation":49,"imageIndex":3},{"imageOffset":8024,"symbol":"main","symbolLocation":56,"imageIndex":3},{"imageOffset":21758,"symbol":"start","symbolLocation":462,"imageIndex":8}]},{"id":1999518,"name":"com.apple.rosetta.exceptionserver","frames":[{"imageOffset":18660,"imageIndex":9},{"imageOffset":71976,"imageIndex":9},{"imageOffset":77988,"imageIndex":9}]},{"id":1999519,"frames":[{"imageOffset":140706086660416,"imageIndex":0},{"imageOffset":13574,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":1},{"imageOffset":409819,"symbol":"void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*)","symbolLocation":299,"imageIndex":10},{"imageOffset":290727,"symbol":"kmp_flag_64<false, true>::wait(kmp_info*, int, void*)","symbolLocation":1655,"imageIndex":10},{"imageOffset":273878,"symbol":"__kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*)","symbolLocation":166,"imageIndex":10},{"imageOffset":288125,"symbol":"__kmp_fork_barrier(int, int)","symbolLocation":445,"imageIndex":10},{"imageOffset":135770,"symbol":"__kmp_launch_thread","symbolLocation":330,"imageIndex":10},{"imageOffset":403786,"symbol":"__kmp_launch_worker(void*)","symbolLocation":330,"imageIndex":10},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":11},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":11}]},{"id":1999520,"frames":[{"imageOffset":140706086660416,"imageIndex":0},{"imageOffset":13574,"symbol":"__psynch_cvwait","symbolLocation":10,"imageIndex":1},{"imageOffset":409819,"symbol":"void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*)","symbolLocation":299,"imageIndex":10},{"imageOffset":290727,"symbol":"kmp_flag_64<false, true>::wait(kmp_info*, int, void*)","symbolLocation":1655,"imageIndex":10},{"imageOffset":273878,"symbol":"__kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*)","symbolLocation":166,"imageIndex":10},{"imageOffset":288125,"symbol":"__kmp_fork_barrier(int, int)","symbolLocation":445,"imageIndex":10},{"imageOffset":135770,"symbol":"__kmp_launch_thread","symbolLocation":330,"imageIndex":10},{"imageOffset":403786,"symbol":"__kmp_launch_worker(void*)","symbolLocation":330,"imageIndex":10},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":11},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":11}]},{"id":1999530,"name":"com.apple.NSEventThread","frames":[{"imageOffset":140706086660416,"imageIndex":0},{"imageOffset":2746,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":1},{"imageOffset":523761,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":12},{"imageOffset":517295,"symbol":"__CFRunLoopRun","symbolLocation":1329,"imageIndex":12},{"imageOffset":514217,"symbol":"CFRunLoopRunSpecific","symbolLocation":567,"imageIndex":12},{"imageOffset":1757144,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":7},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":11},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":11}]},{"id":2001670,"frames":[{"imageOffset":141332,"imageIndex":9}]},{"id":2001671,"frames":[{"imageOffset":141332,"imageIndex":9}]},{"id":2001672,"frames":[{"imageOffset":141332,"imageIndex":9}]}],
  "usedImages" : [
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703664656384,
    "size" : 225280,
    "uuid" : "c1d58a50-5a4d-3bcb-a1fc-ec0902ce34d3",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703663640576,
    "size" : 561152,
    "uuid" : "4b160c81-ec52-3243-aaba-49f719bbf617",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4373315584,
    "size" : 3543040,
    "uuid" : "d498ce4a-2c33-3fcb-9250-a903314aad01",
    "path" : "\/Users\/USER\/*\/python3.9",
    "name" : "python3.9"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 6186512384,
    "size" : 7151616,
    "uuid" : "34fd6b93-1b09-33a2-967b-9b7e95d0601c",
    "path" : "\/Users\/USER\/*\/_core.cpython-39-darwin.so",
    "name" : "_core.cpython-39-darwin.so"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4599242752,
    "size" : 1654784,
    "uuid" : "d82bcc79-bafb-39ad-956c-896c0914f72d",
    "path" : "\/Users\/USER\/*\/libwx_baseu-3.1.5.0.0.dylib",
    "name" : "libwx_baseu-3.1.5.0.0.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4583030784,
    "size" : 4759552,
    "uuid" : "80b3b722-5b0e-3932-b8a0-57981920d7f0",
    "path" : "\/Users\/USER\/*\/libwx_osx_cocoau_core-3.1.5.0.0.dylib",
    "name" : "libwx_osx_cocoau_core-3.1.5.0.0.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703708798976,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15278080,
    "uuid" : "9d3ab204-4858-3120-b002-5c38b02edec4",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2113.30.116"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 8672907264,
    "size" : 442368,
    "uuid" : "7de33963-bbc5-3996-ba6e-f1d562c17c95",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 140703125860352,
    "size" : 196608,
    "uuid" : "faca02c7-0a4c-3629-a746-55ddcfee9116",
    "path" : "\/usr\/libexec\/rosetta\/runtime",
    "name" : "runtime"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4528627712,
    "size" : 552960,
    "uuid" : "c961d041-8b0d-3003-97e5-388f5d757642",
    "path" : "\/Users\/USER\/*\/libomp.dylib",
    "name" : "libomp.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703664881664,
    "size" : 49152,
    "uuid" : "ee564342-d8f2-396d-b642-40092cf34d82",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703665197056,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5246976,
    "uuid" : "1d1db08b-810c-316e-b9d9-eecdff8ee6e3",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1856.107"
  }
],
  "sharedCache" : {
  "base" : 140703661637632,
  "size" : 15218196480,
  "uuid" : "5c9ff5db-8827-329a-8a37-2483935a9ea1"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=3.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=3.3G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nCG backing stores                 4864K        4 \nCG image                           188K       26 \nCG raster data                    4104K        3 \nColorSync                          232K       26 \nCoreAnimation                       40K        3 \nCoreGraphics                         4K        1 \nCoreUI image data                  308K        4 \nFoundation                          16K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           303.6M       59 \nMALLOC guard page                  192K       10 \nMALLOC_MEDIUM (reserved)           1.1G        9         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nRosetta Arena                     4096K        2 \nRosetta Generic                    808K      199 \nRosetta JIT                      128.0M        1 \nRosetta Return Stack               100K       10 \nRosetta Thread Context             120K       12 \nSTACK GUARD                         12K        3 \nStack                             34.1M        7 \nStack Guard                         28K        4 \nVM_ALLOCATE                      419.3M      209 \nVM_ALLOCATE (reserved)             1.0G       20         reserved VM address space (unallocated)\n__DATA                            25.4M      470 \n__DATA_CONST                      20.6M      220 \n__DATA_DIRTY                       985K      134 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       712.4M       91 \n__OBJC_RO                         81.8M        1 \n__OBJC_RW                         3136K        2 \n__TEXT                           457.0M      467 \n__UNICODE                          588K        1 \ndyld private memory               1024K        1 \nmapped file                        5.1G      735 \nshared memory                      800K       14 \nunshared pmap                     9552K        6 \n===========                     =======  ======= \nTOTAL                              9.7G     2760 \nTOTAL, minus reserved VM space     7.2G     2760 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
      },
      "deploymentId" : 240000066
    },
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "602ad4dac86151000cf27e46",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "61fb0e87c773c43cde3bb80e"
      },
      "deploymentId" : 240000303
    },
    {
      "rolloutId" : "5ffde50ce2aacd000d47a95f",
      "factorPackIds" : {

      },
      "deploymentId" : 240000115
    },
    {
      "rolloutId" : "601d9415f79519000ccd4b69",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "621d4d11f441df278b2334c9"
      },
      "deploymentId" : 240000409
    },
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 240000263
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro18,4, BootROM 7429.81.3, proc 10:8:2 processors, 32 GB, SMC 
Graphics: Apple M1 Max, Apple M1 Max, Built-In
Display: Color LCD, 3024 x 1964 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Dec 13 2021 17:12:34 version 20.10.853.31.8.7.109 FWID 01-804e92d8
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

newville avatar Mar 06 '22 13:03 newville

update: following the code, it definitely appears to be in the "drag events" section, and seems to be avoidable with using the FNB_NODRAG style option.

newville avatar Mar 06 '22 13:03 newville

This issue has been mentioned on Discuss wxPython. There might be relevant details there:

https://discuss.wxpython.org/t/flatnotebook-crashing-application-when-drag-tabs-on-an-osx-m1-machine/35815/2

RobinD42 avatar Mar 06 '22 15:03 RobinD42

@RobinD42 Thanks. Yes, I agree it is the same issue. A little more exploring:

The "invalid UTI" message goes away if wx.CustomDataObject(wx.DataFormat(six.u('FlatNotebook'))) is replaced with wx.CustomDataObject(wx.DataFormat(six.u('wx.FlatNotebook'))) - the category.thing syntax seems to be enforced.

But, replacing that still leads to a segfault.

FWIW, it looks like the code in the master branch (https://github.com/wxWidgets/Phoenix/blob/master/wx/lib/agw/flatnotebook.py) will have the same issue.

newville avatar Mar 06 '22 15:03 newville