| Summary: | Re-plugging ps4 usb controller crashes SDL | ||
|---|---|---|---|
| Product: | SDL | Reporter: | gccdragoonkain |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, stfx |
| Version: | 2.0.12 | Keywords: | target-2.0.14 |
| Hardware: | x86_64 | ||
| OS: | macOS 10.14 | ||
| Attachments: | screenshot of IDE crash | ||
Can you reproduce this with the latest SDL snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip Thanks! So I recently updated to macOS Catalina recently for work. So my test case recently has changed. I’ll try to reproduce next week! Shoot, I thought we fixed this. I have a Mojave laptop, I'll see if it still reproduces here. --ryan. Sry guys. I haven't been able to reprod since going to latest macOS. I'm gonna ship my game on 2.0.12 with this being a known issue and update to 2.0.14 when it releases. SDL is an amazing library btw. It has been my go-to ever since I moved off of allegro in the early 2000's. 🍻 |
Created attachment 4350 [details] screenshot of IDE crash Steps to reproduce BEFORE app launch Connect ps4 controller to mac via BLUETOOTH Connect A SECOND ps4 controller to mac via USB Launch SDL application Disconnect USB ps4 controller Reconnect USB ps4 controller. Observe crash beneath SDL_PollEvent(&event) call ``` (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00007fff347f62cb CoreFoundation`CFEqual + 659 * frame #1: 0x00007fff3715b3e6 IOKit`IOHIDDeviceUnscheduleFromRunLoop + 22 frame #2: 0x0000000104e29fc1 SDL2`___lldb_unnamed_symbol1801$$SDL2 + 49 frame #3: 0x0000000104e29eb6 SDL2`___lldb_unnamed_symbol1800$$SDL2 + 1094 frame #4: 0x00007fff3715dda6 IOKit`__IOHIDManagerDeviceApplier + 156 frame #5: 0x00007fff371323fd IOKit`__IOHIDManagerDeviceAdded + 339 frame #6: 0x00007fff3712e6ec IOKit`IODispatchCalloutFromCFMessage + 181 frame #7: 0x00007fff3483e46d CoreFoundation`__CFMachPortPerform + 282 frame #8: 0x00007fff3483e347 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41 frame #9: 0x00007fff3483e2a5 CoreFoundation`__CFRunLoopDoSource1 + 527 frame #10: 0x00007fff3482629c CoreFoundation`__CFRunLoopRun + 2524 frame #11: 0x00007fff3482566e CoreFoundation`CFRunLoopRunSpecific + 455 frame #12: 0x0000000104e292d0 SDL2`___lldb_unnamed_symbol1789$$SDL2 + 96 frame #13: 0x0000000104e2f597 SDL2`___lldb_unnamed_symbol1867$$SDL2 + 871 frame #14: 0x0000000104e12228 SDL2`___lldb_unnamed_symbol1555$$SDL2 + 232 frame #15: 0x000000010021558e WarWar`GameLoop::processEvents(this=0x0000000114805a00) at GameLoop.cpp:465:9 frame #16: 0x00000001002154d3 WarWar`GameLoop::run(this=0x0000000114805a00) at GameLoop.cpp:440:12 frame #17: 0x00000001001dbe10 WarWar`main at main.cpp:22:9 frame #18: 0x00007fff607af3d5 libdyld.dylib`start + 1 (lldb) ```