Changes between Initial Version and Version 10 of Ticket #2753


Ignore:
Timestamp:
Sep 2, 2014, 1:40:49 AM (10 years ago)
Author:
historic_bruno
Comment:

Debugged this a bit with WSDL, CreateWindowExW is failing with ERROR_INVALID_PARAMETER (no, WSDL doesn't bother telling us error codes...) There is a comment a few lines before that I believe explains this:

// ignore failure, which is probably caused by not unregistering the class

It seems RegisterClassW fails and returns 0. To "reuse" the class as the comment explains would require storing it in a global variable or something, and similar to unregister it on shutdown. The official SDL has logic for that.

I made a quick patch to fix this, but there are only more problems. The new window is created and looks ok, but keyboard input stops working and there is a new error on shutdown. There is a global "is_quitting" variable that never gets reset after shutdown, fixing that leads to even stranger errors. There must be some more global state somewhere...

These problems don't occur with Atlas because wxWidgets is responsible for much of the init. Needless to say I like the idea of restarting the engine even less now than I did before :(

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2753 – Description

    initial v10  
    11On Windows, when loading a mod (f.e. the public mod) with the mod selector, pyrogenesis crashes hard when trying to re-create a wsdl window.
    2 
    32'''For players willing to play anyway:''' just select the mod, enable it, use the "Save configuration" button and relaunch 0ad.
    4 
    53Here is a trace: http://pastebin.com/4hgAbThQ
    6 
    74leper would obviously be the most qualified to fix this but I believe historic_bruno has some knowledge about wsdl, so I CC him. I tried to debug that but I'm fairly lost within that low-level code...