[FFmpeg-trac] #3637(undetermined:new): AAC encoder segfault on OS X 10.9.2
FFmpeg
trac at avcodec.org
Wed May 14 09:42:10 CEST 2014
#3637: AAC encoder segfault on OS X 10.9.2
-------------------------------------+-------------------------------------
Reporter: zulkis | Type: defect
Status: new | Priority: critical
Component: | Version: git-
undetermined | master
Keywords: aac, | Blocked By:
encoder, avcodec_encode_audio2 | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Very similar to this: https://trac.ffmpeg.org/ticket/2447
But i guess i have more information:
There are several cases that that bug happens:
1st stacktrace:
(int) curidx = -2147483644
And trying to get ff_aac_spectral_bits[cb-1][curidx];
{{{
* thread #4: tid = 0x62892d, 0x000000010049a20f
libavcodec.55.dylib`quantize_and_encode_band_cost_SPAIR [inlined]
quantize_and_encode_band_cost_template(s=0x00000001020a3600,
pb=0x0000000000000000, in=0x000000010cbb8a00, scaled=0x00000001020a3e60,
size=8, scale_idx=199, cb=5, lambda=1, uplim=+Inf,
bits=0x0000000102b7ff80, BT_ZERO=0, BT_UNSIGNED=0, BT_PAIR=1, BT_ESC=0) +
787 at aaccoder.c:153, queue =
'com.streamingclient.captureVideoDataOutput', stop reason = EXC_BAD_ACCESS
(code=1, address=0x80e27224)
frame #0: 0x000000010049a20f
libavcodec.55.dylib`quantize_and_encode_band_cost_SPAIR [inlined]
quantize_and_encode_band_cost_template(s=0x00000001020a3600,
pb=0x0000000000000000, in=0x000000010cbb8a00, scaled=0x00000001020a3e60,
size=8, scale_idx=199, cb=5, lambda=1, uplim=+Inf,
bits=0x0000000102b7ff80, BT_ZERO=0, BT_UNSIGNED=0, BT_PAIR=1, BT_ESC=0) +
787 at aaccoder.c:153
frame #1: 0x0000000100499efc
libavcodec.55.dylib`quantize_and_encode_band_cost_SPAIR(s=0x00000001020a3600,
pb=0x0000000000000000, in=0x000000010cbb8a00, scaled=0x00000001020a3e60,
size=8, scale_idx=199, cb=5, lambda=1, uplim=+Inf,
bits=0x0000000102b7ff80) + 380 at aaccoder.c:226
frame #2: 0x00000001004978a5
libavcodec.55.dylib`quantize_band_cost(s=0x00000001020a3600,
in=0x000000010cbb8a00, scaled=0x00000001020a3e60, size=8, scale_idx=199,
cb=5, lambda=1, uplim=+Inf, bits=0x0000000102b7ff80) + 133 at
aaccoder.c:262
frame #3: 0x0000000100495f2f
libavcodec.55.dylib`search_for_quantizers_twoloop(avctx=0x0000000102079e00,
s=0x00000001020a3600, sce=0x000000010cbb70a0, lambda=144.90567) + 2223 at
aaccoder.c:797
frame #4: 0x00000001004aba98
libavcodec.55.dylib`aac_encode_frame(avctx=0x0000000102079e00,
avpkt=0x0000000102832b70, frame=0x00000001028414c0,
got_packet_ptr=0x0000000102b80b60) + 2120 at aacenc.c:597
* frame #5: 0x0000000100b30ffd
libavcodec.55.dylib`avcodec_encode_audio2(avctx=0x0000000102079e00,
avpkt=0x0000000102832b70, frame=0x00000001028414c0,
got_packet_ptr=0x0000000102b80b60) + 813 at utils.c:1778
frame #6: 0x000000010000cd09 Tunemelt`-[SCStreamer
sendPCMAudio:pts:duration:](self=0x0000600000138380,
_cmd=0x0000000100089cac, sampleBuffer=0x000000010283e860,
pts=<unavailable>, duration=<unavailable>) + 1529 at SCStreamer.m:401
frame #7: 0x0000000100032b08 Tunemelt`-[SCCaptureSession
captureOutput:didOutputSampleBuffer:fromConnection:](self=0x00006180000ce5b0,
_cmd=0x00007fff91133d93, captureOutput=0x000061000023d460,
sampleBuffer=0x000000010283e860, connection=0x00006080002208e0) + 1240 at
SCCaptureSession.m:283
frame #8: 0x00007fff910d0ad2
AVFoundation`__ConsumerRender_block_invoke + 141
frame #9: 0x00007fff884ad1d7
libdispatch.dylib`_dispatch_call_block_and_release + 12
frame #10: 0x00007fff884aa2ad
libdispatch.dylib`_dispatch_client_callout + 8
frame #11: 0x00007fff884ac68f libdispatch.dylib`_dispatch_queue_drain
+ 451
frame #12: 0x00007fff884ad9dd libdispatch.dylib`_dispatch_queue_invoke
+ 110
frame #13: 0x00007fff884abfa3
libdispatch.dylib`_dispatch_root_queue_drain + 75
frame #14: 0x00007fff884ad193
libdispatch.dylib`_dispatch_worker_thread2 + 40
frame #15: 0x00007fff88e0aef8
libsystem_pthread.dylib`_pthread_wqthread + 314
}}}
2.
Calling static int find_min_book(float maxval, int sf)
with sf = -2147483648 again non-positive number.
{{{
* thread #5: tid = 0x62a400, 0x000000010049c352
libavcodec.55.dylib`find_min_book(maxval=1.92100652E+18, sf=-2147483648) +
50 at aaccoder.c:286, queue =
'com.streamingclient.captureVideoDataOutput', stop reason = EXC_BAD_ACCESS
(code=1, address=0xffffffff00ff72a0)
* frame #0: 0x000000010049c352
libavcodec.55.dylib`find_min_book(maxval=1.92100652E+18, sf=-2147483648) +
50 at aaccoder.c:286
frame #1: 0x0000000100495e5e
libavcodec.55.dylib`search_for_quantizers_twoloop(avctx=0x000000010400e000,
s=0x00000001040d3800, sce=0x000000010c5aa0a0, lambda=120) + 2014 at
aaccoder.c:794
frame #2: 0x00000001004aba98
libavcodec.55.dylib`aac_encode_frame(avctx=0x000000010400e000,
avpkt=0x0000000103400dd0, frame=0x0000000103402b20,
got_packet_ptr=0x0000000103780b60) + 2120 at aacenc.c:597
frame #3: 0x0000000100b30ffd
libavcodec.55.dylib`avcodec_encode_audio2(avctx=0x000000010400e000,
avpkt=0x0000000103400dd0, frame=0x0000000103402b20,
got_packet_ptr=0x0000000103780b60) + 813 at utils.c:1778
frame #4: 0x000000010000cd09 Tunemelt`-[SCStreamer
sendPCMAudio:pts:duration:](self=0x0000600000135180,
_cmd=0x0000000100089cac, sampleBuffer=0x0000000103606880,
pts=<unavailable>, duration=<unavailable>) + 1529 at SCStreamer.m:401
frame #5: 0x0000000100032b08 Tunemelt`-[SCCaptureSession
captureOutput:didOutputSampleBuffer:fromConnection:](self=0x00006000002d3e80,
_cmd=0x00007fff91133d93, captureOutput=0x000060000022de00,
sampleBuffer=0x0000000103606880, connection=0x00006100000326a0) + 1240 at
SCCaptureSession.m:283
frame #6: 0x00007fff910d0ad2
AVFoundation`__ConsumerRender_block_invoke + 141
frame #7: 0x00007fff884ad1d7
libdispatch.dylib`_dispatch_call_block_and_release + 12
frame #8: 0x00007fff884aa2ad
libdispatch.dylib`_dispatch_client_callout + 8
frame #9: 0x00007fff884ac68f libdispatch.dylib`_dispatch_queue_drain +
451
frame #10: 0x00007fff884ad9dd libdispatch.dylib`_dispatch_queue_invoke
+ 110
frame #11: 0x00007fff884abfa3
libdispatch.dylib`_dispatch_root_queue_drain + 75
frame #12: 0x00007fff884ad193
libdispatch.dylib`_dispatch_worker_thread2 + 40
frame #13: 0x00007fff88e0aef8
libsystem_pthread.dylib`_pthread_wqthread + 314
}}}
ffmpeg configuration:
{{{
--enable-protocol=file --enable-avformat --enable-avcodec --enable-swscale
--enable-demuxer=mp3 --enable-demuxer=aac --enable-demuxer=image2
--enable-demuxer=mov --enable-decoder=rawvideo --enable-demuxer=h264
--enable-decoder=mp3 --enable-decoder=aac --enable-decoder=mjpeg --enable-
decoder=h264 --enable-decoder=mpeg4 --enable-encoder=mp3 --enable-
encoder=aac --enable-encoder=mjpeg --enable-encoder=h264 --enable-
encoder=mpeg4 --enable-parser=mp3 --enable-parser=aac --enable-parser=h264
--enable-pic --enable-libx264 --enable-gpl --disable-optimizations
--disable-static --enable-shared --disable-stripping --disable-ssse3
--enable-debug=3 --extra-cflags="-O0 -fno-inline"
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3637>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list