Loading...
Logo
Processing Forum

Heap full message!

in General Discussion  •  Other  •  8 months ago  

In my program, after a number of mouse clicks I cannot see the object on the sketch and there will be this message:

“Heap full” and “stack empty on pop attempt”

Does anyone have any idea what is this problem and how to fix it?

Replies(2)

Re: Heap full message!

8 months ago
I have moved this to Programming Questions because it is not a General Discussion topic.

Without seeing some code it is difficult to be precise but you are probably using the pushMatrix and popMatrix functions. These functions must be paired i.e. if a pushMatrix has been called then evetually there must be a call to popMatrix

If the stack is full it means that there are more calles to pushMatix than popMatrix, if empty then popMatrix has been called more often than pushMatrix.

Re: Heap full message!

8 months ago
Sorry, quarks, but no, programming questions without code to scrutinize go to General Discussion, as a general policy, because they are often too vague, from "why do I have an out of memory exception?" to "how do I simulate the traffic of a town?".
The policy is arbitrary, but simple, avoiding to speculate if it is precise enough to belong to PQ or so broad it should go to GD (as they have no unique answer)...

Back to the topic, another potential cause is a function calling itself, without way to stop.