Bad array causing Stack/heap
#1

Well I got a little problem.

pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          26252 bytes
Code size:          2789960 bytes
Data size:          2510248 bytes
Stack/heap size:      32000 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 5358460 bytes
The compiler was causing due to a bug, so I debugged my whole script to find it, and fixed it. (badly used switch statement) so now after I fixed that, the script started giving this, so obviously I need some way to find a bad array (it's a array that was initialized wrong, I've gotten this problem before, it also makes your amx size jump)

It has 46.6k lines and you know.. I can't exactly look through every line to find the problem
Reply
#2

Quote:
Originally Posted by Kar
Посмотреть сообщение
... I can't exactly look through every line to find a bug
If you don't remember the last thing you changed when it first happened, there is no other way than going line by line.
Reply
#3

Okay.. but maybe are there any examples of bad arrays that could cause this on the forums so I can try to search easier..
Reply
#4

Your stack/heap size is 32000 bytes (8000 cells) so look for local arrays that are bigger than 8000 cells.

Or it could be many big arrays together, for example

pawn Код:
new array1[4000];
new array2[4000];
new array3[4000];
4000 + 4000 + 4000 = 12000 so it's a problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)