MATLAB Java Error with Figures

23 Ansichten (letzte 30 Tage)
Zhangxi Feng
Zhangxi Feng am 24 Okt. 2019
Bearbeitet: Esteban Inga am 29 Apr. 2021
When I plot a figure, the figure with all the intended contents appear. I can rotate the figure, probe the data points, and do other things. But when I change window size such as maximizing, the figure would appear blank. If I close the figure at this time, I get the following error. I am not sure if the figure would appear if I keep on waiting. Did anyone else experience a similar issue? I am using Windows 10 with 2019a MATALB.
Exception in thread "AWT-EventQueue-0": com.jogamp.opengl.GLException: Caught GLException: AWT-EventQueue-0: Context not current on thread, inDestruction: false, obj 0x71411b0a, ctx 0x5000b, isShared false, surf true 0x0, <331b25fd, 1204f308>[count 0, qsz 0, owner <NULL>] on thread AWT-EventQueue-0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.disposeGL(GLDrawableHelper.java:1210)
at com.jogamp.opengl.awt.GLJPanel$8.run(GLJPanel.java:1480)
at com.jogamp.opengl.Threading.invoke(Threading.java:223)
at com.jogamp.opengl.awt.GLJPanel.dispose(GLJPanel.java:486)
at com.jogamp.opengl.awt.GLJPanel.removeNotify(GLJPanel.java:687)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4758)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4758)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4758)
at java.awt.Container.removeAll(Container.java:1300)
at com.mathworks.widgets.desk.DTClientFrame.remove(DTClientFrame.java:122)
at com.mathworks.widgets.desk.DTOccupant.flush(DTOccupant.java:902)
at com.mathworks.widgets.desk.DTClient.flush(DTClient.java:389)
at com.mathworks.widgets.desk.Desktop.removeClient(Desktop.java:7067)
at com.mathworks.widgets.desk.DTClient.close(DTClient.java:953)
at com.mathworks.widgets.desk.DTCloseTransaction.close(DTCloseTransaction.java:123)
at com.mathworks.widgets.desk.DTCloseTransaction.query(DTCloseTransaction.java:96)
at com.mathworks.widgets.desk.DTCloseTransaction.start(DTCloseTransaction.java:64)
at com.mathworks.widgets.desk.DTSingleClientFrame$LocalWindowListener.windowClosing(DTSingleClientFrame.java:883)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:350)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
at java.awt.Window.processWindowEvent(Window.java:2054)
at javax.swing.JFrame.processWindowEvent(JFrame.java:305)
at com.mathworks.mwswing.MJFrame.processWindowEvent(MJFrame.java:892)
at java.awt.Window.processEvent(Window.java:2013)
at com.mathworks.mwswing.MJFrame.processEvent(MJFrame.java:961)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.jogamp.opengl.GLException: AWT-EventQueue-0: Context not current on thread, inDestruction: false, obj 0x71411b0a, ctx 0x5000b, isShared false, surf true 0x0, <331b25fd, 1204f308>[count 0, qsz 0, owner <NULL>]
at jogamp.opengl.GLContextImpl.release(GLContextImpl.java:397)
at jogamp.opengl.GLContextImpl.release(GLContextImpl.java:376)
at jogamp.opengl.GLDrawableHelper.forceNativeRelease(GLDrawableHelper.java:200)
at jogamp.opengl.GLDrawableHelper.disposeGL(GLDrawableHelper.java:1190)
... 53 more

Akzeptierte Antwort

Subhadeep Koley
Subhadeep Koley am 30 Okt. 2019
Hi, this seems related to a low-level OpenGL graphics issue and not an issue of the MATLAB itself. You can try few things to see if they help like,
  • Upgrade to latest MATLAB and Java versions for Windows 10.
  • Upgrade your graphics driver firmware to the latest one.
  • Use MATLAB with Software OpenGL. Open MATLAB from the Windows Command Prompt with the following command:
matlab -softwareopengl
If this works, you can set your preferences so that MATLAB always starts with Software OpenGL by using the following in the MATLAB Command Window:
opengl('save','software')
Or you can always revert to your default graphics renderer with the following:
opengl('save','none')
Hope this helps!
  1 Kommentar
Esteban Inga
Esteban Inga am 29 Apr. 2021
Bearbeitet: Esteban Inga am 29 Apr. 2021
La respuesta no sirve. El problema de OpenGL se ha presentado en R2020b no hay una solución definitiva? Se sigue todos los paso y continúa el problema

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by