Bug 26475 - Jogl2 do not work with recent versions of gallium
Summary: Jogl2 do not work with recent versions of gallium
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 26061
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-12 18:26 CEST by Jose Paulo Vilela Soares da Cunha
Modified: 2020-05-08 13:38 CEST (History)
4 users (show)

See Also:
Source RPM: scilab-6.0.2-2.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Jose Paulo Vilela Soares da Cunha 2020-04-12 18:26:01 CEST
Description of problem: Scilab 6.0.2 graphics do not work.


Version-Release number of selected component (if applicable): 6.0.2 (Mageia 7.1).


How reproducible: Try to run any graphics demo from the demo menu --> Graphics --> 2D and 3D --> plot2d


Steps to Reproduce:

1. Open the scilab from the command console window.

2.The following errors will be displayed in the console:

java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, Arquivo ou diretório inexistente
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at java.lang.Runtime.exec(Runtime.java:621)
.....
        ... 15 more

3. After that step, when the graphics demo is selected, a new graphics window
is opened, but it is blank.

4. In the console, the following error messages are displayed:

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 0x7f4e00cc3a00, owner true, ResourceToolkitLock[obj 0x4315d739, isOwner true, <9b6f94, 3e435777>[count 1, qsz 0, owner <AWT-EventQueue-0>]]], but: [GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.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)

.....
        ... 36 more
Jose Paulo Vilela Soares da Cunha 2020-04-12 18:27:16 CEST

CC: (none) => jpaulo

Comment 1 Lewis Smith 2020-04-12 21:53:09 CEST
You are reporting this for 'scilab-6.0.2-1.mga7'; the latest version seems to be 'scilab-6.0.2-2.mga7'. Can you please update it and report whether the same problem still happens.
And please say what desktop you are using.
------------------------------------------
I am a complete stranger to this, and was not able to follow the exact steps you describe:
* Which console: a Terminal, or SciLab's console?
* Where are the graphics demos? How to access them?

I installed 'scilab-6.0.2-2.mga7' and:

1) Starting it from the Science-Maths submenu, it eventually appeared with the following in its *own* console window:-
 Startup execution:
   loading initial environment

 -->

The only error I saw was (under Mate) empty popup captions for the toolbar icons.

2) Starting it from a terminal:
 $ scilab
showed no terminal message at all; and its own console window was as noted above.
All looks OK in both cases... But I need to try the graphics demo you cited.

CC: (none) => lewyssmith

Comment 2 Jose Paulo Vilela Soares da Cunha 2020-04-13 02:27:56 CEST
1) I had upgraded to scilab-6.0.2-2.mga7 to comply with your request. However, the previously reported problems persist.

2) The console is the Konsole version 19.04.0. I type scilab in the Konsole, then "Enter" in order to run Scilab and to read the error messages in the Konsole.

3) My desktop is Plasma.

4) The graphics demos are available in the Scilab window menu: the second icon (from right to left on the top Scilab menu window). It looks like a gear wheel. Once the demonstrations menu is displayed, you should chose sequentially the options: Graphics --> 2D and 3D plots --> plot2d. No graphics is being displayed.

I would like to thank your for your attention and support.

Source RPM: scilab-6.0.2-1.mga7 => scilab-6.0.2-2.mga7

Comment 3 Lewis Smith 2020-04-13 21:39:59 CEST
Well, here I am under Plasma.

> 2) The console is the Konsole version 19.04.0. I type scilab in the Konsole,
> then "Enter" in order to run Scilab and to read the error messages in the
> Konsole.
Doing exactly the same, using konsole-19.04.0-1.mga7, no immediate error (comment 0, point 2):
 $ scilab

Jose, even the Konsole version 19.04.0 you cite is not current. Can you please update your entire system.
Can you say whether, demos apart, the application otherwise works for you?
----------------
As for the demos (thanks for the pointer; I see now the captions for these icons), I tried a few, and they mostly seemed to do nothing: displaying an empty window, as you say. At one point I got compilation errors on the SciLab console; while the terminal filled with java errors, like comment 0 point 4. 

But this application is tricky to use, and I got into one mess after another.
I would agree that the demos are not functional.

Assigning globally in the absence of a registered maintainer; CC'ing NicolasS & DavidG, who have comitted this SRPM.

CC: (none) => geiger.david68210, nicolas.salguero
Source RPM: scilab-6.0.2-2.mga7 => scilab-6.0.2-2.mga7.src.rpm
Assignee: bugsquad => pkg-bugs
Summary: Scilab 6.0.2 graphics do not work. => Scilab 6.0.2 demos do not work.

Comment 4 Jose Paulo Vilela Soares da Cunha 2020-04-15 05:58:05 CEST
Dear Lewis,

Thank you for your kindly reply.

I had reviewed the updates and upgraded the complete Mageia 7.

    Actually, the Scilab is not displaying graphics. Particularly, no demo
graphics are shown. For example, you should try to type in the Scilab
console the command line:

plot([0,0],[1,1])

which should draw a straight line graphics. However, only an empty window is
opened. Other non graphic commands seem to work properly.

    It seems that similar bugs have been previously reported in older Ubuntu
distributions:

https://bugs.launchpad.net/ubuntu/+source/scilab/+bug/1742894

http://mailinglists.scilab.org/JOGL-java-OpenGL-library-td4038311.html

     The problem seems to be related to the package jogl2 and some
incompatibility with directory structure changes in Mesa, OpenGL and
OpenJVM and OpenJDK. Indeed, I tried to compile a newer source version
downloaded directly from the Scilab website:

http://www.scilab.org/download/6.1.0/scilab-6.1.0-x86_64-src.tar.gz

However, the ./configure command stops due to an error in the jogl2
package.

     As far as I know, the Scilab graphics interface is based on Java.
Possibly some updated versions of these packages may correct this bug.

    Best regards,

Jose Paulo V. S. Cunha
Comment 5 Lewis Smith 2020-04-15 19:58:07 CEST
> Actually, the Scilab is not displaying graphics
Thank you for the correction. I had thought we were dealing with just the demos.

Summary: Scilab 6.0.2 demos do not work. => Scilab 6.0.2 graphics do not work.
CC: lewyssmith => mageia

Comment 6 Lewis Smith 2020-04-15 20:12:00 CEST
Pressed a wrong key, continuing from above.
Thank you for the two oldish bug references. They make the situation look omplicated.
I can try no more, leaving this to the devs. Leaving the Severity 'critical' rather than 'major', since it seems the application is useless as it stands. If it can do something useful despite the bug, it could be classed Major.

Adding CC NicolasL for jogl2.
Comment 7 Nicolas Salguero 2020-04-16 10:34:11 CEST
Hi,

The problem:
java.io.IOException: Cannot run program "/opt/X11/bin/xprop"
was also reported in bug 26061.

After some search, I found that bug: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1280149.  The problem comes from the package java-atk-wrapper (only the version in Mageia 7, not the one in Cauldron).

The package java-atk-wrapper-0.33.2-5.1.mga7 solves that issue.

Now there is the issue with GL.

Best regards,

Nico.

Depends on: (none) => 26061

Comment 8 David Walser 2020-04-16 14:09:15 CEST
What is the relationship to matio?
Comment 9 Nicolas Salguero 2020-04-16 14:43:57 CEST
(In reply to David Walser from comment #8)
> What is the relationship to matio?

In bug 26061, scilab had to be rebuilt because of the libmajor change in matio.  When scilab was tested for QA, the issue was discovered.
Comment 10 Nicolas Salguero 2020-04-16 14:46:15 CEST
I built scilab-6.1.0-1.mga7 but the problem:
"""
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught GLException: Profile GL4bc is not available on X11GraphicsDevice...
"""
is not solved sadly.
Comment 11 Nicolas Salguero 2020-04-16 16:27:09 CEST
It is definitively a problem with the package jogl2.
Comment 12 Nicolas Salguero 2020-04-20 09:45:11 CEST
According to this post for Ubuntu: http://forum.jogamp.org/Crash-after-latest-mesa-driver-update-from-ppa-oibaf-td4040300.html, a current snapshot of jogl might solve the problem.

So I tried to build the latest source code available from https://github.com/sgothel/jogl but it failed because it requires Java 11.

Depends on: (none) => 25581

Comment 13 Nicolas Salguero 2020-04-21 15:29:17 CEST
Hi,

I made another test and found a workaround if the machine is using a rather recent Intel chipset: do not use the new iris gallium3d driver but the old i965 one.

When I launch scilab like this:
"""
MESA_LOADER_DRIVER_OVERRIDE=i965 scilab
"""
the plot2d displays nicely and there is no error message in the console.

Best regards,

Nico.
Comment 14 Jose Paulo Vilela Soares da Cunha 2020-04-22 17:11:11 CEST
Dear Nicolas,

Thank you for your suggestion: MESA_LOADER_DRIVER_OVERRIDE=i965 scilab

It works with Scilab pre-compiled x86_64 versions 6.0.2 and 6.1.0 downloaded directly from the website https://www.scilab.org/download as well.

Notice that my computer has an i7-8700 processor without external graphics card.

Would it be possible to include this workaround in the updates for Mageia 7?

Best regards,

Jose Paulo V. S. Cunha
Comment 15 Nicolas Salguero 2020-04-23 11:53:47 CEST
It was only a workaround and did not work in all cases.

My machine also has a NVIDIA card using the "nouveau" driver (so using gallium like the new "iris" Intel driver, as opposed to the old "i965" Intel driver).

So I tested the command: "DRI_PRIME=1 scilab" and got the same error message as with the "iris" Intel driver.

I finally managed to find what causes the issue in the code of jogl2: in the file "src/jogl/classes/jogamp/opengl/GLContextImpl.java", there is a test stating that, if mesa is in use but the version of the compat context is greater than 3.1, then the code must add a quirk stating the GL version in use is not compliant.

The problem is that recent versions of gallium can now set the version of the compat context to 4.3 or 4.6, for instance, but adding that quirk causes the error message because the GL version in use is compliant.

Removing the problematic code solves the issue.

The package jogl2-2.3.2-8.1.mga7, which is currently building, contains the fix.

Summary: Scilab 6.0.2 graphics do not work. => Jogl2 do not work with recent versions of gallium

Nicolas Salguero 2020-04-23 11:58:19 CEST

Depends on: 25581 => (none)

Comment 16 Nicolas Salguero 2020-05-08 13:38:06 CEST
Solved in bug 26061.

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.