Raised This Month: $32 Target: $400
 8% 

Navgenerator script randomly crashes server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 12-09-2011 , 17:12   Navgenerator script randomly crashes server
Reply With Quote #1

We all know that, we add a few maps to our server and forget to build the navfiles for bots.
Then someone joins your server, bots get added and the client must wait for the nav to be generated.
Well, i had the idea this problem could be solved with a small plugin.
I had success, at least i thought so.
At testing it on my local server (windows), everything worked fine, but then i tested it on linux i ran into problems.
I analyzed my code a few times, it might be bad scripted(wip), but i cannot see any reason for crashes happening because of that.
Most of the time it happens directly after "Round has started"
Maybe you can see the mistakes what i could not see.
Ignore my exaggerated comments, which serves only for orientation.
Thanks in advance

Edit: Oh, the game i wrote this for is Counter-Strike: Source

Yours sincerely
Impact
Attached Files
File Type: sp Get Plugin or Get Source (mapswithoutnavs2.sp - 188 views - 4.7 KB)
__________________

Last edited by Impact123; 12-09-2011 at 17:22.
Impact123 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 12-09-2011 , 17:24   Re: Navgenerator script randomly crashes server
Reply With Quote #2

Installed the script with the intent of helping debug the issue but it seems it produces an error for me on Windows as well. Something about invalid termination of a steam thread. *starts poking code*

Edit: Swapped your ServerCommands("cvar") for SetConVarInts and ServerCommand("changelevel") with ForceChangeLevel and haven't experienced a crash.
__________________

Last edited by thetwistedpanda; 12-09-2011 at 17:45.
thetwistedpanda is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 12-09-2011 , 18:07   Re: Navgenerator script randomly crashes server
Reply With Quote #3

I wanted to use this method later on.
I tried it out, but after the 4th map i had a crash again.
Like i said, on windows it works perfect for me, it's only on linux.
Weird.
Spoiler

I tested this with an absolutely base sourcemod, and only that plugin installed.
Thanks for your help so far!

Yours sincerely
Impact
__________________

Last edited by Impact123; 12-09-2011 at 18:12.
Impact123 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 12-09-2011 , 18:40   Re: Navgenerator script randomly crashes server
Reply With Quote #4

I did a quick edit of the code and the modified version was able to run through all ~100 map files (deleted all .navs prior) without a crash, so give this one a shot. I removed the profiler code, changed the bot logic to remove bots prior to map change and add them back after, and changed the map logic to only run OnMapStart/OnMapEnd rather than in a repeating timer.
Attached Files
File Type: sp Get Plugin or Get Source (navgen.sp - 238 views - 4.8 KB)
__________________
thetwistedpanda is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 12-09-2011 , 18:58   Re: Navgenerator script randomly crashes server
Reply With Quote #5

I get the exact same error as posted above on the 4th map.
There must be a reason this works perfectly on windows but on linux it crashes :<
I don't get it.

Yours sincerly
Impact
__________________

Last edited by Impact123; 12-09-2011 at 18:59.
Impact123 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 12-09-2011 , 18:59   Re: Navgenerator script randomly crashes server
Reply With Quote #6

I'm at a loss then; try increasing the timers so that it gets enough time to load everything I guess.
__________________
thetwistedpanda is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode