Heap problem - Causing script to stop.
#1

Sometimes randomly the server script stops running & the server goes into a state where no commands work and everything goes default, the chat is global & nothing works.

This is what I get in the chat logs (right before it happened):
Quote:

[18:26:27] [debug] Bad heap release detected:
[18:26:27] [debug] samp03svr [0806f911] is releasing memory at 00000565 which is out of heap
[18:26:27] [debug] System backtrace:
[18:26:27] [debug] #0 f671a0f3 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[18:26:27] [debug] #1 f6711b61 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[18:26:27] [debug] #2 f67129dc in _ZN11crashdetect18HandleReleaseErrorEiPv () from plugins/crashdetect.so
[18:26:27] [debug] #3 f6712b23 in _ZN11crashdetect12DoAmxReleaseEiPv () from plugins/crashdetect.so
[18:26:27] [debug] #4 f6718255 in ?? () from plugins/crashdetect.so
[18:26:27] [debug] #5 0806f911 in ?? () from ./samp03svr
[18:26:27] [debug] #6 0807fe6c in ?? () from ./samp03svr
[18:26:27] [debug] #7 080adbe1 in ?? () from ./samp03svr
[18:26:27] [debug] #8 080adcd2 in ?? () from ./samp03svr
[18:26:27] [debug] #9 080b79c0 in ?? () from ./samp03svr
[18:26:27] [debug] #10 0807d736 in ?? () from ./samp03svr
[18:26:27] [debug] #11 0807d962 in ?? () from ./samp03svr
[18:26:27] [debug] #12 08077c23 in ?? () from ./samp03svr
[18:26:27] [debug] #13 00882eac in __libc_start_main () from /lib/libc.so.6
[18:26:27] [debug] #14 0804b4c1 in __gxx_personality_v0 () from ./samp03svr
[18:26:27] [debug] Run time error 8: "Heap underflow"
[18:26:27] [debug] Heap pointer (HEA) is 0x565, heap bottom (HLW) is 0x144820C
[18:26:27] [debug] AMX backtrace:

The "Heap Underflow" message spams for each timer.

This is a pretty big issue due to it causing me to restart the server. Please help.

FYI: I couldn't decide where I should post this, so posted it here.
Reply
#2

Bump. Still have this problem. Using y_commands & y_timers
Reply
#3

Hey.

Does the server log contain any valuable information?

Since you are using y_commands and y_timers, I assume it could be somewhat related to their complex code which manipulates the memory and so on. Don't take my word for it though. What you could do is compile your script with the debug flags enabled (something makes me assume y_commands and y_timers have some options for extensive debugging since they're a part of Alex's YSI). Also I suggest you compile your gamemode and filterscripts with the maximal debugging flag (-d3) to see if crashdetect can give you more precise information.

Anyways, do you think you could replace y_timers with ******' fixes2 plugin, which contains updated timer natives? I suppose that's a bit faster and more precise as well, of course if it does provide all the functionality that you need.

Any other plugins you use by the way?
Reply
#4

The server log is all 100% normal with no errors or anything, the server just outputs what I quoted in the first post before the problem & nothing else out of the ordinary. I actually use no filterscripts at the moment. I specifically use y_timers because it's easy to make timers & takes less time so I can get more scripting done, I don't see why that can be the problem? - Timers I use don't have to be 100% accurate anyway.

Other plugins I use are MySQL plugin (R7 BlueG's), streamer & sscanf. Oh and temporary crashdetect. I don't understand how I compile the gamemode at 'maximal debugging flag'?
Reply
#5

Bump...
Reply
#6

Open Notepad. Write:
Код:
-r -d3
Save the file as pawn.cfg in your Pawno directory. Recompile your script.
Reply
#7

Okay, I get this:
Quote:

Header size: 40976 bytes
Code size: 4182216 bytes
Data size: 21306952 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:25546528 bytes

From my understanding this means I'm using big strings where they're not needed? I've been searching the script for a few minutes & the string sizes seem fine & necessary.
Reply
#8

That's because of the d3 flag, it always shows that information. Now just run the script. If it crashes now, you'll see the function name rather than some cryptic address.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)