How to get a stack-trace if the program throws an exception (or any information pointing to the position in the program from where the exception was thrown?)
Example (a typical beginner’s mistake):
PVector [] vs = new PVector [10];
for (int i=0;i<vs.length;++i)
vs[i].set(0,0);
When running this in processing, all it does is displaying a red NullPointerException message. I cannot see any way to find out where in the program this was thrown. (Ideally, I would like to see a stack trace). If this is not possible, what is the suggested approach in Processing to debugging (unexpected) exceptions, in particular if the programs get bigger?
(processing 4.4.4 on Ubuntu 24.04, just in case that’s a known platform issue)
Interesting. So a bug in processing 4.4.4? (One that makes it basically unusable for any semi-serious use). I’ll check if I find it in the issue tracker, and report it there otherwise.
btw: of course PVectors need tio be initialized, I just posted an example for a typical (beginner’s) mistake, that becomes really hard to debug without exception stack trace.