#1725 closed defect (fixed)
Crash on macOS 10.13.2 (17C88)
Reported by: | Ray Donnelly | Owned by: | Ray Donnelly |
---|---|---|---|
Priority: | major | Milestone: | 2.2 |
Component: | keyboard | Version: | 2.2.x |
Keywords: | macos darwin segfault 11 | Cc: |
Description
Hi Antoine,
This one's a bit tricky to track down. I'd really appreciate it if you could bundle the .py files with the releases, then I feel I could be more helpful.
Seems I'm getting a crash somewhere in the darwin initialization, likely keyboard related?
Anyway, here's as much debugging as I managed:
import xpra.platform.darwin.osx_menu # precompiled from /Applications/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/osx_menu.pyc xpra.platform.keyboard 2017-12-17 20:28:13,658 KeyboardHelper((<bound method XpraClient.send of gtk2.client>, True, ['Control+Menu:toggle_keyboard_grab', 'Shift+Menu:toggle_pointer_grab', 'Shift+F11:toggle_fullscreen', '#+F1:show_menu', '#+F2:show_start_new_command', '#+F3:show_bug_report', '#+F4:quit', '#+F5:increase_quality', '#+F6:decrease_quality', '#+F7:increase_speed', '#+F8:decrease_speed', '#+F10:magic_key', '#+F11:show_session_info', '#+F12:toggle_debug', '#+plus:scaleup', '#+plusminus:scaleup', '#+minus:scaledown', '#+underscore:scaledown', '#+emdash:scaledown', '#+KP_Add:scaleup', '#+KP_Subtract:scaledown', '#+KP_Multiply:scalereset', '#+bar:scalereset', '#+question:scalingoff', '#+degree:scalereset'], False, None, None, None, None, None)) keyboard=<xpra.platform.darwin.keyboard.Keyboard object at 0x10ee8e250> 2017-12-17 20:28:13.658721+0000 Xpra[2632:22096] [general] Failed to set up CFPasteboardRef 'DefaultAsciiKeyboardLayoutPasteboard'. Error: <error: 0x7fffa1006d50> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffa1006ff8> { length = 18, contents = "Connection invalid" } } 2017-12-17 20:28:13.658775+0000 Xpra[2632:22111] [general] Connection to 'pboard' server had an error: <error: 0x7fffa1006d50> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffa1006ff8> { length = 18, contents = "Connection invalid" } } 2017-12-17 20:28:13.659535+0000 Xpra[2632:22096] [general] Failed to set up CFPasteboardRef 'DefaultAsciiKeyboardLayoutPasteboard'. Error: <error: 0x7fffa1006d50> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffa1006ff8> { length = 18, contents = "Connection invalid" } } 2017-12-17 20:28:13.659599+0000 Xpra[2632:22096] [general] Failed to set up CFPasteboardRef 'AppleEnabledInputSourcesPasteboard'. Error: <error: 0x7fffa1006d50> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffa1006ff8> { length = 18, contents = "Connection invalid" } } 2017-12-17 20:28:13.659716+0000 Xpra[2632:22096] GetInputSourceEnabledPrefs user file path = /var/root/Library/Preferences/com.apple.HIToolbox.plist 2017-12-17 20:28:13.659737+0000 Xpra[2632:22096] GetInputSourceEnabledPrefs effective user id path = 0 2017-12-17 20:28:13.659911+0000 Xpra[2632:22096] GetInputSourceEnabledPrefs user pref content = { AppleCurrentKeyboardLayoutInputSourceID = "com.apple.keylayout.US"; } 2017-12-17 20:28:13.660664+0000 Xpra[2632:22096] [general] Failed to set up CFPasteboardRef 'AppleEnabledInputSourcesPasteboard'. Error: <error: 0x7fffa1006d50> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffa1006ff8> { length = 18, contents = "Connection invalid" } } 2017-12-17 20:28:13,662 get_layout_spec() current_keyboard=com.apple.keylayout.US, code=us 2017-12-17 20:28:13,662 get_layout_spec() other keyboards=( "com.apple.keylayout.US" ) 2017-12-17 20:28:13,663 get_layout_spec() layout=us, layouts=['us'] Process 2632 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50) frame #0: 0x00007fff3df137d7 AppKit`-[NSTextInputContext dealloc] + 243 AppKit`-[NSTextInputContext dealloc]: -> 0x7fff3df137d7 <+243>: testb $0x20, (%rax,%rcx) 0x7fff3df137db <+247>: je 0x7fff3df13802 ; <+286> 0x7fff3df137dd <+249>: movq 0x5c448bf4(%rip), %rdi ; (void *)0x00007fff9a38db80: NSFunctionRowDevice 0x7fff3df137e4 <+256>: movq 0x5c412305(%rip), %rsi ; "removeObserver:forKeyPath:context:" Target 0: (Xpra) stopped.
Change History (10)
comment:1 Changed 3 years ago by
Component: | android → keyboard |
---|---|
Keywords: | macos darwin segfault 11 added |
comment:2 Changed 3 years ago by
comment:3 Changed 3 years ago by
A quicker reproducer is, add this to to bottom of /Applications/Xpra.app/Contents/Resources/lib/python2.7/xpra/platform/darwin/keyboard.py
k = Keyboard() k.get_layout_spec()
then run via:
/Applications/Xpra.app/Contents/MacOS/PythonExecWrapper python /Applications/Xpra.app/Contents/Resources/lib/python2.7/xpra/platform/darwin/keyboard.py
comment:4 Changed 3 years ago by
Owner: | changed from Antoine Martin to Ray Donnelly |
---|
I'd really appreciate it if you could bundle the .py files with the releases, then I feel I could be more helpful.
OK, bundling the source files will be the default in 2.3: r17692.
(the space saving was tiny anyway)
Anyway, here's as much debugging as I managed:
How did you get that? gdb?
I cannot reproduce any kind of crashes.
I have tested this on 10.10, 10.11 and 10.12 only, as I do not have a 10.13 VM to test with.
But based on the stacktrace, I came up with this change: r17693.
There is a new osx beta build, does that fix things?
(this code has not changed at all for a very long time, but maybe the behaviour of the pyobjc bindings has)
If that does not help, what command lines do you use to reproduce the crash?
Have you tried turning off some options? (opengl, clipboard, tray, etc)
Can you try older osx beta 2.2 builds to see when the crash first appears?
Do you also get the crash by running the tool:
/Applications/Xpra.app/Contents/Helpers/Keyboard_info
This ends up calling get_layout_spec
too.
comment:5 Changed 3 years ago by
I'm blaming the update to macOS. I debugged this with lldb and python -v -v -v, changing the the end of /Applications/Xpra.app/Contents/MacOS/PythonExecWrapper
to:
exec lldb -- "$PYTHON" -v -v -v "$@"
comment:6 Changed 3 years ago by
Workaround I am using for now:
def get_layout_spec(self): return 'us', ['us'], "", [], ""
comment:7 Changed 3 years ago by
I tested r17693 and it does indeed fix it. Thank you very much (again).
comment:8 Changed 3 years ago by
Milestone: | → 2.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:10 Changed 3 days ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1725
Oh, lldb bt gives: