error with scalismo on ubuntu

Skip to first unread message

Jean-Rassaire Fouefack

Aug 2, 2021, 9:11:37 AMAug 2
to scalismo

I get this error when I try to run my scalismo code on ubuntu (the code works fine on Windows) ;

The error seems to be related to scalismoUI, i.e. it occurs when calling scalismoUI. X11GLXDrawableFactory - Could not initialize shared resources for :1
    at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(
Caused by: main-SharedResourceRunner: Unable to create temp OpenGL context(1)
    at jogamp.opengl.x11.glx.X11GLXContext.createImpl(
    at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(
    at jogamp.opengl.GLContextImpl.makeCurrent(
    at jogamp.opengl.GLContextImpl.makeCurrent(
    at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(
    ... 2 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.awt.EventQueue.invokeAndWait(
    at java.awt.EventQueue.invokeAndWait(
    at javax.swing.SwingUtilities.invokeAndWait(
    at scalismo.ui.util.EdtUtil$.onEdtWait(EdtUtil.scala:60)
    at scalismo.ui.api.ScalismoUI.<init>(ScalismoUI.scala:30)
    at scalismo.ui.api.ScalismoUI$.apply(ScalismoUI.scala:72)
    at Application.FittingWithMultiBodyModel$.main(FittingWithMultiBodyModel.scala:30)
    at Application.FittingWithMultiBodyModel.main(FittingWithMultiBodyModel.scala)
Caused by: Profile GL_DEFAULT is not available on X11GraphicsDevice[type .x11, connection :1, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x5e3199a9, isOwner false, <2d55a09, 77cae49a>[count 0, qsz 0, owner <NULL>]]], but: []
    at scalismo.ui.rendering.internal.RenderingComponent.<init>(RenderingComponent.scala:49)
    at scalismo.ui.rendering.RendererPanel.<init>(RendererPanel.scala:80)
    at scalismo.ui.view.ViewportPanel.<init>(ViewportPanel.scala:51)
    at scalismo.ui.view.ViewportPanel3D.<init>(ViewportPanel.scala:103)
    at scalismo.ui.view.perspective.ThreeDOnlyPerspective.<init>(ThreeDOnlyPerspective.scala:27)
    at scalismo.ui.view.perspective.ThreeDOnlyPerspective$.instantiate(ThreeDOnlyPerspective.scala:35)
    at scalismo.ui.view.PerspectivePanel.$anonfun$perspective_$eq$2(PerspectivePanel.scala:55)
    at scalismo.ui.util.EdtUtil$.onEdtWait(EdtUtil.scala:56)
    at scalismo.ui.view.PerspectivePanel.perspective_$eq(PerspectivePanel.scala:55)
    at scalismo.ui.view.PerspectivePanel.<init>(PerspectivePanel.scala:89)
    at scalismo.ui.view.ScalismoFrame.<init>(ScalismoFrame.scala:202)
    at scalismo.ui.view.ScalismoFrame.<init>(ScalismoFrame.scala:63)
    at scalismo.ui.api.ScalismoUI.$anonfun$fr$1(ScalismoUI.scala:31)
    at scalismo.ui.util.EdtUtil$.$anonfun$onEdtWait$1(EdtUtil.scala:60)
    at scala.swing.Swing$$anon$
    at java.awt.event.InvocationEvent.dispatch(
    at java.awt.EventQueue.dispatchEventImpl(
    at java.awt.EventQueue.access$500(
    at java.awt.EventQueue$
    at java.awt.EventQueue$
    at Method)
    at java.awt.EventQueue.dispatchEvent(
    at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(
    at java.awt.EventDispatchThread.pumpOneEventForFilters(
    at java.awt.EventDispatchThread.pumpEventsForFilter(
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(
    at java.awt.EventDispatchThread.pumpEvents(
    at java.awt.EventDispatchThread.pumpEvents(
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:1, 0x7f3b7c000df0, refCount 1, unCloseable false]

Any idea of what could be the problem?

Marcel Luethi

Aug 2, 2021, 9:34:34 AMAug 2
to Jean-Rassaire Fouefack, scalismo
Hi Jean-Rassaire,

Does the fix proposed in this conversation help?

Best regards,

You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Jean-Rassaire Fouefack

Aug 3, 2021, 4:16:27 AMAug 3
to Marcel Luethi, scalismo
Hi Marcel,
There was also another problem, which required uninstalling and reinstalling Cuda.
After that, I didn't have this problem anymore. I think the problem was related to Cuda.

Kind regards

Jean-Rassaire Fouefack

Aug 3, 2021, 11:04:38 AMAug 3
to scalismo
Hi Marcel,
I am getting this error, which basically occurs when the size of the mesh is larger than 2mo.
This only happens in ubuntu. I found some suggestions which are to add the following to the "" file

I did that but actually, this did not work out;

Any idea ?

ERROR: In /vtk/IO/Geometry/vtkSTLReader.cxx, line 378
vtkSTLReader (0x7f72764d2870): STLReader error reading file: /data/tibia.stl Premature EOF while reading point.

free(): double free detected in tcache 2
Reply all
Reply to author
0 new messages