Processing.py-Bugs
Processing.py-Bugs copied to clipboard
OutOfMemoryError: Java heap space
Hi, I haven't found this issue in this forum. In Processing 3.5.4, in Python mode, with very little coding, after two or three runnings, the error 'OutOfMemoryError: Java heap space' appears, and it doesn't work anymore. I'm using a powefull laptop. So, what is the problem. Thanks in advance. AndrésHC
Hi @AndresHC232! Thanks for reporting! Could you provide some example code? Are you on MacOS, Windows or Linux? Maybe someone else here might reccomend better ways to investigate this?
Hi, I attach some images: One with the code that cause error after four o five runnings. One with the characteristics of my computer. And the last one wich shows how Processing 4.0b2 displays, I think since I installed the 3.5.4 version, but I'm not sure. I installed first the 4.0b2 version, but I had to change to the 3.5.4 versión but I don't remember wy. And now thah I try to resume with the Processing 4.0b2 to do some test, because is so enormeus. I cant. Do you hve some idea about that last issue, too?



Hi @AndresHC232
I recommend Processing 3.5.4 for Python mode. Processing.py support for Processing 4 is experimental right now.
For the memory error, try increasing the maximum available memory in the Processing preferences (File > Preferences > Increase maximum available memory), to like 1000+ MB. You might need to restart Processing for that to take effect.
Hi, I increased available memory and it works now. Thank you very much! Another question: How can I program with Processing in an android smartphone. I use Pydroid 3 in my smartphone. Thans in advance. AndrésHC
Glad to hear that solved the memory issue.
Regarding your smartphone question --
There is Processing for Android, but you'll need to write Java code for that (and write the code on a computer then deploy it onto your phone). Because of how Processing.py works, you can't just install it like another pip package.
To write Processing.py-esque code on your phone, you might try something web-browser-based, like a py5 notebook or pyp5js. If you're happy writing JavaScript, there are options like p5.js.
Hi, Thanks for that last advice. I think I'll program with Proccessing just in my laptop. Bye. AndrésHC