You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off great work. I might actually manage to contribute to a D1 project one of these days.
So I managed to compile and link the project. The first time I run it it crashes on startup (probably not that unexpected). I pull out the debugger and find its crashing engine.cpp line 1950. I put in some break points and find that InitializeCriticalSection is not being run for some reason. The struct at engine.cpp:1915 looks like a valid way of initializing the mutex to me, but for whatever reason isn't being run in my setup.
I moved the initialization function out of the struct and call it from start of WinMain. (Note there is already a proto for the function in engine.h). The game now starts. I start a new single player game, and another crash. This time another EnterCriticalSection but in dx.cpp. Same issue. For now I'm going to consolidate all the pre-main init functions, but do you guys have any insight on why this might be? Could it be being optimized out?
Im using Win7, Msys i686-w64-mingw32 (5.3.0 Rev2) to compile.
The text was updated successfully, but these errors were encountered:
It's definitely compiler related, since everything is executing fine on Mingw32/VC++. Either way, I don't think structs are the proper way to initialize them. As per the TODO: 3000 - Critical sections should be constructors using CCritSect
The PSX symbol file defines this as follows: static CCritSect sgMemCrit;
Which is then used as a constructor in the class. This is likely the same problem I was having with newer versions of Visual Studio. Should get fixed as #13 develops.
First off great work. I might actually manage to contribute to a D1 project one of these days.
So I managed to compile and link the project. The first time I run it it crashes on startup (probably not that unexpected). I pull out the debugger and find its crashing engine.cpp line 1950. I put in some break points and find that InitializeCriticalSection is not being run for some reason. The struct at engine.cpp:1915 looks like a valid way of initializing the mutex to me, but for whatever reason isn't being run in my setup.
I moved the initialization function out of the struct and call it from start of WinMain. (Note there is already a proto for the function in engine.h). The game now starts. I start a new single player game, and another crash. This time another EnterCriticalSection but in dx.cpp. Same issue. For now I'm going to consolidate all the pre-main init functions, but do you guys have any insight on why this might be? Could it be being optimized out?
Im using Win7, Msys i686-w64-mingw32 (5.3.0 Rev2) to compile.
The text was updated successfully, but these errors were encountered: