Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes python in case of menu changing while it opened by user #50

Open
vladie opened this issue Jan 18, 2016 · 1 comment
Open

crashes python in case of menu changing while it opened by user #50

vladie opened this issue Jan 18, 2016 · 1 comment

Comments

@vladie
Copy link

vladie commented Jan 18, 2016

my application rebuilds menu each two seconds (i need to display some changing progress percentage in first menu item).
this approach works if user didn't open menu by clicking on application in statusbar
but if menu changed while it's opened by user - python crashes with following backtrace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8dc920dd objc_msgSend + 29
1 com.apple.HIToolbox 0x00007fff95bdd8e5 ZN18HIStandardMenuView8DrawSelfEsPK9__HIShapeP9CGContext_block_invoke + 39
2 com.apple.HIToolbox 0x00007fff95bc09c7 HIStandardMenuView::DrawSelf(short, HIShape const, CGContext) + 975
3 com.apple.HIToolbox 0x00007fff95b6057d HIView::DrawCacheOrSelf(short, HIShape const, CGContext) + 343
4 com.apple.HIToolbox 0x00007fff95b603e6 HIView::SendDraw(short, OpaqueGrafPtr
, HIShape const, CGContext) + 382
5 com.apple.HIToolbox 0x00007fff95b5fd42 HIView::RecursiveDrawComposited(HIShape const, HIShape const, unsigned int, HIView, CGContext, unsigned char, double) + 710
6 com.apple.HIToolbox 0x00007fff95b5ffbe HIView::RecursiveDrawComposited(HIShape const, HIShape const, unsigned int, HIView, CGContext, unsigned char, double) + 1346
7 com.apple.HIToolbox 0x00007fff95b5ffbe HIView::RecursiveDrawComposited(HIShape const, HIShape const, unsigned int, HIView, CGContext, unsigned char, double) + 1346
8 com.apple.HIToolbox 0x00007fff95b5ecdb HIView::DrawComposited(short, OpaqueGrafPtr
, HIShape const, unsigned int, HIView, CGContext
) + 965
9 com.apple.HIToolbox 0x00007fff95b5e904 HIView::Render(unsigned int, CGContext_) + 54
10 com.apple.HIToolbox 0x00007fff95b6ca7c FlushWindowObject(WindowData_, void__, unsigned char) + 763
11 com.apple.HIToolbox 0x00007fff95b76114 FlushAllBuffers(CFRunLoopObserver, unsigned long, void*) + 228
12 com.apple.CoreFoundation 0x00007fff8e703127 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
13 com.apple.CoreFoundation 0x00007fff8e703080 CFRunLoopDoObservers + 368
14 com.apple.CoreFoundation 0x00007fff8e6f4bbf CFRunLoopRunSpecific + 271
15 com.apple.HIToolbox 0x00007fff95b6e56f RunCurrentEventLoopInMode + 235
16 com.apple.HIToolbox 0x00007fff95b6e2ea ReceiveNextEventCommon + 431
17 com.apple.HIToolbox 0x00007fff95bc768a AcquireNextEventInMode + 54
18 com.apple.HIToolbox 0x00007fff95bc4e2b IsUserStillTracking(MenuSelectData
, unsigned char
) + 173
19 com.apple.HIToolbox 0x00007fff95bc4a41 TrackMenuCommon(MenuSelectData&, unsigned char
) + 1661
20 com.apple.HIToolbox 0x00007fff95badbf2 PopUpMenuSelectCore(MenuData_, Point, double, Point, unsigned short, unsigned int, Rect const_, unsigned short, unsigned int, Rect const_, Rect const_, CFDictionary const, CFString const, OpaqueMenuRef, unsigned short_) + 1670
21 com.apple.HIToolbox 0x00007fff95bacd74 HandlePopUpMenuSelection8(OpaqueMenuRef, OpaqueEventRef_, unsigned int, Point, unsigned short, unsigned int, Rect const_, unsigned short, Rect const_, Rect const_, CFDictionary const, CFString const, OpaqueMenuRef, unsigned short_) + 633
22 com.apple.HIToolbox 0x00007fff95bac93b _HandlePopUpMenuSelectionWithDictionary + 287
23 com.apple.AppKit 0x00007fff9093c71d _NSSLMPopUpCarbonMenu3 + 5810
24 com.apple.AppKit 0x00007fff9093b059 _NSPopUpCarbonMenu3 + 153
25 com.apple.AppKit 0x00007fff9093afb1 -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 350
26 com.apple.AppKit 0x00007fff90d14448 +[NSStatusBarButtonCell popupStatusBarMenu:inRect:ofView:withEvent:] + 682
27 com.apple.AppKit 0x00007fff90d1387d -[NSStatusBarButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 159
28 com.apple.AppKit 0x00007fff90892366 -[NSControl mouseDown:] + 714
29 com.apple.AppKit 0x00007fff90dfc2dc -[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
30 com.apple.AppKit 0x00007fff9078bc86 -[NSWindow sendEvent:] + 470
31 com.apple.AppKit 0x00007fff90d16dee -[NSStatusBarWindow sendEvent:] + 242
32 com.apple.AppKit 0x00007fff90788212 -[NSApplication sendEvent:] + 2504
33 com.apple.AppKit 0x00007fff906b1b68 -[NSApplication run] + 711
34 libffi.dylib 0x00007fff9b3c5f44 ffi_call_unix64 + 76
35 libffi.dylib 0x00007fff9b3c6781 ffi_call + 853
36 _objc.so 0x0000000109f3dacb PyObjCFFI_Caller + 2321
37 _objc.so 0x0000000109f50a2b 0x109f23000 + 186923
38 org.python.python 0x000000010915c50a PyObject_Call + 99
39 org.python.python 0x00000001091d9399 PyEval_EvalFrameEx + 11795
40 org.python.python 0x00000001091d6352 PyEval_EvalCodeEx + 1409
41 org.python.python 0x00000001091dcbf1 0x109152000 + 568305
42 org.python.python 0x00000001091d99a6 PyEval_EvalFrameEx + 13344
43 org.python.python 0x00000001091d6352 PyEval_EvalCodeEx + 1409
44 org.python.python 0x00000001091dcbf1 0x109152000 + 568305
45 org.python.python 0x00000001091d99a6 PyEval_EvalFrameEx + 13344
46 org.python.python 0x00000001091d6352 PyEval_EvalCodeEx + 1409
47 org.python.python 0x00000001091d5dcb PyEval_EvalCode + 54
48 org.python.python 0x00000001091f600e 0x109152000 + 671758
49 org.python.python 0x00000001091f60b1 PyRun_FileExFlags + 133
50 org.python.python 0x00000001091f5c4e PyRun_SimpleFileExFlags + 769
51 org.python.python 0x0000000109207437 Py_Main + 3051
52 libdyld.dylib 0x00007fff8f0d65c9 start + 1

@vladie
Copy link
Author

vladie commented Jan 18, 2016

ps. i'm clearing menu (with calling Menu.clear()) before rebuilding each time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant