Closed psa-jforestier closed 2 years ago
Thanks for opening the issue. We had a few reports of the game no longer working on older Windows versions. Unfortunately, none of the developers uses Windows 7 anymore (it is also no longer supported by Microsoft, I just noticed). So I don't know if and when this will be fixed - it is possible we will just drop support officially, unless someone who knows how to fix this can contribute some code :/
Hello. Thank for your message. It motivates me to try to fix it by myself ;) So I dowloaded VSStudio, VSCode and all the build chain, and watched the video you provided to build on Windows. The problem is somewhere near https://github.com/Wargus/stratagus/blob/cf563a3e0d4e147f73f851c7d91ff746dfad0c09/src/video/sdl.cpp#L284 . On my W7 box, the SHCORE.DLL does not exist and is not loaded so the SetProcessDpiAwareness pointer is undefined, but the program enter in L285 trying to call the undefined function pointer. I iniatialize the pointer to NULL before loading the DLL, and now the program jump to the "Vista" branch.
Now I'm able to launch Stratagus, in Windowed mode, but without OpenGL (or it crashes! ) . Command line is "stratagus.exe -g -W -a -d c:\PathToData.wargus"
I also fixed several strcat() call on a non-intialized buffer, resulting in a crash in https://github.com/Wargus/stratagus/blob/cf563a3e0d4e147f73f851c7d91ff746dfad0c09/gameheaders/stratagus-game-launcher.h#L638 .
I will provide a PR in a few hours.
Fixed
Describe the bug When lauching Wargus.exe (or Debug mode, or Safe graphic mode), a console window pop and close, and the app crash with :
Same with AntiVirus deactivated, and launch in Administrator mode.
To Reproduce
I installed the portable version, extract data from GOG Version (in french), but extract tools said "Detected BNE CD" (selecting install.mpq) . All the extraction worked.
The Wargus.exe never work : it crashes just after poping a console window (I do not have to see if something is written on it). If I launch Wargus.exe from a CMD.EXE command line in the Wargus directory, a window appears saying "wargus could not find its extraction tool.", even with -p -i. If I launch Wargus.exe from a Bash shell located in Wargus directory, a console window appears and close, and the program write "segmentation fault" in the bash console.
Whetever the case is (click on the shortcut, command line start), there is no "crash.dmp" file generated or stdout/stderr.txt file.
I also tested with the no-portable version, and this is the same problem (extraction work, but crash at startup at any mode).
With Stratagus.exe
Launching Stratagus.exe on the portble directory do not display anything (no window appearing), but stdout and stderr file are created, but they are empty. It generates also a crash.dmp (see attached).
Expected behavior Having a crash dump to analyze, or a stderr.txt, or something in the console.
Screenshots and Logs Add screenshots to help explain your problem. If you encountered the issue inside a game, please add the log from the game (find it in "My Documents/Stratagus/wc2/logs" on Windows or "$HOME/.stratagus/wc2/logs" on Linux). Please also attach your stderr and stdout. If you're on Windows, these will be in "My Documents/Stratagus/std*.txt"
Desktop (please complete the following information):