SDL3 Access violation writing or memory access issue

From prebuilt and custom build SDL3.dll, when trying to call it with any language
python(ctypes.CDLL), C#(Dllimport), C++(LoadLibrary), when trying to use SDL_GetGamepads or SDL_GetJoysticks, I’m getting a memory access violation:




I’ve tried everything, it doesnt work…

I can’t afford to switch to SDL2 as I found out that using a gamepad/joystick wireless/bluetooth turns off support for it’s rumble/gyro/touchpad under SDL2 and I need it…

Any help would be appreciated, I have no idea why/how this happens, I’ve tried using the library from an already working software too(it successfully uses SDL3 to trigger rumbling for my joystick)

0x00000001 is very close to zero (null) so my guess is that a null pointer is being dereferenced.

Make sure the pointer that you pass to SDL_GetJoysticks is pointing at a valid variable of type int.

1 Like

Thank you, I guess I hadn’t been aware to look out for pointers, I’m a Javascript dev primarily and haven’t had a usage for pointers, only knew they existed, now I know what their definition is, and how to use them with Python’s ctypes when I try to call them. I appreciate it, definitely helped me out, had spent 6-8 hours+ trying to figure it out…