Open kamfretoz opened 3 months ago
I have the same issue on macOS Monterey 12.6.1 / libSDL2-2.0.0.dylib installed with brew
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libSDL2-2.0.0.dylib 0x1054fdd6c hid_report_callback + 104 1 libSDL2-2.0.0.dylib 0x1054fdd5c hid_report_callback + 88 2 IOKit 0x1954ff718 IOHIDDeviceInputReportApplier + 72 3 CoreFoundation 0x192a93860 CFSetApplyFunction_block_invoke + 28 4 CoreFoundation 0x192a93688 CFBasicHashApply + 148 5 CoreFoundation 0x192a935cc CFSetApplyFunction + 328 6 IOKit 0x1954ff608 IOHIDDeviceInputReportWithTimeStampCallback + 140 7 IOHIDLib 0x106d8cec0 0x106d7c000 + 69312 8 CoreFoundation 0x192afd7f4 CFMachPortPerform + 308 9 CoreFoundation 0x192acd818 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60 10 CoreFoundation 0x192acd6d4 CFRunLoopDoSource1 + 604 11 CoreFoundation 0x192acbb68 CFRunLoopRun + 2372 12 CoreFoundation 0x192acaa84 CFRunLoopRunSpecific + 600 13 libSDL2-2.0.0.dylib 0x1054fd2a8 PLATFORM_hid_enumerate + 124 14 libSDL2-2.0.0.dylib 0x1054fea1c SDL_hid_enumerate_REAL + 52 15 libSDL2-2.0.0.dylib 0x1055c612c HIDAPI_UpdateDeviceList + 748 16 libSDL2-2.0.0.dylib 0x1055c662c HIDAPI_IsDevicePresent + 248 17 libSDL2-2.0.0.dylib 0x1055ca728 JoystickDeviceWasAddedCallback + 556 18 IOKit 0x195501b0c IOHIDManagerDeviceApplier + 564 19 CoreFoundation 0x192a93860 CFSetApplyFunction_block_invoke + 28 20 CoreFoundation 0x192a93688 CFBasicHashApply + 148 21 CoreFoundation 0x192a935cc CFSetApplyFunction + 328 22 IOKit 0x1955002f0 ApplyToDevices + 124 23 IOKit 0x195501e8c IOHIDManagerInitialEnumCallback + 48 24 CoreFoundation 0x192accf94 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 25 CoreFoundation 0x192accee0 CFRunLoopDoSource0 + 208 26 CoreFoundation 0x192accbe0 CFRunLoopDoSources0 + 268 27 CoreFoundation 0x192acb560 __CFRunLoopRun + 828 28 CoreFoundation 0x192acaa84 CFRunLoopRunSpecific + 600 29 libSDL2-2.0.0.dylib 0x1055c9c48 DARWIN_JoystickInit + 444 30 libSDL2-2.0.0.dylib 0x10550517c SDL_JoystickInit + 196 31 libSDL2-2.0.0.dylib 0x1054d3dcc SDL_InitSubSystem_REAL + 400 32 joystick.cpython-313-darwin.so 0x104d5e4f0 init + 52 33 Python 0x1050002fc cfunction_vectorcall_NOARGS + 100 34 Python 0x104f97e48 _PyObject_CallNoArgsTstate + 72 35 base.cpython-313-darwin.so 0x1048f49c0 pg_mod_autoinit + 88 36 base.cpython-313-darwin.so 0x1048f6704 pg_init + 208 37 Python 0x1050002fc cfunction_vectorcall_NOARGS + 100 38 Python 0x104f976ec PyObject_Vectorcall + 92 39 Python 0x1050e3a1c _PyEval_EvalFrameDefault + 10036 40 Python 0x1050e104c PyEval_EvalCode + 296 41 Python 0x10515c8f8 run_eval_code_obj + 104 42 Python 0x10515c2e0 run_mod + 172 43 Python 0x10515a4c8 pyrun_file + 164 44 Python 0x10515955c _PyRun_SimpleFileObject + 256 45 Python 0x1051590c0 _PyRun_AnyFileObject + 80 46 Python 0x10518696c pymain_run_file_obj + 164 47 Python 0x105186624 pymain_run_file + 72 48 Python 0x10518578c Py_RunMain + 768 49 Python 0x105185de8 pymain_main + 352 50 Python 0x105185efc Py_BytesMain + 40 51 dyld 0x10492d08c start + 520
Are you also getting this with the SDL3 preview release?
Backstory
A little bit of backstory of how i got here. First of all, do note that i'm running Hackintosh on macOS Ventura 13.6.1 (I hope its still acceptable). I've been using this system to test PCSX2 stuff (I'm part of PCSX2 testers), and noticed that PCSX2 would often times crashes on startup. Me and someone from the team nailed it down to PCSX2 crashing only when the controller i use are connected to the system. We determined it to be an SDL bug with this specific cheap controllers, I'll post more details of it below.
More details
SDL2 version built from the latest commit https://github.com/libsdl-org/SDL/commit/58e179c8b50feff2a321003886f218a7b006c4d0 (as of the time during testing)
CMake Flag:
The crash was reproduced by running
./build/test/testgamecontroller
built with ASANCrash logs was taken with address sanitizer build:
More details on the controller:
The controller itself is nothing more than a cheap Chinese DualShock knockoff controllers.
Pictured below:
Product & Vendor ID: