textoverlay: EXC_BAD_ACCESS when rendering text on iOS arm64
Gstreamer 1.16.0 and older
OS: iOS 12.3.1 (16F203) Model: iPhone 8 (Model A1863, A1905, A1906, A1907) Code Type: ARM-64 (Native)
To replicate use an iPad or iPhone that is arm64. This issue is not present on arm7 devices or the simulator.
Add textoverlay to pipeline in iOS tutorial 3; GStreamerBackend.m
pipeline = gst_parse_launch("videotestsrc ! warptv ! videoconvert ! textoverlay text=\"test\" ! autovideosink", &error);
Xcode Backtrace:
* thread #15, name = 'videotestsrc0:src', stop reason = EXC_BAD_ACCESS (code=1, address=0x80d73b58)
* frame #0: 0x0000000100ab504c Tutorial 3`FcObjectLookupOtherTypeById(id=1072) at fcobjs.c:160:10 [opt]
frame #1: 0x0000000100aac424 Tutorial 3`FcObjectValidType [inlined] FcObjectFindById(object=<unavailable>) at fcname.c:44:12 [opt]
frame #2: 0x0000000100aac404 Tutorial 3`FcObjectValidType(object=<unavailable>, type=FcTypeInteger) at fcname.c:75 [opt]
frame #3: 0x0000000100a9feb4 Tutorial 3`FcPatternObjectAddWithBinding(p=0x0000000280d73cc0, object=1072, value=<unavailable>, binding=FcValueBindingStrong, append=1) at fcpat.c:641:10 [opt]
frame #4: 0x0000000100aa0e44 Tutorial 3`FcPatternBuild [inlined] FcPatternAdd(p=0x0000000280d73cc0, object=<unavailable>, append=1) at fcpat.c:691:12 [opt]
frame #5: 0x0000000100aa0e24 Tutorial 3`FcPatternBuild(p=0x0000000000000000) at fcpat.c:1167 [opt]
frame #6: 0x0000000100f1b59c Tutorial 3`pango_fc_font_map_load_fontset [inlined] pango_fc_make_pattern(description=0x00000001044861f0, language=0x0000000280d43bf8, pixel_size=16384, dpi=96, variations=0x0000000000000000) at pangofc-fontmap.c:1471:13 [opt]
frame #7: 0x0000000100f1b478 Tutorial 3`pango_fc_font_map_load_fontset [inlined] pango_fc_fontset_key_make_pattern at pangofc-fontmap.c:1648 [opt]
frame #8: 0x0000000100f1b468 Tutorial 3`pango_fc_font_map_load_fontset [inlined] pango_fc_font_map_get_patterns(fontmap=<unavailable>) at pangofc-fontmap.c:1663 [opt]
frame #9: 0x0000000100f1b468 Tutorial 3`pango_fc_font_map_load_fontset(fontmap=0x0000000104460060, context=<unavailable>, desc=<unavailable>, language=<unavailable>) at pangofc-fontmap.c:1768 [opt]
frame #10: 0x0000000100f112d0 Tutorial 3`itemize_state_process_run at pango-context.c:1397:30 [opt]
frame #11: 0x0000000100f111b8 Tutorial 3`itemize_state_process_run(state=0x000000016fbe1cb0) at pango-context.c:1436 [opt]
frame #12: 0x0000000100f10e40 Tutorial 3`pango_itemize_with_base_dir(context=<unavailable>, base_dir=<unavailable>, text=<unavailable>, start_index=<unavailable>, length=<unavailable>, attrs=<unavailable>, cached_iter=<unavailable>) at pango-context.c:1583:5 [opt]
frame #13: 0x0000000100efa1ac Tutorial 3`pango_layout_check_lines(layout=0x0000000104464050) at pango-layout.c:3953:21 [opt]
frame #14: 0x0000000100efdf58 Tutorial 3`pango_layout_get_extents_internal(layout=0x0000000104464050, ink_rect=0x000000016fbe25d8, logical_rect=0x000000016fbe25c8, line_extents=0x0000000000000000) at pango-layout.c:2536:3 [opt]
frame #15: 0x0000000100efe2d4 Tutorial 3`pango_layout_get_pixel_extents(layout=0x0000000104464050, ink_rect=0x000000016fbe25d8, logical_rect=0x000000016fbe25c8) at pango-layout.c:2761:3 [opt]
frame #16: 0x00000001009cdac0 Tutorial 3`gst_base_text_overlay_render_text [inlined] gst_base_text_overlay_render_pangocairo(overlay=<unavailable>, string=<unavailable>, textlen=4) at gstbasetextoverlay.c:1782:3 [opt]
frame #17: 0x00000001009cda24 Tutorial 3`gst_base_text_overlay_render_text(overlay=0x000000010445c090, text=<unavailable>, textlen=4) at gstbasetextoverlay.c:2203 [opt]
frame #18: 0x00000001009cbcbc Tutorial 3`gst_base_text_overlay_video_chain(pad=<unavailable>, parent=0x000000010445c090, buffer=0x0000000104998e40) at gstbasetextoverlay.c:2814:7 [opt]
frame #19: 0x0000000100d66e34 Tutorial 3`gst_pad_chain_data_unchecked(pad=0x0000000104450be0, type=<unavailable>, data=0x0000000104998e40) at gstpad.c:4326:11 [opt]
frame #20: 0x0000000100d67960 Tutorial 3`gst_pad_push_data(pad=0x0000000104450990, type=4112, data=0x0000000104998e40) at gstpad.c:4582:9 [opt]
frame #21: 0x0000000100d67774 Tutorial 3`gst_pad_push(pad=0x0000000104450990, buffer=0x0000000104998e40) at gstpad.c:4701:9 [opt]
frame #22: 0x0000000100d09198 Tutorial 3`gst_base_transform_chain(pad=<unavailable>, parent=0x00000001044583c0, buffer=<unavailable>) at gstbasetransform.c:2330:15 [opt]
frame #23: 0x0000000100d66e34 Tutorial 3`gst_pad_chain_data_unchecked(pad=0x0000000104450740, type=<unavailable>, data=0x0000000104998e40) at gstpad.c:4326:11 [opt]
frame #24: 0x0000000100d67960 Tutorial 3`gst_pad_push_data(pad=0x00000001044504f0, type=4112, data=0x0000000104998e40) at gstpad.c:4582:9 [opt]
frame #25: 0x0000000100d67774 Tutorial 3`gst_pad_push(pad=0x00000001044504f0, buffer=0x0000000104998e40) at gstpad.c:4701:9 [opt]
frame #26: 0x0000000100d09198 Tutorial 3`gst_base_transform_chain(pad=<unavailable>, parent=0x0000000125000ad0, buffer=<unavailable>) at gstbasetransform.c:2330:15 [opt]
frame #27: 0x0000000100d66e34 Tutorial 3`gst_pad_chain_data_unchecked(pad=0x00000001044502a0, type=<unavailable>, data=0x0000000104998d20) at gstpad.c:4326:11 [opt]
frame #28: 0x0000000100d67960 Tutorial 3`gst_pad_push_data(pad=0x0000000104450050, type=4112, data=0x0000000104998d20) at gstpad.c:4582:9 [opt]
frame #29: 0x0000000100d67774 Tutorial 3`gst_pad_push(pad=0x0000000104450050, buffer=0x0000000104998d20) at gstpad.c:4701:9 [opt]
frame #30: 0x0000000100cf70f0 Tutorial 3`gst_base_src_loop(pad=0x0000000104450050) at gstbasesrc.c:2974:11 [opt]
frame #31: 0x0000000100dcba14 Tutorial 3`gst_task_func(task=0x0000000104998110) at gsttask.c:328:5 [opt]
frame #32: 0x0000000100c40c8c Tutorial 3`g_thread_pool_thread_proxy(data=<unavailable>) at gthreadpool.c:307:15 [opt]
frame #33: 0x0000000100c1a970 Tutorial 3`g_thread_proxy(data=0x0000000103f1d4f0) at gthread.c:784:20 [opt]
frame #34: 0x0000000199e542c0 libsystem_pthread.dylib`_pthread_body + 128
frame #35: 0x0000000199e54220 libsystem_pthread.dylib`_pthread_start + 44
frame #36: 0x0000000199e57cdc libsystem_pthread.dylib`thread_start + 4
Xcode Log with G_DEBUG=fatal_warnings, GST_DEBUG=*:6 attached: dbg.log.xz
Edited by Thibault Saunier