OneTriangleAWT crashes with "glGetString" message.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OneTriangleAWT crashes with "glGetString" message.

iNik
Hi all!

I am trying to run a simple Java example from Using JOGL in AWT etc, but it crashes with

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x623e1694, pid=826, tid=1654510688
#
# JRE version: Java(TM) SE Runtime Environment (8.0_51-b07) (build 1.8.0_51-b07)
# Java VM: Java HotSpot(TM) Client VM (25.51-b07 mixed mode linux-arm )
# Problematic frame:
# C  [libGL.so.1+0x36694]  glGetString+0xc
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid826.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
test.sh and test_dbg.sh crushes with the same message. I will try attach all logs produced.

I use a Freescale i.MX6Q processor with Linux 3.14.28 kernel

P.S.
glxgears run perfectly.

hs_err_pid877.log - test.sh
hs_err_pid800.log - test_dbg.sh
glxinfo:
glxinfo.log

Best regards.
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

Sven Gothel
Administrator
On 07/31/2015 04:40 PM, iNik [via jogamp] wrote:
> Hi all!
>
> I am trying to run a simple Java example from Using JOGL in AWT etc
> <http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing>, but it
> crashes with
>

Please try latest aggregated build,
this might be related to bug 1166
<https://jogamp.org/bugzilla/show_bug.cgi?id=1166>.

~Sven



signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

iNik
This post was updated on .
Hi Sven!

I tried latest build (gluegen b880 and jogl b1418, v2.3, linux-armv6hf, 02 aug 2015) and it is not work for me.

I did a little investigation with "IdeaIC remote debug" and OneTriangle example and found that crush appears at the
this.wait();  : 191 line at the SharedResourceRunner.class.

Here the StackTrace:
"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
          at jogamp.opengl.SharedResourceRunner.doAndWait(SharedResourceRunner.java:247)
          - locked <0x558> (a jogamp.opengl.SharedResourceRunner)
          at jogamp.opengl.SharedResourceRunner.getOrCreateShared(SharedResourceRunner.java:191)
          at jogamp.opengl.egl.EGLDrawableFactory.getOrCreateSharedResourceImpl(EGLDrawableFactory.java:871)
          at jogamp.opengl.egl.EGLDrawableFactory.getOrCreateSharedResourceImpl(EGLDrawableFactory.java:89)
          at jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(GLDrawableFactoryImpl.java:187)
          at jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(GLDrawableFactoryImpl.java:216)
          at com.jogamp.opengl.GLDrawableFactory.createSharedResource(GLDrawableFactory.java:375)
          at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1933)
          at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1866)
          at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1834)
          at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:79)
          at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:229)
          at java.security.AccessController.doPrivileged(AccessController.java:-1)
          at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:215)
          at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2272)
          at com.jogamp.opengl.GLProfile.get(GLProfile.java:987)
          at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:721)
          at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:732)
          at OneTriangleAWT.main(OneTriangleAWT.java:19)

I put a brakepoint (- locked <0x558> ) at this line (191), and when I do the step, application at the target board crushes with "glGetString..." message.
As I understand, at this moment control reaches to the "dead" thread.

P.S. At the HOST machine with Linux Mint 17 everything works fine.
I am ready to provide any required information.
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

iNik
Hi!

gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 764]
0x62852694 in glGetString (name=7936) at g_api_entry.c:1395
1395    g_api_entry.c: No such file or directory.
(gdb) where
#0  0x62852694 in glGetString (name=7936) at g_api_entry.c:1395
#1  0x621a5768 in Java_jogamp_opengl_GLContextImpl_glGetStringInt ()
   from /var/volatile/tmp/jogamp_0000/file_cache/jln3949628399896259070/jln3685028594061545856/libjogl_desktop.so
#2  0x741ed3fc in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

Sven Gothel
Administrator
On 08/04/2015 09:33 AM, iNik [via jogamp] wrote:

> Hi!
>
> gdb backtrace:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 764]
> 0x62852694 in glGetString (name=7936) at g_api_entry.c:1395
> 1395    g_api_entry.c: No such file or directory.
> (gdb) where
> #0  0x62852694 in glGetString (name=7936) at g_api_entry.c:1395
> #1  0x621a5768 in Java_jogamp_opengl_GLContextImpl_glGetStringInt ()
>    from
> /var/volatile/tmp/jogamp_0000/file_cache/jln3949628399896259070/jln3685028594061545856/libjogl_desktop.so
>
> #2  0x741ed3fc in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Crash happens in:
  0x627b0694: glGetString+0xc in /usr/lib/libGL.so.1

Coming from our initialization thread, where the context is current:
j  jogamp.opengl.GLContextImpl.glGetStringInt(IJ)Ljava/lang/String;+0
j  jogamp.opengl.GLContextImpl.initGLRendererAndGLVersionStrings()Z+107
j  jogamp.opengl.GLContextImpl.setGLFunctionAvailability(ZIIIZZ)Z+117
j  jogamp.opengl.egl.EGLContext.createImpl(J)Z+596
j  jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+224
j  jogamp.opengl.GLContextImpl.makeCurrent(Z)I+488
j  jogamp.opengl.GLContextImpl.makeCurrent()I+2
j  jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.mapAvailableEGLESConfig(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;[I[I[I[Lcom/jogamp/opengl/GLRendererQuirks;)Z+865
j  jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/egl/EGLDrawableFactory$SharedResource;+201
j  jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+8

Looks similar to (?):
  <https://jogamp.org/bugzilla/show_bug.cgi?id=1062>

  ^^ discusses same crash and _why_ the symbols/function
     enters libGL's glGetString().

Interesting ..

~Sven



signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

iNik
Hello!

I removed from /usr/lib all libEGL.so* and libGLES* and seems that error is gone.

Thank You.
Reply | Threaded
Open this post in threaded view
|

Re: OneTriangleAWT crashes with "glGetString" message.

Sven Gothel
Administrator
On 08/04/2015 03:41 PM, iNik [via jogamp] wrote:
> Hello!
>
> I removed from /usr/lib all libEGL.so* and libGLES* and seems that error is gone.

If possible, please validate recommended workarounds as mentioned in:
  <https://jogamp.org/bugzilla/show_bug.cgi?id=1062#c15>

(either via your own build, or wait for next aggregated build)

~Sven



signature.asc (828 bytes) Download Attachment