SDL 1.3 null pointer exception?

Sam/other people

I don’t know how to register bugs in the bugtracker and maybe this needs some thought.

In sdl\src\video\win32\sdl_win32window.c, line 148, we have this statement:

videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));

All my XP systems crash with RegisterTouchWindow having a zero value. I am no expert, but I guess it’s because the systems on which it runs do not have the hardware for multi-touch, which is picked up in the driverdata, and then when this function is called, bang.

If I put a null check around that line, the program runs but all that is displayed on screen is a load of crazy Windows icons (obviously reading from some other area of memory!) and the window buttons on the taskbar flip between each other like crazy, but that’s probably unconnected to this. I’m running latest DirectX version too.

Annoyingly, everything runs fine on any Windows Vista/7 machine :frowning:

Ed

The crash with NULL RegisterTouchWindow is fixed in the repository. I’m not
sure what’s happening with the flashing…On Wed, Jan 5, 2011 at 6:24 AM, ebyard <e_byard at yahoo.co.uk> wrote:

Sam/other people

I don’t know how to register bugs in the bugtracker and maybe this needs
some thought.

In sdl\src\video\win32\sdl_win32window.c, line 148, we have this statement:

videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));

All my XP systems crash with RegisterTouchWindow having a zero value. I am
no expert, but I guess it’s because the systems on which it runs do not have
the hardware for multi-touch, which is picked up in the driverdata, and then
when this function is called, bang.

If I put a null check around that line, the program runs but all that is
displayed on screen is a load of crazy Windows icons (obviously reading from
some other area of memory!) and the window buttons on the taskbar flip
between each other like crazy, but that’s probably unconnected to this. I’m
running latest DirectX version too.

Annoyingly, everything runs fine on any Windows Vista/7 machine [image:
Sad]

Ed


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Thanks Sam, I’ll get the fix shortly. The flashing issue is probably down to me!