uitable run in loop causes java out of memory and crashes
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am generating figures in a loop, including plots and a uitable (30x13). Using MATLAB 2012b and a Win 7 64bit PC with 8GB RAM. I have added pauses before the uitable and that brought me up to 200 loops possible, but still crashes. Running more figures results in several lines of error (java & memory related). I cannot copy the errors, as the matlab usually hangs then and just closes...
Any ideas?
1 comentario
John Anderson
el 25 de Nov. de 2013
I am having a similar problem. I am publishing a file that generates a large number of figures containing uitables although only displaying one at a time. I experience a java memory error (java.lang.OutOfMemoryError: Java heap space) and Matlab hangs or becomes sluggish. I have taken a look at the amount of free memory avilable between figures via a call to java.lang.Runtime.getRuntime.freeMemory and this tends to decrease over time, even though the figures are being deleted once their contents have been published. I guess this reflects an underlying memory management issue relating to uitable as this doesn't occur with other uicontrols. I'd be interested to hear any progress on resolving this issue.
John
Respuestas (1)
Jan
el 10 de Sept. de 2013
Do you create 200 figures in a loop and leave them all open? If so, why? No human can navigate in a pile of 200 windows.
Increasing the Java Heap Space might be useful, but I assume it is much better to find a solution, which creates less figures, e.g. by re-using existing figures and uitables and updating the contents only.
2 comentarios
Jan
el 10 de Sept. de 2013
Re-using an existing figure saves a lot of resources, and after a lot of Java related problems, re-using the uitable might be even more important.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!