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

Call stack trace in error log. What does it mean?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vodka00
Veteran Member
Join Date: Jun 2012
Location: Los Angeles
Old 12-03-2012 , 22:36   Call stack trace in error log. What does it mean?
Reply With Quote #1

Hello, I have seen this message for many plugin errors.

L 12/03/2012 - 19:05:43: [SM] Displaying call stack trace for plugin "admintag.smx":

What exactly does it mean?
__________________
cw main:

cw speedruns:
vodka00 is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-03-2012 , 22:41   Re: Call stack trace in error log. What does it mean?
Reply With Quote #2

Well, it means it backtraced the occurrence of the error through its parent functions. It's not very useful to know without the lines below it that tell what functions were called and on what line the error occurred.
__________________
Sheepdude is offline
vodka00
Veteran Member
Join Date: Jun 2012
Location: Los Angeles
Old 12-03-2012 , 22:46   Re: Call stack trace in error log. What does it mean?
Reply With Quote #3

Okay I see, yes I have those lines. It helps me, yep.

What about

return Plugin_Changed;
return Plugin_Continue;
return Plugin_Handled;?

It seems to me that they all do different things in different plugins.
__________________
cw main:

cw speedruns:
vodka00 is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-04-2012 , 08:45   Re: Call stack trace in error log. What does it mean?
Reply With Quote #4

http://wiki.alliedmods.net/Commands_...eMod_Scripting)

I'm not an expert on this subject, but I think this is the hierarchy:

Plugin_Continue
Plugin_Changed
Plugin_Handled
Plugin_Stop

You can return Plugin_ values in functions that are declared with an Action: tag (typically, events and timers). If you want to do stuff and then have other plugins and the game logic to carry on normally, use Plugin_Continue. Otherwise, you would use Plugin_Handled or Plugin_Stop to block further actions in that event from being taken, but from my experience how and if those actions are stopped depends on the event and on the plugins.

Repeating timers also use these return values, to continue iterating a repeating timer, return Plugin_Continue, otherwise use Plugin_Stop from within the timer callback to stop it from repeating.

Oh and Plugin_Changed is used if you modified an event and want it to continue normally, but with the modified values. For instance, if you use SetEventInt("canbuy", 0) on an enter_buyzone event hook.
__________________

Last edited by Sheepdude; 12-04-2012 at 08:49.
Sheepdude is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-04-2012 , 09:21   Re: Call stack trace in error log. What does it mean?
Reply With Quote #5

In forwards, Plugin_Handled and Plugin_Stop actually do have a difference. Plugin_Stop immediately stops the forward and no further plugins have their handlers called. Plugin_Handled tells it to not run the game function, but allows other plugins to continue processing the forward.

Note: This applies more for private forwards; global forwards usually don't return Action.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-04-2012 at 09:21.
Powerlord is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-04-2012 , 13:26   Re: Call stack trace in error log. What does it mean?
Reply With Quote #6

Yeah, what Powerlord said. What I meant was for some events you can return Plugin_Handled or Plugin_Stop and it probably won't work the way you want it to (such as for player_hurt).
__________________
Sheepdude is offline
HoluCallouse
BANNED
Join Date: Dec 2012
Old 12-06-2012 , 04:04   Re: Call stack trace in error log. What does it mean?
Reply With Quote #7

Nice Job...your info. is so helpful and useful.Thank you in advance!
HoluCallouse 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 06:15.


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