[MIR] SDL_Init() crashes on the bq Aquaris E4.5 phone

Bug #1448544 reported by Sturm Flut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libsdl2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Device: bq Aquaris E4.5 Ubuntu Edition
Environment: Ubuntu 14.10 (r21)

libSDL2 has been ported to Mir and the Mir backend should therefore work on the phone too. libSDL2 is not shipped with the device's system image, so I built libSDL2 manually on the device, copied the resulting files over and shipped the shared object as part of the Click package. The desktop file references a shell script which sets the needed LD_LIBRARY_PATH and then calls the actual binary. So far, so good.

The binary kept crashing with a segmentation fault in its call to SDL_Init(SDL_INIT_VIDEO). For some reason I managed to get it working a single time (see the attached screenshot) after trying enough times, in all other cases it would crash. I managed to get a GDB trace and it points to line 304 in SDL2-2.0.2/src/video/SDL_egl.c , but I don't have enough knowledge about video APIs to find out what's happening:

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb6fa4baa in SDL_EGL_ChooseConfig (_this=_this@entry=0x28660) at /home/phablet/SDL2-2.0.2/src/video/SDL_egl.c:304
#2 0xb6faf658 in MIR_GL_LoadLibrary (_this=0x28660, path=0x0) at /home/phablet/SDL2-2.0.2/src/video/mir/SDL_miropengl.c:71
#3 0xb6fadc88 in SDL_GL_LoadLibrary_REAL (path=0x0) at /home/phablet/SDL2-2.0.2/src/video/SDL_video.c:2398
#4 SDL_CreateWindow_REAL (title=0xb6fbd198 "OpenGL test", x=x@entry=-32, y=y@entry=-32, w=w@entry=32, h=h@entry=32,
    flags=flags@entry=10) at /home/phablet/SDL2-2.0.2/src/video/SDL_video.c:1237
#5 0xb6fad916 in ShouldUseTextureFramebuffer () at /home/phablet/SDL2-2.0.2/src/video/SDL_video.c:189
#6 SDL_VideoInit_REAL (driver_name=<optimized out>) at /home/phablet/SDL2-2.0.2/src/video/SDL_video.c:503
#7 0xb6f3215c in SDL_InitSubSystem_REAL (flags=16416) at /home/phablet/SDL2-2.0.2/src/SDL.c:173
#8 SDL_Init_REAL (flags=<optimized out>) at /home/phablet/SDL2-2.0.2/src/SDL.c:244
#9 0x00010be8 in main ()

I configured the library as follows:

./configure --disable-rpath --enable-sdl-dlopen --disable-loadso --disable-nas --disable-esd --disable-arts --disable-alsa-shared --disable-pulseaudio-shared --disable-video-x11 --disable-x11-shared --disable-video-directfb --enable-video-opengles --disable-mir-shared --enable-video-mir

The configure summary was the following:

SDL2 Configure Summary:
Building Shared Libraries
Building Static Libraries
Enabled modules : atomic audio video render events joystick haptic power filesystem threads timers file cpuinfo assembly
Assembly Math :
Audio drivers : disk dummy oss
Video drivers : dummy mir opengl opengl_es2
Input drivers : linuxev linuxkd
Using libudev : YES
Using dbus : YES

Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Neil McPhail (njmcphail) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

we do not disable mir shared in 2.0.4, is this an issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.