imx8mm: eglInitialize segmentation fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mm: eglInitialize segmentation fault

1,250 Views
242426
Contributor I

I'm trying to run the following code on the Evalution kit "8MMINILPD4-EVK" (image "LF_v5.10.72-2.2.0_images_IMX8MMEVK").

#include <stdio.h>
#include <X11/Xlib.h>
#include <EGL/egl.h>

int main(int argc, char *argv[])
{
        Display *xdisplay = XOpenDisplay(0);
        if(!xdisplay){
                printf("XOpenDisplay err\n");
                return 1;
        }
        EGLDisplay edisplay = eglGetDisplay(xdisplay);
        if( edisplay == EGL_NO_DISPLAY ){
                printf("eglGetDisplay err\n");
                return 1;
        }
        EGLint m_major_version, m_minor_version;
        EGLBoolean ok = eglInitialize(edisplay, &m_major_version, &m_minor_version);
        if( !ok ){
                printf("eglInitialize err\n");
                return 1;
        }
        printf("succesful!, ver: %d.%d\n", m_major_version,m_minor_version);
        return 0;
}

compile:

g++ main.cpp -g -lX11 -lEGL -o eglinfo

but on eglInitialize progmamm hang:

root@imx8mmevk:/tmp# DISPLAY=:0 ./eglinfo 
Segmentation fault

backtrace:

(gdb) bt
#0  0x0000fffff7729ce0 in __GI___pthread_mutex_lock (mutex=0xf3) at pthread_mutex_lock.c:67
#1  0x0000fffff77a6400 in wl_proxy_create_wrapper () from /usr/lib/libwayland-client.so.0
#2  0x0000fffff7e40eb0 in ?? () from /usr/lib/libEGL.so.1
#3  0x0000fffff7e339f4 in eglInitialize () from /usr/lib/libEGL.so.1
#4  0x0000aaaaaaaa0994 in main (argc=1, argv=0xfffffffffbb8) at main.cpp:18

please help.

0 Kudos
Reply
1 Reply

1,230 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Please follow our GPU demo to check your code :

https://github.com/NXPmicro/gtec-demo-framework/tree/master/DemoApps

0 Kudos
Reply