Sdl 1.0.3 win32 bugfix

There was a bug in SDL 1.0.3 which caused stack corruption and a crash
on mouse motion in the Visual C++ release build. This affects all
previous downloads of the Win32 development and runtime for SDL 1.0.3

I uploaded fixed source and binaries - PLEASE GET THEM ASAP:
http://www.devolution.com/~slouken/SDL/download.html

For those who are interested, I defined _TrackMouseEvent() as BOOL,
instead of BOOL WINAPI. This works fine in a debug build, but crashes
with no stacktrace information in a release build. It was complex to
find because the function actually returns okay, and it is the thread
created by the function, inside USER32.DLL, that actually crashes.

Enjoy!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

For those who are interested, I defined _TrackMouseEvent() as BOOL,
instead of BOOL WINAPI. This works fine in a debug build, but crashes
with no stacktrace information in a release build. It was complex to
find because the function actually returns okay, and it is the thread
created by the function, inside USER32.DLL, that actually crashes.

I tracked it for a while then gave up the chase. Nothing worse than bugs
that go away when you turn on the debug … :slight_smile:

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

Sam Lantinga wrote:

For those who are interested, I defined _TrackMouseEvent() as BOOL,
instead of BOOL WINAPI. This works fine in a debug build, but crashes
with no stacktrace information in a release build. It was complex to
find because the function actually returns okay, and it is the thread
created by the function, inside USER32.DLL, that actually crashes.

I tracked it for a while then gave up the chase. Nothing worse than bugs
that go away when you turn on the debug … :slight_smile:

Yep, I got lucky knowing the code worked before I added TrackMouseEvent(),
and remembering that WINAPI actually means something. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

I uploaded fixed source and binaries - PLEASE GET THEM ASAP:
http://www.devolution.com/~slouken/SDL/download.html

Looks like the “SDL-devel-1.0.3-VC++.zip” development runtime still has
the original “1/24/00 9:05 PM” timestamped SDL.dll. The
"SDL-1.0.3-win32.zip" binary runtime is correct (“1/25/00 9:52 AM”).

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

In article ,
slouken at devolution.com says…

Sam Lantinga wrote:

For those who are interested, I defined _TrackMouseEvent() as BOOL,
instead of BOOL WINAPI. This works fine in a debug build, but crashes
with no stacktrace information in a release build. It was complex to
find because the function actually returns okay, and it is the thread
created by the function, inside USER32.DLL, that actually crashes.

I tracked it for a while then gave up the chase. Nothing worse than bugs
that go away when you turn on the debug … :slight_smile:

Yep, I got lucky knowing the code worked before I added TrackMouseEvent(),
and remembering that WINAPI actually means something. :slight_smile:

very excellent sleuthing, and a good pick.

-dv