Forum

Stride InputManager (SDL GameController) Crash - Gamma 2021.3.3

The following seems to be a reliable way to crash the editor (Gamma 2021.3.3) on my machine:

  1. Have a game controller connected. I have a Sony DS4 connected to USB.
  2. New sketch, place a RenderWindow and an InputManager
  3. Stop (F8)
  4. Run (F5)
  5. Stop - Crashes here for me.

This seems to only happen when a controller is attached. It crashes next time the sketch is stopped if a controller has been “hotplugged”.

I wrapped SDL’s game controller input stuff for Java and was having similar crashes I think. It was my first attempt at wrapping native stuff. My theory was that it was crashing because the DLL / native lib had not been unloaded before restarting. It was difficult to trigger it to unload from the running JVM.