Raised This Month: $51 Target: $400
 12% 

[TF2] Freeze Tag - Updated (1.1.4) 5/12/2013


Post New Thread Reply   
 
Thread Tools Display Modes
vintagepc
Junior Member
Join Date: May 2013
Old 05-06-2013 , 12:41   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #101

Quote:
Originally Posted by friagram View Post
Its quite possible i forgot to test a if client && when converting timers over to use user ids. Does it only happen on the new version? If so this is likely the case, so ill just have to fix where the invalid client stuff is going on. I tried to remove the superfluous client validation, probably took too much out or forgot some somewhere.

Yep for sure forgot to check if !client. I'm looking other places to see if I have missed it as well.
It's also possible perhaps I missed an entity reference, and it's deleting another entity, which could cause a crash.

All of the timers and such sort of make this plugin a mess to debug/edit. I kind of wish i had of just used one big loop with getenginetimes =/
It was also happening for me with 1.1.3 (not prior to steampipe update though) so I saw your updated posts and tried those builds as well, but no luck.
I should mention that I later (after updating) saw the note about config_arena but I don't think that was the cause as there were no references to trying to use the arena configs, likely because the server runs CP maps.

Also forgot to say the isClientInGame error might have been from the time I added some bots to the server just to get the round to start.

Last edited by vintagepc; 05-06-2013 at 12:43.
vintagepc is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-06-2013 , 13:01   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #102

Here's a version with that fix. I looked through all of the timers/entity references/userid stuff, and everything looks as it should be. It's possible a client 0 was being passed into the proximity function and causing some weird failure later down the line or something. I don't know, so many timers.. ahhh.

I'll be testing this with a ton of bots, and try chain kicking/slaying a ton of them to see if i can replicate any other strange bugs. Should be somewhat similar to clients now since the code is the same for them....

Okay. I spammed freeze/unfreeze like 200 times and got some lag and ED_Alloc:no free edicts. So somewhere, entities are not being destroyed. This is the reason it's crashing i'll be. I will have it fixed in a moment. Something strange is going on. I can't see the env_sprites or the info_particle_systems being spawned (snowflakes/glowsprites). Hrm.

Edit:
The mod creates the following entities:
prop_dynamic
env_sprite
info_particle_system

I checked their counts by finding them and printing them out while heavily killing/respawning bots, and eventually the server starts spamming this with developer on:

Max entity count along ray exceeded! This has something to do with traceray. It's probably due to my sloppy traceray code, but it never used to happen with the old version/pre steampipe, so something has changed.

Entity counts spike out of nowhere, but the counts of the entities the mod spawns stays low. So something else is being spawned and not removed properly. And I have to find out what that is. Perhaps ragdolls, weapons, or something stupid. They just pile up.

Removed the sprites and it stopped doing it. So i'll just take them out, as well as the lights (they just lag anyways)
Now i just have to find out why the snowflake particles arn't showing up since steampipe came around.
Attached Files
File Type: sp Get Plugin or Get Source (freezetag.sp - 92 views - 213.1 KB)
File Type: smx freezetag.smx (49.1 KB, 99 views)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-06-2013 at 14:01.
friagram is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-06-2013 , 14:45   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #103

Okay, sorry for the troubles. It looks like the issue of the crashes was being caused by the env_sprite, it seems to create some entities or something that interferes with things.

- Reverted back to light_dynamic for visual effect to prevent crashes
- Fixed the client index error in proximity timer
- Fixed the snowflake particle not working
Attached Files
File Type: sp Get Plugin or Get Source (freezetag.sp - 86 views - 214.2 KB)
File Type: smx freezetag.smx (48.9 KB, 80 views)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
vintagepc
Junior Member
Join Date: May 2013
Old 05-06-2013 , 18:09   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #104

Thanks, will try and report back if there are issues.
vintagepc is offline
vintagepc
Junior Member
Join Date: May 2013
Old 05-08-2013 , 20:56   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #105

Alas it crashed again today, no visible errors and the last console output was:

L 05/08/2013 - 14:432: "VintagePC [VF4-S]<31><STEAM_0:1:18915956><Blue>" triggered "weaponstats" (weapon "rocketlauncher_directhit") (shots "9") (hits "2") (kills "0") (headshots "0") (tks "0") (damage "172") (deaths "0")
rcon from "66.55.88.169:54284": command "hlx_sm_psay "48" 1 "Dark Scheme (1,003) [3/10] got 2 points for killing VintagePC [VF4-S] (3,442)";hlx_sm_psay "31" 1 "Dark Scheme (1,003) [3/10] got 2 points for killing VintagePC [VF4-S] (3,442)";"
rcon from "66.55.88.169:54284": command "hlx_sm_psay "37" 1 "Coke got 2 points (1,052) for Kill Assist""
PreMinidumpCallback: updating dump comment
Uploading dump (out-of-process) [proxy '']
/tmp/dumps/crash_20130508144332_1.dmp
Game server has exited.

FWIW, here are the other plugins I've got running:
01 "Observer Point" (1.0.100) by <eVa>Dog
02 "[TF2] gScramble Team Manager" (3.0.11) by Goerge
03 "[TF2Items] Manager" (1.4.1) by Damizean & Asherkin
04 "Sound Commands" (1.5.0-dev+383 by AlliedModders LLC
05 "Extended Mute" (1.2.2-B) by Twisted|Panda (Orig: FLOOR_MASTER)
06 "Anti Color Abuse" (1.0.0) by 11530
07 "Fun Commands" (1.5.0-dev+383 by AlliedModders LLC
08 "Basic Votes" (1.5.0-dev+383 by AlliedModders LLC
09 "HLstatsX CE Ingame Plugin" (1.6.19) by psychonic
10 "[TF2] Model Manager" (1.0.2) by FlaminSarge (based on Damizean's TF2 Equipment Manager)
11 "Player Commands" (1.5.0-dev+383 by AlliedModders LLC
12 "SuperLogs: TF2" (2.0.32) by Thomas "CmptrWz" Berezansky & psychonic
13 "Fun Votes" (1.5.0-dev+383 by AlliedModders LLC
14 "Advertisements" (0.5.5) by Tsunami
15 "Fun Commands X" (2.2) by Spazman0 and Arg!
16 "Basic Comm Control" (1.5.0-dev+383 by AlliedModders LLC
17 "SourceMod Radio" (1.0.0.13) by dubbeh
18 "MySQL Server Configs & Logging" (1.1) by MoggieX
19 "Bonus Round Immunity" (1.1.0) by Antithasys
20 "AFK Manager" (3.4.3) by Rothgar
21 "Web Shortcuts" (1.1) by Kyle Sanderson, Nicholas Hastings
22 "Simple Chat Colors" (2.0.0) by Simple Plugins
23 "Donator Recognition" (1.3a) by Nut
24 "Simple Chat Processor" (1.0.1) by Simple Plugins
25 "Nextmap" (1.5.0-dev+383 by AlliedModders LLC
26 "[TF2] Freeze Tag" (1.1.4d) by Friagram
27 "Admin Help" (1.5.0-dev+383 by AlliedModders LLC
28 "SourceBans" (1.4. by SourceBans Development Team
29 "Admin Menu" (1.4.7-dev) by AlliedModders LLC
30 "Reserved Slots" (1.5.0-dev+383 by AlliedModders LLC
31 "Basic Chat" (1.5.0-dev+383 by AlliedModders LLC
32 "Sourcebans Checker" (1.0.0) by psychonic & Ca$h Munny
33 "Basic Info Triggers" (1.5.0-dev+383 by AlliedModders LLC
34 "Client Preferences" (1.5.0-dev+383 by AlliedModders LLC
35 "Spray Tracer" (5.8a) by Nican132, CptMoore, Lebson506th
36 "Anti-Flood" (1.5.0-dev+383 by AlliedModders LLC
37 "Player Warnings" (1.0. by Twisted|Panda
38 "Basic Commands" (1.5.0-dev+383 by AlliedModders LLC
39 "Admin File Reader" (1.5.0-dev+383 by AlliedModders LLC
40 "[TF2] Second MOTD" (1.0) by Powerlord


Once again I think the last kill was heavy related. It could very well be a red herring, but every crash I have been stuck on the "lost connection to server' countdown and I've noticed hearing the heavy minigun firing sound looping during this countdown. Seems counter intuitive but I'm mentioning it anyway.

Last edited by vintagepc; 05-08-2013 at 21:04.
vintagepc is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-08-2013 , 23:15   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #106

does the crash happen with other versions of the mod?

I removed some of the checks/reworked the ontakedamage function, so there may be a problem there. I don't see what it could be though.
I thought that SDKhooks unhooks entities when they are destroyed, so i don't see why I would/should need to validate hooked clients in that function. It could be the problem. If anyone knows, let me know.

The old version had tons of over-validation, so if the crash is happening in that version too, I have no idea... (the version posted on front page)

Also, it may be possible that the client from the event int is invalid. I have seen this before (esp in player_team). I don't know why it happens, but mabye I should be validating clients in events too, especially since the mod respawns people so quickly =/
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-09-2013 at 00:04.
friagram is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-09-2013 , 00:30   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #107

Okay, i looked it over and i don't see anything obvious.
If the old verison isn't doing it, and the new one is, I suggest you try using it without the model cvar enabled, and see if it still does it.

You can try this, which i was working on, to fix up some small bugs/optimizations, but not much changed. I added the 2 seemingly superfluous checks with logerror messages.. you'll see them as loose indentations, but I think if you are crashing the way you are, you would get sourcemod errors anyways, or if it's crashing before the logs can be written, this wont' help anyways. Sorry, i'm pretty tired. I can mabye look at it tomorrow.

One thing it might be is trace. That trace function is pretty sloppy, and I noticed some weird behavior when I tried working with srpites, something about max entities and traces, then crash. Perhaps something changed with how stuff works, but that function can be rewritten better I think.
Attached Files
File Type: sp Get Plugin or Get Source (freezetag.sp - 86 views - 214.2 KB)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-09-2013 at 00:32.
friagram is offline
vintagepc
Junior Member
Join Date: May 2013
Old 05-09-2013 , 08:53   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #108

Yes, I was having the same issue with 1.1.3 from the front page. The fact it's crapping out without even printing any errors suggests it's a very low level problem causing a segfault or so. I know it's hard enough to debug WITH an error, but without any indication of what it is... ugh.

Do you have a debug version that spews log info? I'd be happy to run that to see if we can find the problem.
vintagepc is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-09-2013 , 17:12   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #109

Im pretty sure the issue is from the trace function.. It gets called every time someone gets frozen and respawned in place ... It tests when a player gets stuck in another frozen player and moves them out, but not through walls. Try commenting it out. People would get stuck in frozen players though. I would need to rewrite it, or make them unsolid while they become frozen... And then make them solid again later once nobody is inside them or something.

The trace function was put in really early on, when there was a long delay in respawning people, now it does it on the next frame, so it probably won't have people getting stuck too often. MOST times it will just be like a normal client/client stuck colision that will resolve itself normally. You can try it by comenting out this line:

PHP Code:
                resolveFreezeSpawnOverlaps(client);                                        // Check to see if any nearby players became stuck in them, and push them away 
Bleh, you get stuck in them. I'll try making them unsolid and see how that goes.
Unsolid works if i make everyone projectile class. However, it still crashes from too many entities, though the entity count doesn't actually increase when viewing net_Graph. I tried this by constantly killing 10 bots every frame for a few minutes, and the server always crashes with no free edicts. In a more stripped down version, that just respawns players, this does not happen.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-09-2013 at 21:12.
friagram is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-09-2013 , 21:27   Re: [TF2] Freeze Tag - Updated (1.1.3) 1/22/2013
Reply With Quote #110

I think i have a fix for it... I manage to crash the server, slaying bots on a .1s timer, but it's always because there's too many timers (you're not supposed to die when you're already frozen - especially not repeatedly on a .1s timer) - when i do this with 10+ bots, after a few minutes the server either unloads the plugin, or crashes. Sourcemod writes out to sourcemod_fatal.log:
Code:
L 05/09/2013 - 17:58:43: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "freezetag.smx")
L 05/09/2013 - 17:58:43: [SM] Unloading plugin to free 16073 handles.
L 05/09/2013 - 17:58:43: [SM] Contact the author(s) of this plugin to correct this error.
This is understandable. Anyways, there is some protection against this in the mod, and if multiple timers get fired under normal circumstances, they would die/clear up on their own, but they stack up if you slay everyone very fast.

I also got the server to crash to no free edicts, when slaying stuff really fast, but I think that's mostly because there wasn't enough time for the light entity to become paired/killed properly (because stuff was going on too fast). I removed it anyways, since it's not so great and just lags slower clients.

I replaced the unstuck function by making everyone share the projectile collision group. It allows for normal bullet/projectile/world collision, but players can pass through each other. If i put it only on frozen players, it would do stuff like not let you push them when you are inside of enemies, or other things. So see if this works out.

I left it running for awhile, with nobody frozen there's only three open handles: the hud synchronizer, the main hud/timer loops, and the sdkcall.

If you keep having problems, let me know. Check your sourcemod_fatal, also.

One other thing. I've noticed that valve changed something else - how clients respawn. Now, if you respawn inside ANY solid entity (that isn't world), you become civilian (even if it's a teammate). However, if you respawn in the world you do not. It used to not happen quite like this, but I don't think it will be a problem. The mod checks for it and regenerates you until you get weapons.. But now it's possible in some very rare situations for a player to say - get respawned in a stuck location (they are inside some enemy buildable or enemy player, so they get placed inside of a teammate.. but both players never move, so the player will keep getting resupplied. I don't think it will happen very often though, since it all happens quickly.

Played ghostfort on this for about an hour, and entities stayed low, and no problems. Though it's annoying with the velocity setting allowing you to bounce around when frozen. I'll set it to 1 so it won't happen like the old method on top of the new so that wont occur in next ver.
Attached Files
File Type: sp Get Plugin or Get Source (freezetag.sp - 99 views - 214.9 KB)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-10-2013 at 00:04.
friagram 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 05:56.


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