[Bug 744999] New: Crash in OpenGL ES draw_cb on iOS when going to background

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Feb 23 00:55:27 PST 2015


            Bug ID: 744999
           Summary: Crash in OpenGL ES draw_cb on iOS when going to
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: dkabyshev at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Found on GStreamer master (15.02.15), iOS 8.1.2. 
While testing our application on iOS, we’ve faced with a crash when going to
background with a running pipeline.
The crash happened inside draw_cb (OpenGL ES related code).
I assume this is because Apple’s strict rules regarding background task:

Do not make any OpenGL ES calls from your code. You must not create an
EAGLContext object or issue any OpenGL ES drawing commands of any kind while
running in the background. Using these calls causes your app to be killed
immediately. Apps must also ensure that any previously submitted commands have
completed before moving to the background. For information about how to handle
OpenGL ES when moving to and from the background, see Implementing a
Multitasking-aware OpenGL ES Application in OpenGL ES Programming Guide for
Link to guide:

Could you please help me with some instructions how we could overcome this.
We can’t stop the pipeline, because it is a Lifestream. 

Here’s a pipeline:
avfvideosrc ! video/x-raw,format=NV12,width=960,height=540,framerate=30/1 ! tee
name=tp tp. ! queue ! autovideosink tp. ! queue ! videoconvert ! vtenc_h264
bitrate=2500 max-keyframe-interval-duration=2000000000 max-keyframe-interval=60
allow-frame-reordering=false realtime=true quality=0.5 ! h264parse !
! queue ! mux. autoaudiosrc ! audioconvert ! voaacenc bitrate=64000 ! aacparse
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! flvmux
streamable=true name=mux ! queue max-size-buffers=0 max-size-time=0
max-size-bytes=0 ! rtmpsink location=‘%url_was_here% live=1’

Stack trace:
0libGPUSupportMercury.dylib0x2c9e68a6 gpus_ReturnNotPermittedKillClient + 10
1IMGSGX543GLDriver0x246930e0 <redacted> + 140
2GLEngine0x286c3318 gliPresentViewES_Exec + 176
3GLEngine0x286c3248 gliPresentViewES + 64
4OpenGLES0x286ce068 -[EAGLContext presentRenderbuffer:] + 64
5Trace0x00ccc470 draw_cb + 172
6Trace0x00ccdbb8 _run_message_sync + 20
7Trace0x00ccc3a8 _run_message + 12
8Trace0x00b8b698 g_main_context_dispatch + 196
9Trace0x00b8b8c0 g_main_context_iterate + 300
10Trace0x00b8ba88 g_main_loop_run + 180
11Trace0x00ccc188 gst_gl_window_eagl_run + 48
12Trace0x00cc31e8 gst_gl_context_create_thread + 504
13Trace0x00b7cad0 g_thread_proxy + 76
14libsystem_pthread.dylib0x33c53e60 _pthread_body + 132

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.

More information about the gstreamer-bugs mailing list