FreeFalcon / freefalcon-central

A campaign based, multiplayer, open source flight simulator.
http://freefalcon.org/
BSD 2-Clause "Simplified" License
159 stars 99 forks source link

Debug Assertion Failed on startup #23

Closed PeterMeyer closed 10 years ago

PeterMeyer commented 11 years ago

I just compiled the updtodate source from the Repo. In debug/Release i get a new critical Error:

Debug Assertion Failed

The Debugger falls back into this Code in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\dbghook.c\dbghook.c

declspec(noinline) void cdecl _CRT_DEBUGGER_HOOK(int _Reserved) { /* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */ (_Reserved); _debugger_hook_dummy = 0; }

Expression Stream != Null

The Line of crash is in the Method: int DisplayOptionsClass::LoadOptions(char *filename) in F:\Projekte\GitHub\freefalcon-central\src\falclib\dispopts.cpp Line:62 "fclose(fp);"

Maybe this is an sideeffect of the registry changes we had?

vinnydiehl commented 11 years ago

I feel like these two lines could be removed...

fp = fopen(path, "wb");
fclose(fp);

The rationale for them appears to be to make sure that the file at path is closed. Is this really necessary if the previous file opening failed (see the conditional that it is within)?

ghost commented 10 years ago

I believe this one can be closed. Just follow the build manual and those errors will not appear.