06.07.2011, 14:30
[Plugin] CrashDetect
06.07.2011, 14:33
Do you mean the total cells of all the scripts together? Or of just one script? (4096).
06.07.2011, 15:07
Hmm it is quite hard to explain.
The stack memory used only counts for each "stage" and its previous "stages" (I don't know how to call it).
In this example OnGameModeInit uses 128 cells, while OnGameModeExit uses 384 cells (256+128 cells).
However, OnPlayerConnect only uses 512 cells instead of 640. This is because string3 is in another "stage" that the memory will be released after the "stage" ends. However the memory of string and string2 is still there, because the "stage" which declare them haven't ended.
For the stack size you see when you finish compiling, it will only count for each function, and find the maximum stack memory used in these functions. So in this case it will be 512 cells.
However if you call another function in a function, the memory used in the function called will be counted as part of the stack memory usage of the original function. So if you do recursion the compiler will say the stack size is unknown (infinity).
You need to take care on the stack size. If it exceed the maximum size allowed, the data in memory can be corrupted.
Finally here's a wiki about it:http://en.wikipedia.org/wiki/Stack_(data_structure)
pawn Код:
new playerinfo[MAX_PLAYERS][20];//A global variable which will not use stack memory
public OnGameModeInit()
{
new string[128];//A local variable that it will use stack memory
return 1;
}
public OnGameModeExit()
{
new string[256],string2[128];//Local variables that it will use stack memory
return 1;
}
public OnPlayerConnect(playerid)
{
new string[256],string2[128];//Local variables that it will use stack memory
{
new string3[128];//..
}
{
new string4[128];//..
}
return 1;
}
In this example OnGameModeInit uses 128 cells, while OnGameModeExit uses 384 cells (256+128 cells).
However, OnPlayerConnect only uses 512 cells instead of 640. This is because string3 is in another "stage" that the memory will be released after the "stage" ends. However the memory of string and string2 is still there, because the "stage" which declare them haven't ended.
For the stack size you see when you finish compiling, it will only count for each function, and find the maximum stack memory used in these functions. So in this case it will be 512 cells.
However if you call another function in a function, the memory used in the function called will be counted as part of the stack memory usage of the original function. So if you do recursion the compiler will say the stack size is unknown (infinity).
You need to take care on the stack size. If it exceed the maximum size allowed, the data in memory can be corrupted.
Finally here's a wiki about it:http://en.wikipedia.org/wiki/Stack_(data_structure)
06.07.2011, 15:39
Loading plugin: crashdetect.so
Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.10' not found (required by plugins/crashdetect.so))
I am using Linux CentOS.
Anybody knows what to do?
Failed (/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.10' not found (required by plugins/crashdetect.so))
I am using Linux CentOS.
Anybody knows what to do?
06.07.2011, 23:13
You could try compiling it yourself if you have root access (you will need gcc, g++ and make), there's a makefile within the source code
26.07.2011, 14:01
I don't know, the plugin can be mistaken sometimes. BTW as I see from the message text you're using an old version of crashdetect, try the newest one.
26.07.2011, 14:05
26.07.2011, 14:49
FS this works too?
26.07.2011, 17:03
i've never gotten this one before but.. _invalid_parameter_noinfo_noreturn could not be located in the dynamic link library msvcr100.dll, i downloaded msvcr100.dll from dll-files.com it usually works fine..
Windows XP Home Edition
Windows XP Home Edition
28.07.2011, 23:58
Servers says that version `GLIBCXX_3.4.14' not found, but "gcc -v" says I have 4.4.3 version. What to do? Running on 64-bit Ubuntu. Also I tried to compile the plugins myself, but ended up nowhere, because there wasn't a makefile in it and had to make my own, but ended up still nowhere, because gave many errors, even in amxdebug.
29.07.2011, 11:32
Thank you so much!
My Server crashed every time when i have over 70 players...
Now i have found the bug with your crash detect plugin really good plugin i love it!
My Server crashed every time when i have over 70 players...
Now i have found the bug with your crash detect plugin really good plugin i love it!
29.07.2011, 16:14
Zeex: When I put a timer to call a function wrapping Streamer_Update in OnPlayerInteriorChange, and when I go to interior 20, the server crashes showing it crashes in Streamer_Update.
When I remove the timer and go to interior 20 again, it crashes with unexpected error.
Could the unexpected error means crashes in plugin that you can change the "unexpected error" to be "plugin crash"?
When I remove the timer and go to interior 20 again, it crashes with unexpected error.
Could the unexpected error means crashes in plugin that you can change the "unexpected error" to be "plugin crash"?
29.07.2011, 16:26
So you want me to change "unexpected error" to "plugin crash/error"? I'm not sure if those errors are only produced by plugins, I think they might be some kind of server internal error or something like that
29.07.2011, 22:33
Can someone please paste the .cfg file for this please, can't seem to find it anywhere.
30.07.2011, 03:32
Zeex: I just guess if it is a plugin crash that so of the unexpected errors can be changed into "plugin crash", so that people will know where the server crash. Surely, it is not 100% for my problem to be a plugin crash.
cyber_punk: I guess it is not required in the latest version.
cyber_punk: I guess it is not required in the latest version.
17.08.2011, 11:28
could you add a logfile to this plugin ?
Searching through the server log is not the best way
Searching through the server log is not the best way
17.08.2011, 12:51
30.08.2011, 16:28
Hi
I have put -d3 in my compiler bug, but it still does not work
Help me please, it's important for me,
LePtitClown
I have put -d3 in my compiler bug, but it still does not work
Help me please, it's important for me,
LePtitClown
30.08.2011, 21:54
Request:
Create a plugin that checks why somebody crashed and what his last lines were.
Create a plugin that checks why somebody crashed and what his last lines were.
30.08.2011, 22:21
Every player would have to install it for his own as the only way to work is client-side.
It doesn't help either, you don't need a plugin for this. Just check where the memory adresses in the crashlog refer to.
It doesn't help either, you don't need a plugin for this. Just check where the memory adresses in the crashlog refer to.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)