Select to view content in your preferred language

ver 100.4.0 OpenGL issue on Ubuntu 18.04

3166
6
Jump to solution
01-06-2019 11:21 PM
chenzero
Emerging Contributor

Hello, 

I successfully run 2d Map java code , e.g: code using MapView, 

however, code using SceneView e.g: 

arcgis-runtime-samples-java/DisplaySceneSample.java at master · Esri/arcgis-runtime-samples-java · G... 
throw Exception: 

Java version : 1.8.0_181 (Oracle Corporation) amd64
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Error code: 18
Error message: Internal error exception
Additional error message: star_draw,GL_VERTEX_SHADER:0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, and 3.10 ES

at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativeDrawMap(Native Method)
at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.a(SourceFile:107)
at com.esri.arcgisruntime.internal.mapping.view.k$1.a(SourceFile:75)
at com.esri.arcgisruntime.internal.jni.CoreGeoView.onDrawRequested(SourceFile:462)
at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)
at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.c(SourceFile:95)
at com.esri.arcgisruntime.internal.mapping.view.k.a(SourceFile:91)
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
at com.esri.arcgisruntime.internal.mapping.view.aa$1.handle(SourceFile:31)
at javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$485(AnimationTimer.java:57)
at java.security.AccessController.doPrivileged(Native Method)
at javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:514)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$403(QuantumToolkit.java:319)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Error code: 18
Error message: Internal error exception

Following is my computer OpenGL info, 

$ glxinfo |grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

Any suggestion ? 

Thanks ! 

0 Kudos
1 Solution

Accepted Solutions
MarkBaird
Esri Regular Contributor

The error you are getting is indicating that you don't meet the OpenGL requirements of the app you are running.  Very often developers find that 2D apps work okay as they have a lower entry point for the OpenGL requirements, but 3D apps fail due to the extra OpenGL capabilities we utilise.  In this case, the apps will be failing very early in the execution at the point where we try to create an OpenGL context.

I've looked at the GTX745 graphics card and it should certainly work for most 3D apps, you just need to correct driver.  Could this be what you need NVIDIA DRIVERS Linux x64 (AMD64/EM64T) Display Driver 

View solution in original post

6 Replies
MarkBaird
Esri Regular Contributor

I see you are using a generic Mesa driver.  If you are using an NVidia graphics card for example, then install the correct driver for your hardware and this will get you the OpenGL capabilities needed for the 3D visualisation.

Let me know if this helps.

0 Kudos
chenzero
Emerging Contributor

Java Runtime Error on Ubuntu 

Thanks for reply. I installed a GTX745 card on Ubuntu 18.04,

the issue is: perhaps some problem of Ubuntu 18.04 with Multiple display cards(the CPU is:

Intel(R) Core(TM) i5-4460  CPU with integrated display),

when I ran MyMapApp.java (attached in this thread), the whole operating system hang.

when I ran DisplaySceneSample.java,  a black window pop up, however, almost same exception like before(no install GTX745 card)

Initializing...
Java version : 1.8.0_181 (Oracle Corporation) amd64
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Error code: 18
Error message: Internal error exception
Additional error message: star_draw,GL_VERTEX_SHADER:0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

    at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativeDrawMap(Native Method)
    at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.a(SourceFile:107)
    at com.esri.arcgisruntime.internal.mapping.view.k$1.a(SourceFile:75)
    at com.esri.arcgisruntime.internal.jni.CoreGeoView.onDrawRequested(SourceFile:462)
    at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)
    at com.esri.arcgisruntime.internal.mapping.view.RenderingContext.c(SourceFile:95)
    at com.esri.arcgisruntime.internal.mapping.view.k.a(SourceFile:91)
    at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
    at com.esri.arcgisruntime.internal.mapping.view.aa$1.handle(SourceFile:31)
    at javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$485(AnimationTimer.java:57)
    at java.security.AccessController.doPrivileged(Native Method)
    at javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)
    at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)
    at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:514)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$403(QuantumToolkit.java:319)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:748)
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Error code: 18
Error message: Internal error exception

The OpenGL info is:

$ glxinfo|grep OpenGL
OpenGL vendor string: nouveau
OpenGL renderer string: NV117
OpenGL core profile version string: 4.3 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

Thanks!

0 Kudos
MarkBaird
Esri Regular Contributor

The error you are getting is indicating that you don't meet the OpenGL requirements of the app you are running.  Very often developers find that 2D apps work okay as they have a lower entry point for the OpenGL requirements, but 3D apps fail due to the extra OpenGL capabilities we utilise.  In this case, the apps will be failing very early in the execution at the point where we try to create an OpenGL context.

I've looked at the GTX745 graphics card and it should certainly work for most 3D apps, you just need to correct driver.  Could this be what you need NVIDIA DRIVERS Linux x64 (AMD64/EM64T) Display Driver 

chenzero
Emerging Contributor

Sorry the later because of vacation.

I try the nvidia proprietary driver on that link. and follow some helpful links for pre-steps of that driver.

1. Disable X server.

Ctrl + Shift + F2, and run: $ sudo service lightdm stop

https://askubuntu.com/questions/65856/how-does-one-exit-the-x-server

2. Disable Ubuntu default "nouveau" driver

https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux

After reboot, in console mode, when I ran "$ sudo bash ./NVIDIA-Linux-x86_64-334.21.run", it prompted can not compile the nvidia.ko...

Please see the attached log.

Thanks and Regards

0 Kudos
chenzero
Emerging Contributor

After try the nvidia latest linux 64 driver on page:

NVIDIA DRIVERS Linux x64 (AMD64/EM64T) Display Driver 

(NVIDIA-Linux-x86_64-410.93.run)

I can run all java code examples no matter MapView or SceneView.

Thanks and Cheers,

After installation, the OpenGL info is:

$ glxinfo|grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 745/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 410.93
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 410.93
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 410.93
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

MarkBaird
Esri Regular Contributor

Thanks great news - thanks for the update.

0 Kudos