You are not logged in.

#1 2021-07-25 14:07:12

Blboun
Member
Registered: 2021-05-30
Posts: 10

Processing 3 OpenGL error when using P3D [SOLVED]

Hi everyone,
I used Processing 3 some time ago on Ubuntu and later on Fedora, now I am using Arch linux and I am unable to run all my sketches...
I downloaded processing from processing.org website, did everything by documentation and now I can run Processing 3 IDE just fine.
When I use this code

size(720,640,P3D);

inside setup function it throws this error

Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v0.0.0, connection :0, unitID 0, handle 0x0, owner true, ResourceToolkitLock[obj 0x5ac02a45, isOwner true, <1cdfbb5f, 224d9e07>[count 1, qsz 0, owner <main-SharedResourceRunner>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:518)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3002 on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:297)
    [1]: jogamp.opengl.egl.EGLDisplayUtil.access$300(EGLDisplayUtil.java:58)
    [2]: jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:320)
    [3]: com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:125)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:532)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:516)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.lang.Thread.run(Thread.java:748)
Caught handled GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x7f6f71b6, isOwner false, <50f2561d, 4a666ecc>[count 0, qsz 0, owner <NULL>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:306)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: main-SharedResourceRunner: Unable to create temp OpenGL context(1) on thread main-SharedResourceRunner
    [0]: jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:390)
    [1]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
    [2]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
    [3]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
    [4]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:277)
    [5]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [6]: java.lang.Thread.run(Thread.java:748)
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x7f6f71b6, isOwner true, <50f2561d, 4a666ecc>[count 1, qsz 0, owner <main-SharedResourceRunner>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:518)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3002 on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:297)
    [1]: jogamp.opengl.egl.EGLDisplayUtil.access$300(EGLDisplayUtil.java:58)
    [2]: jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:320)
    [3]: com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:125)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:532)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:516)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.lang.Thread.run(Thread.java:748)
com.jogamp.opengl.GLException: Profiles [GL4bc, GL4, GL3bc, GL3, GLES3, GL2, GLES2] not available on device X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x7f6f71b6, isOwner false, <50f2561d, 4a666ecc>[count 0, qsz 0, owner <NULL>]]]
	at com.jogamp.opengl.GLProfile.get(GLProfile.java:1039)
	at com.jogamp.opengl.GLProfile.get(GLProfile.java:1050)
	at com.jogamp.opengl.GLProfile.getMaxProgrammable(GLProfile.java:826)
	at processing.opengl.PSurfaceJOGL.initGL(PSurfaceJOGL.java:203)
	at processing.opengl.PSurfaceJOGL.initFrame(PSurfaceJOGL.java:136)
	at processing.core.PApplet.initSurface(PApplet.java:11035)
	at processing.core.PApplet.runSketch(PApplet.java:10922)
	at processing.core.PApplet.main(PApplet.java:10620)
^C^[[A(base) [cyrda@arch processing-3.sudo ./processing-java --sketch=hypercube --run
[sudo] password for cyrda: 
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v0.0.0, connection :0, unitID 0, handle 0x0, owner true, ResourceToolkitLock[obj 0x4368d9fb, isOwner true, <5d1d4fc2, 3ba4af0c>[count 1, qsz 0, owner <main-SharedResourceRunner>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:518)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3002 on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:297)
    [1]: jogamp.opengl.egl.EGLDisplayUtil.access$300(EGLDisplayUtil.java:58)
    [2]: jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:320)
    [3]: com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:125)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:532)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:516)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.lang.Thread.run(Thread.java:748)
Caught handled GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x10b4d277, isOwner false, <490b4feb, 7230683c>[count 0, qsz 0, owner <NULL>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:306)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: main-SharedResourceRunner: Unable to create temp OpenGL context(1) on thread main-SharedResourceRunner
    [0]: jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:390)
    [1]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
    [2]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
    [3]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
    [4]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:277)
    [5]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [6]: java.lang.Thread.run(Thread.java:748)
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x10b4d277, isOwner true, <490b4feb, 7230683c>[count 1, qsz 0, owner <main-SharedResourceRunner>]]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:518)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:748)
Caused[0] by GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3002 on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:297)
    [1]: jogamp.opengl.egl.EGLDisplayUtil.access$300(EGLDisplayUtil.java:58)
    [2]: jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:320)
    [3]: com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:125)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:532)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:516)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.lang.Thread.run(Thread.java:748)
com.jogamp.opengl.GLException: Profiles [GL4bc, GL4, GL3bc, GL3, GLES3, GL2, GLES2] not available on device X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x10b4d277, isOwner false, <490b4feb, 7230683c>[count 0, qsz 0, owner <NULL>]]]
	at com.jogamp.opengl.GLProfile.get(GLProfile.java:1039)
	at com.jogamp.opengl.GLProfile.get(GLProfile.java:1050)
	at com.jogamp.opengl.GLProfile.getMaxProgrammable(GLProfile.java:826)
	at processing.opengl.PSurfaceJOGL.initGL(PSurfaceJOGL.java:203)
	at processing.opengl.PSurfaceJOGL.initFrame(PSurfaceJOGL.java:136)
	at processing.core.PApplet.initSurface(PApplet.java:11035)
	at processing.core.PApplet.runSketch(PApplet.java:10922)
	at processing.core.PApplet.main(PApplet.java:10620)

but if I remove the "P3D" it works just fine. (But I can't use functions provided by using P3D, it's just 2D)
Same error shows up, when I try to run it using processing-java from command line.
I've installed OpenJDK 8 (jdk and jre), but processing downloaded from their site comes with it's own java.


I've searched a lot but didn't found much.

Thanks in advance for any help

My hardware:
CPU: Intel Core i5-8600
GPU: NVidia GeForce GTX1070 (newest graphics drivers)
RAM: 16GB

Last edited by Blboun (2021-07-28 13:26:11)

Offline

#2 2021-07-26 11:28:30

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,703

Re: Processing 3 OpenGL error when using P3D [SOLVED]

Sounds like a graphics issue.

Your previous thread was also about graphics issues and doesn't make clear if/how you solved it.

Please post xorg log and outputs of

$ glxinfo -B
$ xrandr --listproviders

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2021-07-26 13:46:41

Blboun
Member
Registered: 2021-05-30
Posts: 10

Re: Processing 3 OpenGL error when using P3D [SOLVED]

Output of "glxinfo -B"

(base) [cyrda@arch ~]$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 8192 MB
    Currently available dedicated video memory: 6726 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1070/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.57.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 470.57.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.57.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Output of "xrandr --listproviders"

(base) [cyrda@arch ~]$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 7 associated providers: 0 name:NVIDIA-0

I don't exactly remember how I solved last issue.... but it was combination of replies on that thread. Now my graphics drivers are working properly how they should.

Offline

#4 2021-07-26 14:41:30

seth
Member
Registered: 2012-09-03
Posts: 63,945

Re: Processing 3 OpenGL error when using P3D [SOLVED]

Xwayland issue?

echo $XDG_SESSION_TYPE
loginctl session-status

Offline

#5 2021-07-26 17:32:00

Blboun
Member
Registered: 2021-05-30
Posts: 10

Re: Processing 3 OpenGL error when using P3D [SOLVED]

output of "echo $XDG_SESSION_TYPE":

x11

output of "loginctl session-status":

(base) [cyrda@arch ~]$ loginctl session-status
2 - cyrda (1000)
           Since: Mon 2021-07-26 06:32:57 CEST; 12h ago
          Leader: 11909 (lxdm-session)
            Seat: seat0; vc1
             TTY: tty1
         Service: lxdm; type x11; class user
           State: active
            Unit: session-2.scope
                  ├─  11909 /usr/lib/lxdm/lxdm-session
                  ├─  11916 i3
                  ├─  11938 lxsession
                  ├─  11975 lxpolkit
                  ├─  11980 lxclipboard
                  ├─  11983 st -n dropdown -f mono:pixelsize=24 -e R
                  ├─  11992 st -n manual -f mono:pixelsize=18 -e w3m -cols 200 /home/cyrda/.reference.html
                  ├─  11994 picom -f
                  ├─  11996 i3bar --transparency --bar_id=bar-0 --socket=/run/user/1000/i3/ipc-socket.11916
                  ├─  12003 /usr/bin/ssh-agent -s
                  ├─  12012 i3blocks -c /home/cyrda/.config/i3blocks/i3blocks.conf
                  ├─  12028 conky -c /home/cyrda/.config/i3/.i3wm-1rc
                  ├─  12051 conky -c /home/cyrda/.config/i3/.i3wm-2rc
                  ├─ 202981 multimc
                  ├─ 481227 /opt/discord/Discord
                  ├─ 481230 "/opt/discord/Discord --type=zygote --no-zygote-sandbox"
                  ├─ 481231 "/opt/discord/Discord --type=zygote"
                  ├─ 481233 "/opt/discord/Discord --type=zygote"
                  ├─ 481261 "/opt/discord/Discord --type=gpu-process --field-trial-handle=6160691932560446807,802312947315630246,131072 --enable-features=We>
                  ├─ 481269 "/opt/discord/Discord --type=utility --field-trial-handle=6160691932560446807,802312947315630246,131072 --enable-features=WebCom>
                  ├─ 481317 "/opt/discord/Discord --type=broker"
                  ├─ 481332 "/opt/discord/Discord --type=renderer --autoplay-policy=no-user-gesture-required --field-trial-handle=6160691932560446807,802312>
                  ├─ 481387 "/opt/discord/Discord --type=utility --field-trial-handle=6160691932560446807,802312947315630246,131072 --enable-features=WebCom>
                  ├─ 487154 /usr/lib/firefox/firefox
                  ├─ 487247 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 248244 -jsInit 285176 -parentBuildID 202>
                  ├─ 487288 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 309 -prefMapSize 248244 -jsInit 285176 -parentBuildID 2>
                  ├─ 487456 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5949 -prefMapSize 248244 -jsInit 285176 -parentBuildID >
                  ├─ 487765 /usr/lib/firefox/firefox -contentproc -parentBuildID 20210722141356 -prefsLen 5949 -prefMapSize 248244 -appdir /usr/lib/firefox/>
                  ├─ 559224 /usr/lib/firefox/firefox -contentproc -childID 14 -isForBrowser -prefsLen 6993 -prefMapSize 248244 -jsInit 285176 -parentBuildID>
                  ├─ 734741 /usr/lib/firefox/firefox -contentproc -childID 30 -isForBrowser -prefsLen 9697 -prefMapSize 248244 -jsInit 285176 -parentBuildID>
                  ├─ 771629 /usr/lib/firefox/firefox -contentproc -childID 31 -isForBrowser -prefsLen 9857 -prefMapSize 248244 -jsInit 285176 -parentBuildID>
                  ├─1018273 /usr/lib/jvm/java-8-openjdk/jre/bin/java -Xmx8G -Xms512m -Xmx4096m -Duser.language=en "-Djava.library.path=/home/cyrda/.local/sh>
                  ├─1018776 /usr/lib/firefox/firefox -contentproc -childID 34 -isForBrowser -prefsLen 9911 -prefMapSize 248244 -jsInit 285176 -parentBuildID>
                  ├─1079242 /usr/bin/python /usr/bin/terminator
                  ├─1079262 /bin/bash
                  ├─1079763 loginctl session-status
                  └─1079764 less

Jul 26 06:39:07 arch sudo[24940]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jul 26 06:39:07 arch sudo[24940]:    cyrda : TTY=pts/0 ; PWD=/home/cyrda ; USER=root ; COMMAND=/usr/bin/setxkbmap -layout cz
Jul 26 06:39:07 arch sudo[24940]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Jul 26 06:39:07 arch sudo[24940]: pam_unix(sudo:session): session closed for user root
Jul 26 07:11:39 arch sudo[68776]: pam_unix(sudo:auth): authentication failure; logname= uid=1000 euid=0 tty=/dev/pts/1 ruser=cyrda rhost=  user=cyrda
Jul 26 07:11:39 arch sudo[68776]: pam_systemd_home(sudo:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jul 26 07:11:43 arch sudo[68776]:    cyrda : TTY=pts/1 ; PWD=/home/cyrda ; USER=root ; COMMAND=/usr/bin/setxkbmap -layout cz
Jul 26 07:11:43 arch sudo[68776]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Jul 26 07:11:43 arch sudo[68776]: pam_unix(sudo:session): session closed for user root
Jul 26 07:34:04 arch vlc[98945]: QObject::~QObject: Timers cannot be stopped from another thread

Offline

#6 2021-07-26 19:38:57

seth
Member
Registered: 2012-09-03
Posts: 63,945

Re: Processing 3 OpenGL error when using P3D [SOLVED]

Nope.

https://github.com/VirtualGL/virtualgl/ … -383246892
This is probably https://bugs.archlinux.org/task/71123 which would (should…) not apply to you, but the workaround might help.

Offline

#7 2021-07-27 05:59:42

Blboun
Member
Registered: 2021-05-30
Posts: 10

Re: Processing 3 OpenGL error when using P3D [SOLVED]

From: https://github.com/VirtualGL/virtualgl/ … -383246892

pass -Djogl.disable.opengles to java when launching ClearVolume

Well, I don't know how to pass some arguments to java when using processing, I was trying similar fix before, but I didn't find a way to pass some arguments to java inside processing

Offline

#8 2021-07-27 06:14:13

seth
Member
Registered: 2012-09-03
Posts: 63,945

Re: Processing 3 OpenGL error when using P3D [SOLVED]

export _JAVA_OPTIONS='-Djogl.disable.opengles'

Offline

#9 2021-07-28 06:03:39

Blboun
Member
Registered: 2021-05-30
Posts: 10

Re: Processing 3 OpenGL error when using P3D [SOLVED]

Thanks! That worked. I hope it didn't screw up my entire Java 8 but now it seems to be working OK. Again, thank you very much!

Offline

#10 2021-07-28 06:07:51

seth
Member
Registered: 2012-09-03
Posts: 63,945

Re: Processing 3 OpenGL error when using P3D [SOLVED]

You only need to export that to the Processing … process (clever program name…), in doubt with a wrapper script in /usr/local/bin to call

#!/bin/sh
env _JAVA_OPTIONS='-Djogl.disable.opengles' /usr/bin/processing "$@" & disown

or so (the important part is to use the absolute binary path to not recurse the wrapper - this happens a lot, even to people who perfectly know better ;-)

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB