[Bug 7477] Uplink demo crashes

Wine Bugs wine-bugs at winehq.org
Sun Feb 18 15:25:22 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=7477





------- Additional Comments From focht at gmx.net  2007-18-02 15:25 -------
Created an attachment (id=5009)
 --> (http://bugs.winehq.org/attachment.cgi?id=5009&action=view)
disassembly of app crash code

Hello again,

that was a quick one (as usual).
Looking at exception address (.text:004DAE48) it seems a NULL pointer is
dereferenced after SDL api "SDL_ListModes" call.
SDL_ListModes() is supposed to return an array of supported video modes.
It tries two times but fails (one with hardware surface flags the other one
software modes).

The software itself should check the return value of api calls before blindly
dereferencing it.

---- pseudo code ----

SDL_Rect **modes = SDL_ListModes (NULL, requested_mode_flags_here);
if (modes == NULL)
{
   // no avail
   // shutdown/exit whatever here ...
}
else
{
   // iterate thru, make some use of it
   modes[index]->xxx
}

---- pseudo code ----

So the question remains why SDL returns/reports no available video modes in
wine.
Any takers?


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list