Crash on reload
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Crash on reload
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.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Crash on reload
/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.
As for repop, I have no clue when that broke and will have to look into that one.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
I am not sure how much help I will be, but I am looking into it.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
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
I have basically moved this into it's own function that is addressed only when the button is clicked.
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);
}Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
This does not fix /repop though, that crashed again on my first click.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
Okay I notice if you do a /depop and then a /repop there is no crash.
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Crash on reload
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.
/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.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
That is exactly what is happening.Jabantiz wrote:I wonder if the repop is starting before the depop finishes completely some how.
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Crash on reload
This is not in the code. Where did you get your source code from? It seems like it is out of date.provocating wrote:Under World::Process
I have basically moved this into it's own function that is addressed only when the button is clicked.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); }
EDIT: testing /repop as well and no crash on my end
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Crash on reload
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.
Resident Dirty Hippy
Who is online
Users browsing this forum: No registered users and 0 guests