Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behaviour following 2.05 upgrade #106

HebuSan opened this issue Oct 24, 2016 · 3 comments


Copy link

commented Oct 24, 2016


I am new to SDL, and using your wrapper to port all of lazy foo's tutorial. (Only 28 ported so far).
Obviously will ask for your agreement to publish all of them somewhere once finished.

Started 6 months ago (had to make a break) using your wrapper and SDL 2.0.4 -> Worked perfectly.

Updated this week end with your latest commit and SDL 2.0.5, to put an end to this long break.

Since then, some of the tutorials started crashing without any exception.
"Rollbacking" to SDL 2.0.4 made it work again (even against your latest wrapper).

After somes tests, noticed that ONLY tutorials with "double" Init were crashing, only when using 2.0.5:

Replacing by SDL.SDL_Init(SDL.SDL_INIT_VIDEO) followed by SDL_InitSubSystem(SDL_INIT_JOYSTICK)
-> KO, fails the same way.

Then noticed Output Console was telling: "Module was built without symbols"

Don't know why but went to the project settings, debug section, and checked
"Enable native code debugging"
-> Works perfectly again ! (SDL 2.0.4 does NOT need this to be checked)

Would like to understand where I went wrong.
If it was during compiling your wrapper, then it would not work when I simply replace the 2.0.5 dll by the 2.0.4, right ?

Could you please help me finding out where I went wrong ?

Last point: I thought SDL 2.0.5 was making haptic work again on Xbox Controller.
When I run lazy foo's tutorial 20, haptic is not detected (same with 2.0.4).

Could you just confirm this is still an issue for you as well ?
(I think I saw somewhere (monogame) you made a patch for this))

If you had a way to explain to dummies how to make it work, would gladly be the first one to be helped.

Regards, and thanks for your great work.


This comment has been minimized.

Copy link

commented Oct 24, 2016

SDL.SDL_SetHint(SDL.SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1"); should fix the issue. Be sure to set this before calling SDL_Init().


This comment has been minimized.

Copy link

commented Oct 24, 2016

OMG thank you so much ..... Works perfectly... Lost my last night on this one ... you saved the next one !

Saw this is new to SDL 2.0.5:

Regarding haptic, is it possible for you to confirm if the bug still exist ? (found no one complaining about this with 2.0.5). I simply followed the tutorial, no idea of what could be wrong at the moment...

Thanks again.


This comment has been minimized.

Copy link

commented Oct 24, 2016

1: It's a multi-decade-long struggle with how the Win32 API does thread naming:

That exception gets caught by the Visual Studio debugger and causes everything to silently exit. We keep trying to find new ways to do this, and this was the best we could come up with:

2: The 360 controller works fine as far as I can tell, and Windows support for the Xbox One controller has been extremely poor in the past year, so I couldn't really tell you what the problem is. If you want your controller to work, you're better off just not using Windows anymore, as crazy as that sounds!

But anyway, closing since we figured out the crash. I did add some documentation regarding the debugger exit, though:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.