GNOME Bugzilla – Bug 709734
speed: Crashes when using more than one audio channel
Last modified: 2013-10-10 10:38:10 UTC
I get a crash in my application which uses GStreamer backend when I start playing a track with the "speed" effect enabled. The value was set to 1.0, but apparently it crashes with any settings. Disabling the effect solves the problem. Backtrace: (gdb) bt
+ Trace 232593
Valgrind: ==14860== Thread 15: ==14860== Invalid read of size 4 ==14860== at 0x35C5813450: orc_code_region_allocate_codemem_dual_map (orccodemem.c:219) ==14860== by 0x35C58136C1: orc_code_region_allocate_codemem (orccodemem.c:293) ==14860== by 0x35C5813764: orc_code_region_new (orccodemem.c:64) ==14860== by 0x35C5813820: orc_code_region_get_free_chunk (orccodemem.c:136) ==14860== by 0x35C58138CA: orc_code_allocate_codemem (orccodemem.c:160) ==14860== by 0x35C581712A: orc_program_compile_full (orccompiler.c:341) ==14860== by 0x1A5D05C4: audio_convert_orc_pack_s32_float (tmp-orc.c:4737) ==14860== by 0x1A5C5A7F: audio_convert_convert (audioconvert.c:807) ==14860== by 0x1A5C3461: gst_audio_convert_transform (gstaudioconvert.c:813) ==14860== by 0x35ADE313C6: gst_base_transform_handle_buffer (gstbasetransform.c:2069) ==14860== by 0x35ADE31C20: gst_base_transform_chain (gstbasetransform.c:2176) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== Address 0x131fba60 is 16 bytes inside a block of size 19 alloc'd ==14860== at 0x4A06409: malloc (vg_replace_malloc.c:270) ==14860== by 0x35C58133D8: orc_code_region_allocate_codemem_dual_map (orccodemem.c:204) ==14860== by 0x35C58136C1: orc_code_region_allocate_codemem (orccodemem.c:293) ==14860== by 0x35C5813764: orc_code_region_new (orccodemem.c:64) ==14860== by 0x35C5813820: orc_code_region_get_free_chunk (orccodemem.c:136) ==14860== by 0x35C58138CA: orc_code_allocate_codemem (orccodemem.c:160) ==14860== by 0x35C581712A: orc_program_compile_full (orccompiler.c:341) ==14860== by 0x1A5D05C4: audio_convert_orc_pack_s32_float (tmp-orc.c:4737) ==14860== by 0x1A5C5A7F: audio_convert_convert (audioconvert.c:807) ==14860== by 0x1A5C3461: gst_audio_convert_transform (gstaudioconvert.c:813) ==14860== by 0x35ADE313C6: gst_base_transform_handle_buffer (gstbasetransform.c:2069) ==14860== by 0x35ADE31C20: gst_base_transform_chain (gstbasetransform.c:2176) ==14860== ==14860== Invalid read of size 4 ==14860== at 0x1A7DA147: speed_chain (gstspeed.c:488) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x35ADE31E2A: gst_base_transform_chain (gstbasetransform.c:2212) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860== by 0x35A086C184: g_thread_proxy (gthread.c:798) ==14860== by 0x359E807C52: start_thread (pthread_create.c:308) ==14860== by 0x359DCF5E1C: clone (clone.S:113) ==14860== Address 0x282ca808 is 1 bytes after a block of size 9,367 alloc'd ==14860== at 0x4A06409: malloc (vg_replace_malloc.c:270) ==14860== by 0x35A084D89E: g_malloc (gmem.c:159) ==14860== by 0x35A086344D: g_slice_alloc (gslice.c:1003) ==14860== by 0x35ADA2A11C: _default_mem_new_block (gstallocator.c:410) ==14860== by 0x35ADA33401: gst_buffer_new_allocate (gstbuffer.c:621) ==14860== by 0x35ADE2F7DC: default_prepare_output_buffer (gstbasetransform.c:1594) ==14860== by 0x35ADE312DA: gst_base_transform_handle_buffer (gstbasetransform.c:2040) ==14860== by 0x35ADE31C20: gst_base_transform_chain (gstbasetransform.c:2176) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860== ==14860== Invalid write of size 4 ==14860== at 0x1A7DA155: speed_chain (gstspeed.c:486) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x35ADE31E2A: gst_base_transform_chain (gstbasetransform.c:2212) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860== by 0x35A086C184: g_thread_proxy (gthread.c:798) ==14860== by 0x359E807C52: start_thread (pthread_create.c:308) ==14860== by 0x359DCF5E1C: clone (clone.S:113) ==14860== Address 0x28346d78 is 1 bytes after a block of size 9,367 alloc'd ==14860== at 0x4A06409: malloc (vg_replace_malloc.c:270) ==14860== by 0x35A084D89E: g_malloc (gmem.c:159) ==14860== by 0x35A086344D: g_slice_alloc (gslice.c:1003) ==14860== by 0x35ADA2A11C: _default_mem_new_block (gstallocator.c:410) ==14860== by 0x35ADA33401: gst_buffer_new_allocate (gstbuffer.c:621) ==14860== by 0x1A7D9E5E: speed_chain (gstspeed.c:594) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x35ADE31E2A: gst_base_transform_chain (gstbasetransform.c:2212) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860== ==14860== Invalid read of size 4 ==14860== at 0x1A7DA163: speed_chain (gstspeed.c:490) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x35ADE31E2A: gst_base_transform_chain (gstbasetransform.c:2212) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860== by 0x35A086C184: g_thread_proxy (gthread.c:798) ==14860== by 0x359E807C52: start_thread (pthread_create.c:308) ==14860== by 0x359DCF5E1C: clone (clone.S:113) ==14860== Address 0x282ca808 is 1 bytes after a block of size 9,367 alloc'd ==14860== at 0x4A06409: malloc (vg_replace_malloc.c:270) ==14860== by 0x35A084D89E: g_malloc (gmem.c:159) ==14860== by 0x35A086344D: g_slice_alloc (gslice.c:1003) ==14860== by 0x35ADA2A11C: _default_mem_new_block (gstallocator.c:410) ==14860== by 0x35ADA33401: gst_buffer_new_allocate (gstbuffer.c:621) ==14860== by 0x35ADE2F7DC: default_prepare_output_buffer (gstbasetransform.c:1594) ==14860== by 0x35ADE312DA: gst_base_transform_handle_buffer (gstbasetransform.c:2040) ==14860== by 0x35ADE31C20: gst_base_transform_chain (gstbasetransform.c:2176) ==14860== by 0x35ADA5AEE9: gst_pad_push_data (gstpad.c:3655) ==14860== by 0x1EA040DA: gst_queue_loop (gstqueue.c:1054) ==14860== by 0x35ADA879D8: gst_task_func (gsttask.c:316) ==14860== by 0x35A086CB45: g_thread_pool_thread_proxy (gthreadpool.c:309) ==14860==
This crashes too already: gst-launch-1.0 audiotestsrc ! audioconvert ! "audio/x-raw,format=F32LE,channels=2" ! speed speed=1.5 ! fakesink Works with 1 channel, fails with more than 1 channel.
commit f0b5d84c544a1f36e7ea9c4b7d857b8b95eac153 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Wed Oct 9 17:18:41 2013 +0200 speed: Fix some bytes-per-frame vs. bytes-per-sample mixups Otherwise we will crash when handling multiple channels and miscalculate timestamps. https://bugzilla.gnome.org/show_bug.cgi?id=709734