After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785766 - GLWINDOW EAGL bug with iOS11 and XCode 9.0 beta 4
GLWINDOW EAGL bug with iOS11 and XCode 9.0 beta 4
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.12.2
Other Mac OS
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 787697 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-08-03 09:44 UTC by Elio Francesconi
Modified: 2018-11-03 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Elio Francesconi 2017-08-03 09:44:13 UTC
I'm testing compatibility with iOS 11 before the Apple release in september and I noticed a crash on GLWindow EAGL module.

Before crashing i see some warning then the crash on draw_cb.
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 1909, TID: 1403054, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   GstPlay                             0x0000000102503594 gst_gl_context_eagl_update_layer + 480
5   GstPlay                             0x0000000102504a60 gst_gl_window_eagl_set_window_handle + 176
6   GstPlay                             0x00000001035ebd78 _set_window_handle_cb + 104
7   GstPlay                             0x0000000102504e54 __gst_gl_window_eagl_send_message_async_block_invoke + 72
8   libdispatch.dylib                   0x00000001063498ec _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001063498ac _dispatch_client_callout + 16
10  libdispatch.dylib                   0x0000000106358380 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x000000010634ce30 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010635935c _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000106360298 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001851a024c _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x000000018519fe9c start_wqthread + 4


2017-08-02 10:27:47.576231+0200 GstPlay[1909:1403054] [reports] Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 1909, TID: 1403054, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   GstPlay                             0x0000000102503594 gst_gl_context_eagl_update_layer + 480
5   GstPlay                             0x0000000102504a60 gst_gl_window_eagl_set_window_handle + 176
6   GstPlay                             0x00000001035ebd78 _set_window_handle_cb + 104
7   GstPlay                             0x0000000102504e54 __gst_gl_window_eagl_send_message_async_block_invoke + 72
8   libdispatch.dylib                   0x00000001063498ec _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001063498ac _dispatch_client_callout + 16
10  libdispatch.dylib                   0x0000000106358380 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x000000010634ce30 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010635935c _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000106360298 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001851a024c _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x000000018519fe9c start_wqthread + 4



Thread 8 Queue : org.freedesktop.gstreamer.glwindow (serial)
  • #0 _platform_memmove
  • #1 SCNGetPerformanceStatistics
  • #2 __clang_call_terminate
  • #3 __clang_call_terminate
  • #4 __clang_call_terminate
  • #5 __clang_call_terminate
  • #6 gst_gl_context_eagl_swap_buffers at /Users/eggzero/Projects/EGGZERO/SRC/gst-examples/playback/player/ios/eagl/gstglcontext_eagl.m:341
  • #7 draw_cb at /Users/eggzero/Projects/EGGZERO/SRC/gst-examples/playback/player/ios/eagl/gstglwindow_eagl.m:208
  • #8 _run_message_sync at /Users/jan/devel/cerbero/build/sources/ios_universal/arm64/gst-plugins-bad-1.0-1.12.2/gst-libs/gst/gl/gstglwindow.c:571
  • #9 __gst_gl_window_eagl_send_message_async_block_invoke at /Users/eggzero/Projects/EGGZERO/SRC/gst-examples/playback/player/ios/eagl/gstglwindow_eagl.m:164

To reproduce the issue use:

GStreamer 1.12.2
GstPlay: git://anongit.freedesktop.org/gstreamer/gst-examples
Compile GstPlay with XCode 9.0 beta 4 and play a video.
Comment 1 Nicola 2017-10-03 09:53:19 UTC
I have the same warning in my app, but it does't crash here

Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 676, TID: 186469, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   MobileMediaLibrary                  0x0000000105602cd4 gst_gl_context_eagl_update_layer + 652
5   MobileMediaLibrary                  0x0000000105602558 gst_gl_window_eagl_set_window_handle + 68
6   MobileMediaLibrary                  0x00000001055fee20 _set_window_handle_cb + 104
7   MobileMediaLibrary                  0x000000010560278c __gst_gl_window_eagl_send_message_async_block_invoke + 36
8   libdispatch.dylib                   0x00000001077fd49c _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001077fd45c _dispatch_client_callout + 16
10  libdispatch.dylib                   0x000000010780c110 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x00000001078009a4 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010780d104 _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000107814100 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001867eefe0 _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x00000001867eec30 start_wqthread + 4
2017-10-03 11:39:14.434177+0200 MobileMediaLibrary[676:186469] [reports] Main Thread Checker: UI API called on a background thread: -[UIView frame]
PID: 676, TID: 186469, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   MobileMediaLibrary                  0x0000000105602cd4 gst_gl_context_eagl_update_layer + 652
5   MobileMediaLibrary                  0x0000000105602558 gst_gl_window_eagl_set_window_handle + 68
6   MobileMediaLibrary                  0x00000001055fee20 _set_window_handle_cb + 104
7   MobileMediaLibrary                  0x000000010560278c __gst_gl_window_eagl_send_message_async_block_invoke + 36
8   libdispatch.dylib                   0x00000001077fd49c _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001077fd45c _dispatch_client_callout + 16
10  libdispatch.dylib                   0x000000010780c110 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x00000001078009a4 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010780d104 _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000107814100 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001867eefe0 _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x00000001867eec30 start_wqthread + 4
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 676, TID: 186469, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   MobileMediaLibrary                  0x0000000105602ac4 gst_gl_context_eagl_update_layer + 124
5   MobileMediaLibrary                  0x0000000105602558 gst_gl_window_eagl_set_window_handle + 68
6   MobileMediaLibrary                  0x00000001055fee20 _set_window_handle_cb + 104
7   MobileMediaLibrary                  0x000000010560278c __gst_gl_window_eagl_send_message_async_block_invoke + 36
8   libdispatch.dylib                   0x00000001077fd49c _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001077fd45c _dispatch_client_callout + 16
10  libdispatch.dylib                   0x000000010780c110 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x00000001078009a4 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010780d104 _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000107814100 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001867eefe0 _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x00000001867eec30 start_wqthread + 4
2017-10-03 11:39:15.167962+0200 MobileMediaLibrary[676:186469] [reports] Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 676, TID: 186469, Thread name: (none), Queue name: org.freedesktop.gstreamer.glwindow, QoS: 0
Backtrace:
4   MobileMediaLibrary                  0x0000000105602ac4 gst_gl_context_eagl_update_layer + 124
5   MobileMediaLibrary                  0x0000000105602558 gst_gl_window_eagl_set_window_handle + 68
6   MobileMediaLibrary                  0x00000001055fee20 _set_window_handle_cb + 104
7   MobileMediaLibrary                  0x000000010560278c __gst_gl_window_eagl_send_message_async_block_invoke + 36
8   libdispatch.dylib                   0x00000001077fd49c _dispatch_call_block_and_release + 24
9   libdispatch.dylib                   0x00000001077fd45c _dispatch_client_callout + 16
10  libdispatch.dylib                   0x000000010780c110 _dispatch_queue_serial_drain + 692
11  libdispatch.dylib                   0x00000001078009a4 _dispatch_queue_invoke + 332
12  libdispatch.dylib                   0x000000010780d104 _dispatch_root_queue_drain_deferred_wlh + 424
13  libdispatch.dylib                   0x0000000107814100 _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib             0x00000001867eefe0 _pthread_wqthread + 932
15  libsystem_pthread.dylib             0x00000001867eec30 start_wqthread + 4


after this warning is printed the player start, I'm testing with Xcode 9 final
Comment 2 Jan Schmidt 2018-01-17 11:23:19 UTC
This used to be done via dispatch to the UI thread, but was removed in cff2d7:

commit cff2d74cd4597d5a0ab5d35477ac09815f7b50cb
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Jul 6 13:28:05 2015 +0300

    gl/eagl: Don't call anything synchronously from the main thread
    
    This will deadlock if the main thread is the one who creates the GstGLContext.
    All things we call from the main thread should be possible from any thread.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751101

It looks like there are a few calls that should be dispatched to the main thread still after all.
Comment 3 Matthew Waters (ystreet00) 2018-05-06 13:05:55 UTC
*** Bug 787697 has been marked as a duplicate of this bug. ***
Comment 4 GStreamer system administrator 2018-11-03 11:58:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/372.