JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Crash every time after disconnect #339

Closed ghost closed 11 years ago

ghost commented 11 years ago

build openjk-2013-07-30-a52ae05e-windows Hello I get this error everytime I disconnect from any server:

Loading dll file ui. Failed to load dll, looking for qvm. Loading vm file vm/ui.qvm. Failed. recursive error after: Disconnected from server

My only .dll mod is Sils Jka mod 1.9 No hooks version <-- this may be the problem but i didnt crash with previous openjk build from June 20

xycaleth commented 11 years ago

Was the server you disconnected from running any mods? If so, which one?

ensiform commented 11 years ago

Happens for me too.

ghost commented 11 years ago

Crashes with every server, even with /devmap /devmap hoth2;disconnect (no waiting between) doesnt crash

ensiform commented 11 years ago

From what I have been able to find out so far via debugger is that its because of the changes for delayed free vm code. Because of Sys_UnpakDll or w/e in windows code, it fails to unpack because its still in use.

I marked this as SP also because probably need to rework the delayed mechanism there too.

    f = FS_FOpenFileWrite( name );
    if ( !f )
    { //can't open for writing? Might be in use.
        //This is possibly a malicious user attempt to circumvent dll
        //replacement so we won't allow it.
        FS_FreeFile(data);
        return false;
    }

The fopen fails within FS_FOpenFileWrite which causes the dll to fail to open since it is still "opened"

xycaleth commented 11 years ago

I'll take a look at fixing this once the qvmtest branch is merged into master. I believe it's possible to fix this, as well as the Com_Error problems much more elegantly by cleaning up resources after the exception is thrown from Com_Error, rather than doing it before.

xycaleth commented 11 years ago

Should be fixed now since merging qvmtest into master.