The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL 1.3 null pointer exception ?
ebyard


Joined: 25 Aug 2010
Posts: 98
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 Sad

Ed
SDL 1.3 null pointer exception ?
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
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 wrote:
Quote:
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 [img][/img]

Ed


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
    -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
ebyard


Joined: 25 Aug 2010
Posts: 98
Thanks Sam, I'll get the fix shortly. The flashing issue is probably down to me!