Closed wjt closed 1 year ago
I know very little about Java or GL but some Googling suggests that you can explicitly request a GL2 context:
https://github.com/brandonborkholder/mirur/commit/ee7a3a71eaaee255a4b550c810c611747b7b00dc
https://forum.jogamp.org/Not-a-GL2-implementation-exception-td4030873.html suggests that apps should switch from big-GL to GLES2
Does non flatpak scilab work?
Fedora doesn't package it. Endless OS is an immutable system.
I tried installing the scilab
package from Debian Bullseye in a toolbx and plotting fails with a different but somewhat similar exception:
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught GLException: Profile GL4bc is not available on X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7f4570960990, owner true, ResourceToolkitLock[obj 0x61fc1946, isOwner true, <4d4948ac, 59e4a651>[count 1, qsz 0, owner <AWT-EventQueue-0>]]], but: [GLProfile[GLES1/GLES1.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.hw], GLProfile[GLES3/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GL2GL3/GL4.hw]]
at com.jogamp.opengl.awt.GLJPanel$OffscreenBackend.initialize(GLJPanel.java:1795)
at com.jogamp.opengl.awt.GLJPanel.initializeBackendImpl(GLJPanel.java:1377)
at com.jogamp.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:549)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JViewport.paint(JViewport.java:737)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at org.flexdock.docking.defaults.DefaultDockingPort.paint(DefaultDockingPort.java:1983)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5262)
at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1060)
at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
at java.desktop/sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
at java.desktop/java.awt.Container.paint(Container.java:2002)
at java.desktop/java.awt.Window.paint(Window.java:3940)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:876)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:848)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:848)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:823)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:772)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1890)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.jogamp.opengl.GLException: Profile GL4bc is not available on X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7f4570960990, owner true, ResourceToolkitLock[obj 0x61fc1946, isOwner true, <4d4948ac, 59e4a651>[count 1, qsz 0, owner <AWT-EventQueue-0>]]], but: [GLProfile[GLES1/GLES1.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.hw], GLProfile[GLES3/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GL2GL3/GL4.hw]]
at com.jogamp.opengl.GLProfile.get(GLProfile.java:991)
at jogamp.opengl.GLContextImpl.verifyInstance(GLContextImpl.java:1471)
at jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:1942)
at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:395)
at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
at com.jogamp.opengl.awt.GLJPanel$OffscreenBackend.initialize(GLJPanel.java:1731)
... 55 more
Exception in thread "Thread-5" com.jogamp.opengl.GLException: java.lang.reflect.InvocationTargetException
at com.jogamp.opengl.awt.GLJPanel.display(GLJPanel.java:465)
at org.scilab.modules.gui.bridge.canvas.SwingScilabCanvasImpl$SafeGLJPanel.display(Unknown Source)
at org.scilab.forge.scirenderer.implementation.jogl.JoGLCanvas$CanvasAnimator.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.reflect.InvocationTargetException
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1367)
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1342)
at com.jogamp.opengl.awt.GLJPanel.display(GLJPanel.java:463)
... 3 more
Maybe try the executable from here: https://www.scilab.org/download/scilab-6.1.1
If it does not work it probably an issue with Scilab. But maybe we can turn on LIBGL_ALWAYS_SOFTWARE=1 by default to work around it until it is fix?
scilab-bin: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
I'm afraid I can't spend any more time on this. I'm not a Scilab user, I'm passing on this problem on behalf of a user of our distro.
could you try overriding MESA GL version using: export MESA_GL_VERSION_OVERRIDE=2.1
before launching Scilab ?
Thanks @davidcl, I opened #10 for that change.
An Endless OS user reported that Scilab no longer displays plots. Apparently this previously worked and now does not.
I can reproduce this. I see the following exception in the console:
I tested the previous build as of 131f5f36, same issue. I also tested on an X11 session, same issue. My final guess is that the user was previously using an older version of Endless OS with an older Mesa, but I haven't tested this further.
I can also reproduce this on a Fedora 37 machine. It is not Endless OS specific. Both machines are Dell XPS laptops with Intel integrated graphics (one from 2015, one from 2019). I do not know the original reporter's hardware information.
The issue above seems to be a known issue upstream:
Forcing software rendering by setting
LIBGL_ALWAYS_SOFTWARE=1
in the environment is a somewhat nasty workaround but it would at least make the app usable.Another (better but more involved) approach would be to remove the dependency on GL2.