Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Announcements (https://forums.graalonline.com/forums/forumdisplay.php?f=240)
-   -   NPCServer: shows callstack on error (https://forums.graalonline.com/forums/showthread.php?t=134266745)

Admins 06-28-2012 03:37 PM

NPCServer: shows callstack on error
 
The npcserver has been updated on all machines (need to be manually restarted):
- shows a small callstack (max 5 entries) when an endless loop has been detected or the callstack has been overrun (endless recursion)
- new script function getCallStackInfo() which returns a string which contains basically the same information: the call stack and script line numbers; this is basically a simpler version of the getCallStack() things; you can use this to easily show who has called your script functions:
PHP Code:

echo("I am " getCallStackInfo()); 


Matt 06-28-2012 10:07 PM

thumbs up

ffcmike 07-02-2012 11:55 PM

There still seems to be the issue of joining a class to a scripted player object then being unable to be un-joined, which makes me hesitant to use the functionality as much as I'd like to as it results in more memory usage.

For example:

PHP Code:

temp.pl = new TServerPlayer(@ temp.account);
temp.pl.join("nameofclass");
temp.pl.someFunction();
temp.pl.leave("nameofclass");
temp.pl.destroy(); 

This will result in the class count still being included within the /stats RC message.

I did notice there was some new information within /stats too.
For example:

Quote:

Script engine: 1 event objects, 94 destroyed objects, 258 static objects, 503 global variables, 6 script machines
I wonder what it means exactly.

Admins 07-03-2012 01:02 AM

6 script machines - maximum number of objects calling another object in a chain
258 static objects - TStaticVars
503 global variables - needs no explanation
94 destroyed objects - objects which were destroyed but other objects are still linking to it
1 event object - objects with a name which were destroyed (having event catchers which will be reapplied when the object is recreated)

These variables were previously only available to me but they can show when there is a problem (too many global variables or so).

ffcmike 07-03-2012 01:11 AM

Quote:

Originally Posted by Stefan (Post 1698837)
6 script machines - maximum number of objects calling another object in a chain
258 static objects - TStaticVars
503 global variables - needs no explanation
94 destroyed objects - objects which were destroyed but other objects are still linking to it
1 event object - objects with a name which were destroyed (having event catchers which will be reapplied when the object is recreated)

These variables were previously only available to me but they can show when there is a problem (too many global variables or so).

The amount of static objects and especially global variables seems much higher than it should be for us, unless a number of them are waiting on the garbage collector or something.

cbk1994 07-03-2012 01:33 AM

Quote:

Originally Posted by ffcmike (Post 1698839)
The amount of static objects and especially global variables seems much higher than it should be for us, unless a number of them are waiting on the garbage collector or something.

For comparison, here's Era with about 115 players online:

Quote:

Script engine: 0 event objects, 448 destroyed objects, 217 static objects, 5786 global variables, 7 script machines
Would be neat if there was some way to see more information about the global variables, I can't think of anything on Era that would be creating so many.

ffcmike 07-03-2012 01:36 AM

Quote:

Originally Posted by cbk1994 (Post 1698840)
I can't think of anything on Era that would be creating so many.

Same, I hardly ever use global variables serverside except for system references.

salesman 07-03-2012 01:54 AM

Quote:

Originally Posted by cbk1994 (Post 1698840)
Would be neat if there was some way to see more information about the global variables, I can't think of anything on Era that would be creating so many.

Aren't npcs created via putnpc assigned to some global variable (items, trash, etc)?


All times are GMT +2. The time now is 07:13 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.