SA-MP Forums Archive
Run time error 8: "Heap underflow" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Run time error 8: "Heap underflow" (/showthread.php?tid=328109)



Run time error 8: "Heap underflow" - Thomas. - 23.03.2012

Hi all,

Currently I'm experiencing random server crashes.
I've never had these kind of issues before, and as far as I know I haven't made any significant changes which would most likely be the cause.

Crash detect log:
Code:
[debug] Run time error 8: "Heap underflow"
[debug]   Heap index (HEA) is 0x18FDA4, heap bottom (HLW) is 0x1359A78
[debug] Backtrace (most recent call first):
[debug] #0  00000008 in public Float:OnPlayerUpdate (Float:oper=0.00000) at ...\include\float.inc:108
[debug] Aborting...
I'll post line 108 of float.inc here as well just for reference:
pawn Code:
stock Float:operator-(Float:oper)
    return oper^Float:cellmin;                  /* IEEE values are sign/magnitude */
The crashes with the details above, although with various function calls, occur on random moments. There is no clear suspect.

What could be the problem?

Thanks in advance.


Re: Run time error 8: "Heap underflow" - Face9000 - 23.03.2012

Show us your OnPlayerUpdate,since in the error_log is writed.


Re: Run time error 8: "Heap underflow" - Thomas. - 23.03.2012

The problem is not in the OnPlayerUpdate() callback.

The exact same crash occurs on various function and callback calls, it actually seems to be random.

Also notice that in the crash log there's a Float: tag in front of the function, which is obviously incorrect (it does that with all functions in the crash log).


Re: Run time error 8: "Heap underflow" - Thomas. - 23.03.2012

I just found another thread about this problem.

They seem to have fixed the problem by converting all floating points to integers.
However this seems to be a workaround rather than an actual fix.

Does anyone know, with this new information, what is going on?