[Plugin] CrashDetect
#61

Quote:
Originally Posted by timothyinthehouse
Посмотреть сообщение
Hmm, what does that Stack/heap size means?
That is the maximum total memory size used for non-global variables at the same time.
If the number of cells is smaller than 4096(16384 Bytes) than it's good.
Reply
#62

Do you mean the total cells of all the scripts together? Or of just one script? (4096).
Reply
#63

Hmm it is quite hard to explain.
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;
}
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)
Reply
#64

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?
Reply
#65

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
Reply
#66

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.
Reply
#67

Quote:
Originally Posted by 0x5A656578
Посмотреть сообщение
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.
Ok, ill update the crashdetect and tell u if i still get the same message
Reply
#68

FS this works too?
Reply
#69

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
Reply
#70

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.
Reply
#71

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!
Reply
#72

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"?
Reply
#73

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
Reply
#74

Can someone please paste the .cfg file for this please, can't seem to find it anywhere.
Reply
#75

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.
Reply
#76

could you add a logfile to this plugin ?

Searching through the server log is not the best way
Reply
#77

Quote:
Originally Posted by D0erfler
View Post
could you add a logfile to this plugin ?

Searching through the server log is not the best way
I agree with this, it would be great
Reply
#78

Hi

I have put -d3 in my compiler bug, but it still does not work
Help me please, it's important for me,


LePtitClown
Reply
#79

Request:

Create a plugin that checks why somebody crashed and what his last lines were.
Reply
#80

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)