Re: I had a fun one today.
Posted by
gouessej on
Mar 26, 2025; 8:32am
URL: https://forum.jogamp.org/I-had-a-fun-one-today-tp4043704p4043705.html
Hello
dispose() is probably called on the wrong thread (not the one that was used to create the OpenGL context) or when the context isn't current. Maybe dispose() isn't safe to be called twice. Why do you need to call dispose() manually? What is Graphics2DGL exactly?
P.S: Relying on finalization is a bad idea anyway as
finalize() is deprecated since Java 18.
P.S 2: Maybe a solution would consist in avoiding to call dispose() manually and performing a more narrow cleaning.