- 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 Java Error with Figures
23 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Subhadeep Koley
2019-10-30
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,
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 个评论
Esteban Inga
2021-4-29
编辑:Esteban Inga
2021-4-29
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!