sdl2gdx icon indicating copy to clipboard operation
sdl2gdx copied to clipboard

Random freezes with 1.0.4

Open schleinzer opened this issue 4 years ago • 11 comments

First of all: thanks a lot for your great work, really like the lib!

During my testing I encounter frequent freezes ("application not responding") on Windows. Sometimes the app "unfreezes" after about 30 seconds, sometimes when I stop it using the debugger and resume, but often the freeze persists.

I don't yet have a real clue what's the cause, but I can tell there are no freezes with 1.0.3.

So I post this issue in case other users are looking for the same symptoms and one can see if something's wrong at my side or there is some more serious problem :-)

Thanks again - stay healthy!

schleinzer avatar May 10 '20 15:05 schleinzer

The changes between 1.0.3 and 1.0.4 in order of magnitude:

  • SDL version 2.0.9 to 2.0.12
  • Enable hidapi when compiling SDL
  • Include Jimbly patches by default (because they have now been included in SDL 2.0.13 anyway)
  • Build in release rather than debug mode

So to debug this, I would undo each of these changes one at a time until it works again. Also might be worth trying to use SDL 2.0.10 and SDL 2.0.13.

However I would need a way of reproducing the problem to know if it had been fixed!

One thing you could try is using sdl2gdx release version 1.0.3-jimblyfrom maven. This is 1.0.3 (which apparently works) plus the Jimbly patches. So if this fails to work then it would show the problem is with the patches.

electronstudio avatar May 10 '20 20:05 electronstudio

Thanks a lot for getting back to me so quickly and your very helpful answer :-)

I did a quick test, using 1.0.3-jimbly instead of 1.0.3 and the freezes are back!

Reverting to 1.0.3 and the freezes are gone again :-)

So, it seems, there is a problem with the patches (on my setup)...

schleinzer avatar May 10 '20 20:05 schleinzer

1.0.4 Freezes when the game window is unfocused in my case. Does not occur in 1.0.3

icefill avatar Jun 06 '20 13:06 icefill

I have seen that, but for me it unfreezes after a few seconds when I switch back to the window.

I think the thing to do is put out a v1.0.5 release that is based on the vanilla SDL 2.0.12. See if that works for everyone. If so, then do a v1.0.5-jimbly release that includes the latest patches for those like me that need more than 4 player support.

electronstudio avatar Jun 06 '20 16:06 electronstudio

That would be awesome, thanks for your efforts! (Ever thought about enabling github sponsorship for this project ;-) ?)

schleinzer avatar Jun 06 '20 17:06 schleinzer

2.0.14 is out and includes the raw support from jimbly and is (i assume) stable, so hopefully we can now do a release based on that which will please everyone.

electronstudio avatar Jan 08 '21 13:01 electronstudio

Any news about new release?

morvael avatar Aug 30 '21 08:08 morvael

@morvael Check if official gdx-controllers solve your problems. If not, open an issue there.

MrStahlfelge avatar Aug 30 '21 08:08 MrStahlfelge

My project is not using LibGDX (not directly at least). So the version pulled from dependencies is 1.9.9, quite a bit behind the version on the linked page.

morvael avatar Aug 30 '21 09:08 morvael

Basially the GDX people took an old, inferior version of this project, forked it without telling me, and incorporated into gdx-controllers. After that I lost motivation to work on this entirely for the benefit of other people for free. Will probably return to it if I need it for myself for eventually. Until then you may as well use gdx-controllers.

electronstudio avatar Aug 30 '21 09:08 electronstudio

Meanwhile I got completely lost between JInput, 2 versions of Jamepad, sdl2gdx, and gdx-controllers with or without the rest of gdx...

morvael avatar Aug 30 '21 16:08 morvael