Repository navigation
Closed
Labels
Description
godot2:winit jdm$ lldb target/debug/examples/window
(lldb) target create "target/debug/examples/window"
Current executable set to 'target/debug/examples/window' (x86_64).
(lldb) r
Process 18636 launched: '/Users/jdm/src/winit/target/debug/examples/window' (x86_64)
Awakened
Focused(true)
MouseLeft
Awakened
KeyboardInput(Pressed, 55, Some(LWin))
Process 18636 stopped
* thread #1: tid = 0x47bdc, 0xffffea3effffea3e, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffea3effffea3e)
frame #0: 0xffffea3effffea3e
error: memory read failed for 0xffffea3effffea00
(lldb) bt
* thread #1: tid = 0x47bdc, 0xffffea3effffea3e, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffea3effffea3e)
* frame #0: 0xffffea3effffea3e
frame #1: 0x00007fff8d571043 libunwind.dylib`unwind_phase2_forced + 128
frame #2: 0x00007fff8d570fa4 libunwind.dylib`_Unwind_Resume + 72
frame #3: 0x000000010001554a window`winit::platform::platform::NSEventToEvent(window=0x00007fff5fbff930, nsevent=0x0000000100221050) + 6458 at mod.rs:804
frame #4: 0x00000001000107ae window`winit::platform::platform::{{impl}}::next(self=0x00007fff5fbff7c0) + 846 at mod.rs:254
frame #5: 0x00000001000031bc window`winit::window::{{impl}}::next(self=0x00007fff5fbff7c0) + 44 at window.rs:402
frame #6: 0x000000010000341b window`window::main + 283 at window.rs:14
frame #7: 0x000000010003a53b window`panic_unwind::__rust_maybe_catch_panic + 27 at lib.rs:97
frame #8: 0x0000000100039a07 window`std::rt::lang_start [inlined] std::panicking::try<(),fn()> + 44 at panicking.rs:332
frame #9: 0x00000001000399db window`std::rt::lang_start [inlined] std::panic::catch_unwind<fn(),()> at panic.rs:351
frame #10: 0x00000001000399db window`std::rt::lang_start + 347 at rt.rs:57
frame #11: 0x000000010000379a window`main + 42
frame #12: 0x00007fff94ad75fd libdyld.dylib`start + 1
Reacted by Bo
Activity
jdm commentedon Dec 21, 2016
I'm running 10.9.5 when I see this happen.
mitchmindtree commentedon Dec 22, 2016
Can confirm this also occurs on 10.10.5.
davll commentedon Jan 14, 2017
Can confirm this also occurs on 10.11.6.
Seems that the application received an event from spotlight window and
winit::platform::platform::NSEventToEventfailed to handle it.davll commentedon Jan 14, 2017
Not only spotlight window, but also opening system menu (ex: battery status, wifi menu) will invoke the same segfault.
mitchmindtree commentedon Feb 5, 2017
Ok it seems like this is occurring because the
[NSEvent type]method is returning a value that is not enumerated within theNSEventTypeenum from thecocoa-rscrate. E.g. If you try to debug print the returnedNSEventTypethe app segfaults, however if you first cast it tou64it prints21- a value that is not enumerated in the enum itself. Going to dig further to see if I can find the missing events and add them to the enum upstream.Edit: I should add: Spotlight, wifi menu, battery status, etc all return the mystery
21value.Fix bug where an NSEvent is produced when a user opens spotlight while
mitchmindtree commentedon Feb 5, 2017
I couldn't find any documentation on
NSEventTypevalues of21anywhere so I've added a temporary fix in our event handling in this commit as a part of #132.mitchmindtree commentedon Feb 5, 2017
I've added an issue upstream at servo/cocoa-rs#155.
Fix bug where an NSEvent is produced when a user opens spotlight while
Auto merge of rust-windowing#104 - servo:merge-upstream, r=emilio
fix(windows): fix aero-snap and resizing of borderless window, fixes r…