# Processing and pcduino3b problem

**URL:** <https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [May 15, 2019, 1:18pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269 "2019-05-15T13:18:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://discourse.processing.org/u/ben)\
**Post date:** [May 15, 2019, 1:18pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/1 "2019-05-15T13:18:51Z")

</div>

hello!

I have a problem to use processing,  
When i run it, the result is :  
If you know the issue, thanks a lot !

```auto
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v0.0.0, connection :0.0, unitID 0, handle 0x0, owner true, ResourceToolkitLock[obj 0x1018d42, isOwner true, <1c67ed2, 1f9e632>[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 0x3008/0x3000 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: EGLGLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1c91f4b, isOwner true, <c086d1, f781c0>[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 0x3008/0x3000 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)
Use surface.setTitle() instead of frame.setTitle in Processing 3
"Arial" is not available, so another font will be used. Use PFont.list() to show available fonts.
NullPointerException

```

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 15, 2019, 1:28pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/2 "2019-05-15T13:28:07Z")

</div>

Show your entire code

Sometimes it’s something small like loading before size()

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://discourse.processing.org/u/ben)\
**Post date:** [May 15, 2019, 7:14pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/3 "2019-05-15T19:14:03Z")

</div>

Here the minimum of the code makes this mistake

```auto
// Librairies
import java.util.*;
import processing.video.*;
import jp.nyatla.nyar4psg.*;

// Déclaration des objets et des constantes
Capture cam;

// Déclaration des variables globales
String extcam = "/dev/video0";

PFont maPolice;
String[] cameras;

// Initialisations
void setup() 
{

    

  size(1280, 480,P3D); background(200); smooth(); //noLoop();
  
 
  cameras = Capture.list();
  
  if (cameras.length == 0) 

  {
    println("No camera"); 
    exit();
  } 
  else 
  {
    println("cameras:");
    for (int i = 0; i < cameras.length; i++) println(cameras[i]);
  }
  cam=new Capture(this,640,480,extcam); 
  cam.start();
}

// Programme principal
void draw()
{
  

 
  if (cam.available()) cam.read();
  cam.updatePixels(); image(cam,0,0);

  
}

```

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://discourse.processing.org/u/ben)\
**Post date:** [May 16, 2019, 8:24pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/4 "2019-05-16T20:24:24Z")

</div>

any ideas?

thanks a lot !

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 19, 2019, 9:03pm UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/5 "2019-05-19T21:03:40Z")

</div>

> [@ben](#):
>
> import jp.nyatla.nyar4psg.\*;

What is this import? Are you using it in the provided minimal sketch above? If you remove it, does the error go away?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [May 20, 2019, 4:55am UTC](https://discourse.processing.org/t/processing-and-pcduino3b-problem/11269/6 "2019-05-20T04:55:24Z")

</div>

There are a few additional important details that you need to describe:

What is this other import in your sketch? Description, github link or library webpage? What is this library for? Removing the library resolves the problem?

Second, when you get the error, what line gets highlighted in the Processing editor?

What OS are you using?

The code you provided, beside the alien library, is a standard code available as an example in the PDE so it should work.

Kf
