Page 1 of 1
Crash on reload
Posted: Sun May 08, 2016 7:22 pm
by Gangrenous
I noticed if you do a /reload spawns twice, the second time before the first reload is actually complete, it will crash on Window or Linux.
Re: Crash on reload
Posted: Sun May 08, 2016 8:27 pm
by Gangrenous
Also /repop seems to crash just about every time.
Re: Crash on reload
Posted: Sun May 08, 2016 9:06 pm
by Jabantiz
/sigh, this is an old bug that always seems to reappear no matter how many times we solve it. We have put in flags for when a reload is triggered so another can't be done while the first is still running but it would seem those are no longer working as intended.
As for repop, I have no clue when that broke and will have to look into that one.
Re: Crash on reload
Posted: Mon May 09, 2016 8:59 am
by Gangrenous
I am not sure how much help I will be, but I am looking into it.
Re: Crash on reload
Posted: Mon May 09, 2016 10:10 am
by Gangrenous
Well before I could only click it maybe 2 ~5 times and it would crash. After some changes I clicked it about 60 times, it seemed to have queued up every click and did not crash, took about 2 minutes of the server catching up with my clicks but it did every repop without crashing. The only question is if there is any other functions in the source that use this?
Under World::Process
Code: Select all
if(reload_spawns)
{
LogWrite(SPAWN__INFO, 0, "Spawns", "Reload Spawns command starting...");
int32 t_now = Timer::GetUnixTimeStamp();
reload_spawns = false;
ProcessReloadSpawns();
LogWrite(SPAWN__INFO, 0, "Spawns", "Reload Spawns completed! (took %u seconds)", Timer::GetUnixTimeStamp() - t_now);
}
I have basically moved this into it's own function that is addressed only when the button is clicked.
Re: Crash on reload
Posted: Mon May 09, 2016 10:11 am
by Gangrenous
This does not fix /repop though, that crashed again on my first click.
Re: Crash on reload
Posted: Mon May 09, 2016 12:07 pm
by Gangrenous
Okay I notice if you do a /depop and then a /repop there is no crash.
Re: Crash on reload
Posted: Mon May 09, 2016 5:34 pm
by Jabantiz
Any process function should not be called any where else, not sure why removing that from the loop fixed it but thanks for looking into that.
/repop just seems odd as it does a depop first any way, I wonder if the repop is starting before the depop finishes completely some how.
Re: Crash on reload
Posted: Mon May 09, 2016 5:46 pm
by Gangrenous
Jabantiz wrote:I wonder if the repop is starting before the depop finishes completely some how.
That is exactly what is happening.
Re: Crash on reload
Posted: Wed May 11, 2016 5:40 pm
by Jabantiz
provocating wrote:Under World::Process
Code: Select all
if(reload_spawns)
{
LogWrite(SPAWN__INFO, 0, "Spawns", "Reload Spawns command starting...");
int32 t_now = Timer::GetUnixTimeStamp();
reload_spawns = false;
ProcessReloadSpawns();
LogWrite(SPAWN__INFO, 0, "Spawns", "Reload Spawns completed! (took %u seconds)", Timer::GetUnixTimeStamp() - t_now);
}
I have basically moved this into it's own function that is addressed only when the button is clicked.
This is not in the code. Where did you get your source code from? It seems like it is out of date.
EDIT: testing /repop as well and no crash on my end
Re: Crash on reload
Posted: Wed May 11, 2016 6:36 pm
by Gangrenous
Yeah it was old code, I have corrected it since then and it is very solid now. I have no idea where I had some of this code, I know I did a pull from SVN, something got crossed up. But for the last few days I have been on the newer source and things are find except for crashes when on Linux.