Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2213 closed defect (fixed)

subtitle crash: malloc: *** error [...] incorrect checksum for freed object [...] Abort trap: 6

Reported by: julian Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: crash SIGSEGV ass mov_text
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by cehoyos)

download the problem file (still uploading, up in 2 hours, size 1.305.470.851
bytes):
https://dl.dropbox.com/u/7221986/2.mkv

ffmpeg -i 2.mkv -map 0:0 -map 0:2 -map 0:5 -map 0:4 -map 0:3 -scodec mov_text -vcodec copy -acodec copy 2.mp4
ffmpeg version 1.1.1-tessus Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 20 2013 23:17:33 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
  configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --disable-ffserver --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-filters --enable-runtime-cpudetect
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, matroska,webm, from '2.mkv':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    creation_time   : 2012-03-04 22:02:52
  Duration: 00:24:22.19, start: 0.000000, bitrate: 7142 kb/s
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(jpn): Video: h264 (High 10), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : Video track
    Stream #0:1(jpn): Audio: flac, 48000 Hz, stereo, s32 (default)
    Metadata:
      title           : Audio track
    Stream #0:2(jpn): Audio: aac, 48000 Hz, stereo, fltp
    Metadata:
      title           : Audio track - Commentary
    Stream #0:3(eng): Subtitle: ssa (default)
    Metadata:
      title           : Subtitle track
    Stream #0:4(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Commentary
    Stream #0:5(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Colorless
Codec 0x18000 is not in the full list.
    Stream #0:6: Attachment: unknown_codec
    Metadata:
      filename        : Doradani_Rg_Bold.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:7: Attachment: unknown_codec
    Metadata:
      filename        : Doradani Rg Bold Italic.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:8: Attachment: unknown_codec
    Metadata:
      filename        : FOT-GrecoStd-M-ED3-8v2.otf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:9: Attachment: unknown_codec
    Metadata:
      filename        : PRISTINA-ED3-8v2.TTF
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:10: Attachment: unknown_codec
    Metadata:
      filename        : love-OPv3.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:11: Attachment: unknown_codec
    Metadata:
      filename        : Accolade Regular-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:12: Attachment: unknown_codec
    Metadata:
      filename        : Aller_Rg-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:13: Attachment: unknown_codec
    Metadata:
      filename        : angelina.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:14: Attachment: unknown_codec
    Metadata:
      filename        : ARIALUNI-ep04.TTF
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:15: Attachment: unknown_codec
    Metadata:
      filename        : Arista2.0-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:16: Attachment: unknown_codec
    Metadata:
      filename        : BoltonLight-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:17: Attachment: unknown_codec
    Metadata:
      filename        : ELPHIN-ep04.TTF
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:18: Attachment: unknown_codec
    Metadata:
      filename        : MadokaRunes-2.0-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:19: Attachment: unknown_codec
    Metadata:
      filename        : mona-ep04.ttf
      mimetype        : application/x-truetype-font
Codec 0x18000 is not in the full list.
    Stream #0:20: Attachment: unknown_codec
    Metadata:
      filename        : tahoma-ep04.ttf
      mimetype        : application/x-truetype-font
Output #0, mp4, to '2.mp4':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    encoder         : Lavf54.59.106
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(jpn): Video: h264 ([33][0][0][0] / 0x0021), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 16k tbn, 1k tbc (default)
    Metadata:
      title           : Video track
    Stream #0:1(jpn): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo
    Metadata:
      title           : Audio track - Commentary
    Stream #0:2(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Colorless
    Stream #0:3(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Commentary
    Stream #0:4(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
      title           : Subtitle track
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
  Stream #0:5 -> #0:2 (ass -> mov_text)
  Stream #0:4 -> #0:3 (ass -> mov_text)
  Stream #0:3 -> #0:4 (ass -> mov_text)
Press [q] to stop, [?] for help
ffmpeg(18551) malloc: *** error for object 0x10202b808: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Attachments (1)

ticket2213.mkv (230.3 KB) - added by cehoyos 5 years ago.

Download all attachments as: .zip

Change History (12)

Changed 5 years ago by cehoyos

comment:1 Changed 5 years ago by cehoyos

  • Description modified (diff)
  • Keywords crash SIGSEGV ass mov_text added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from 1.1.1 to git-master
(gdb) r -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
Starting program: ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-49468-ga084884 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 31 2013 00:34:25 with gcc 4.7 (SUSE Linux)
  configuration: --disable-indev=jack --disable-optimizations --disable-asm --disable-yasm
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 34.101 /  3. 34.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, matroska,webm, from 'ticket2213.mkv':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    ENCODER         : Lavf54.61.104
  Duration: 00:24:20.02, start: 0.000000, bitrate: 1 kb/s
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: ssa (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    encoder         : Lavf54.61.104
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Stream mapping:
  Stream #0:0 -> #0:0 (ass -> mov_text)
  Stream #0:1 -> #0:1 (ass -> mov_text)
  Stream #0:2 -> #0:2 (ass -> mov_text)
Press [q] to stop, [?] for help

Program received signal SIGSEGV, Segmentation fault.
0x00000000004f7418 in ff_interleave_packet_per_dts (s=0x16d23c0, out=0x7fffffffd250, pkt=0x0, flush=0) at libavformat/mux.c:646
646                         av_rescale_q(s->streams[i]->last_in_packet_buffer->pkt.dts,
(gdb) bt
#0  0x00000000004f7418 in ff_interleave_packet_per_dts (s=0x16d23c0, out=0x7fffffffd250, pkt=0x0, flush=0) at libavformat/mux.c:646
#1  0x00000000004f77da in interleave_packet (s=0x16d23c0, out=0x7fffffffd250, in=0x0, flush=0) at libavformat/mux.c:725
#2  0x00000000004f7901 in av_interleaved_write_frame (s=0x16d23c0, pkt=0x0) at libavformat/mux.c:753
#3  0x0000000000412f5b in write_frame (s=0x16d23c0, pkt=0x7fffffffd4d0, ost=0x16e1340) at ffmpeg.c:599
#4  0x0000000000413a55 in do_subtitle_out (s=0x16d23c0, ost=0x16e1340, ist=0x16d1e90, sub=0x7fffffffd600) at ffmpeg.c:786
#5  0x0000000000417e7d in transcode_subtitles (ist=0x16d1e90, pkt=0x7fffffffd670, got_output=0x7fffffffd6cc) at ffmpeg.c:1771
#6  0x00000000004184a4 in output_packet (ist=0x16d1e90, pkt=0x7fffffffd860) at ffmpeg.c:1855
#7  0x000000000041ce99 in process_input (file_index=0) at ffmpeg.c:2988
#8  0x000000000041d1f3 in transcode_step () at ffmpeg.c:3084
#9  0x000000000041d300 in transcode () at ffmpeg.c:3136
#10 0x000000000041d7de in main (argc=8, argv=0x7fffffffddc8) at ffmpeg.c:3311
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x4f73f8 to 0x4f7438:
   0x00000000004f73f8 <ff_interleave_packet_per_dts+328>:       or     %cl,-0x75(%rax)
   0x00000000004f73fb <ff_interleave_packet_per_dts+331>:       rex.RB cwtl
   0x00000000004f73fd <ff_interleave_packet_per_dts+333>:       mov    0x30(%rax),%rax
   0x00000000004f7401 <ff_interleave_packet_per_dts+337>:       mov    -0x24(%rbp),%edx
   0x00000000004f7404 <ff_interleave_packet_per_dts+340>:       movslq %edx,%rdx
   0x00000000004f7407 <ff_interleave_packet_per_dts+343>:       shl    $0x3,%rdx
   0x00000000004f740b <ff_interleave_packet_per_dts+347>:       add    %rdx,%rax
   0x00000000004f740e <ff_interleave_packet_per_dts+350>:       mov    (%rax),%rax
   0x00000000004f7411 <ff_interleave_packet_per_dts+353>:       mov    0x130(%rax),%rax
=> 0x00000000004f7418 <ff_interleave_packet_per_dts+360>:       mov    0x8(%rax),%rax
   0x00000000004f741c <ff_interleave_packet_per_dts+364>:       mov    -0x50(%rbp),%rdx
   0x00000000004f7420 <ff_interleave_packet_per_dts+368>:       mov    0x38(%rcx),%rcx
   0x00000000004f7424 <ff_interleave_packet_per_dts+372>:       mov    %rcx,%rsi
   0x00000000004f7427 <ff_interleave_packet_per_dts+375>:       mov    %rax,%rdi
   0x00000000004f742a <ff_interleave_packet_per_dts+378>:       callq  0xc75a88 <av_rescale_q>
   0x00000000004f742f <ff_interleave_packet_per_dts+383>:       mov    %rax,%rbx
   0x00000000004f7432 <ff_interleave_packet_per_dts+386>:       movl   $0x1,-0x40(%rbp)
End of assembler dump.
(gdb) info register
rax            0x656d206e65646469       7308533428811752553
rbx            0x10f2af20       284340000
rcx            0x16e1d20        23993632
rdx            0x8      8
rsi            0xf4240  1000000
rdi            0x456b4  284340
rbp            0x7fffffffd1f0   0x7fffffffd1f0
rsp            0x7fffffffd170   0x7fffffffd170
r8             0x0      0
r9             0x0      0
r10            0x0      0
r11            0x246    582
r12            0x4054a0 4215968
r13            0x7fffffffddc0   140737488346560
r14            0x0      0
r15            0x0      0
rip            0x4f7418 0x4f7418 <ff_interleave_packet_per_dts+360>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
$ valgrind ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
==4035== Memcheck, a memory error detector
==4035== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4035== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4035== Command: ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
==4035==
ffmpeg version N-49452-g91f3592 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 30 2013 10:43:05 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 34.101 /  3. 34.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
==4035== Invalid write of size 8
==4035==    at 0x5096DD: ebml_parse_elem (matroskadec.c:890)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50A056: matroska_read_header (matroskadec.c:866)
==4035==    by 0x5A18AF: avformat_open_input (utils.c:626)
==4035==    by 0x451D20: open_input_file (ffmpeg_opt.c:767)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456068: ffmpeg_parse_options (ffmpeg_opt.c:2320)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==  Address 0x66dcdac is 300 bytes inside a block of size 304 alloc'd
==4035==    at 0x4C2ABED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x4C2AD6F: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x5095B3: ebml_parse_elem (matroskadec.c:929)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50A056: matroska_read_header (matroskadec.c:866)
==4035==    by 0x5A18AF: avformat_open_input (utils.c:626)
==4035==    by 0x451D20: open_input_file (ffmpeg_opt.c:767)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456068: ffmpeg_parse_options (ffmpeg_opt.c:2320)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==
Input #0, matroska,webm, from 'ticket2213.mkv':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    ENCODER         : Lavf54.61.104
  Duration: 00:24:20.02, start: 0.000000, bitrate: 1 kb/s
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: ssa (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    encoder         : Lavf54.61.104
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Stream mapping:
  Stream #0:0 -> #0:0 (ass -> mov_text)
  Stream #0:1 -> #0:1 (ass -> mov_text)
  Stream #0:2 -> #0:2 (ass -> mov_text)
Press [q] to stop, [?] for help
==4035== Invalid write of size 1
==4035==    at 0xBB4503: av_strlcpy (avstring.c:86)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAAA069: ff_ass_split_override_codes (ass_split.c:459)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fdf0 is 0 bytes after a block of size 528 alloc'd
==4035==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0xBBEC31: av_mallocz (mem.c:92)
==4035==    by 0x5A283E: avformat_new_stream (utils.c:3292)
==4035==    by 0x450865: new_output_stream (ffmpeg_opt.c:904)
==4035==    by 0x451184: new_subtitle_stream (ffmpeg_opt.c:1255)
==4035==    by 0x455371: open_output_file (ffmpeg_opt.c:1596)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456091: ffmpeg_parse_options (ffmpeg_opt.c:2327)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==
==4035== Invalid write of size 1
==4035==    at 0xBB4512: av_strlcpy (avstring.c:88)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAAA069: ff_ass_split_override_codes (ass_split.c:459)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fe3d is not stack'd, malloc'd or (recently) free'd
==4035==
==4035== Invalid write of size 1
==4035==    at 0xBB4503: av_strlcpy (avstring.c:86)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAA9FBD: ff_ass_split_override_codes (ass_split.c:381)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fe3d is not stack'd, malloc'd or (recently) free'd
==4035==
==4035== Invalid read of size 8
==4035==    at 0x53E895: ff_interleave_packet_per_dts (mux.c:646)
==4035==    by 0x53EC4C: av_interleaved_write_frame (mux.c:725)
==4035==    by 0x45A952: write_frame (ffmpeg.c:599)
==4035==    by 0x45D97B: transcode_subtitles (ffmpeg.c:786)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x81e3ab81e3a881eb is not stack'd, malloc'd or (recently) free'd
==4035==
==4035==
==4035== Process terminating with default action of signal 11 (SIGSEGV)
==4035==  General Protection Fault
==4035==    at 0x53E895: ff_interleave_packet_per_dts (mux.c:646)
==4035==    by 0x53EC4C: av_interleaved_write_frame (mux.c:725)
==4035==    by 0x45A952: write_frame (ffmpeg.c:599)
==4035==    by 0x45D97B: transcode_subtitles (ffmpeg.c:786)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==
==4035== HEAP SUMMARY:
==4035==     in use at exit: 3,335,029 bytes in 505 blocks
==4035==   total heap usage: 8,558 allocs, 8,053 frees, 7,640,933 bytes allocated
==4035==
==4035== LEAK SUMMARY:
==4035==    definitely lost: 16 bytes in 1 blocks
==4035==    indirectly lost: 79 bytes in 5 blocks
==4035==      possibly lost: 23,312 bytes in 1 blocks
==4035==    still reachable: 3,311,622 bytes in 498 blocks
==4035==         suppressed: 0 bytes in 0 blocks
==4035== Rerun with --leak-check=full to see details of leaked memory
==4035==
==4035== For counts of detected and suppressed errors, rerun with: -v
==4035== ERROR SUMMARY: 266 errors from 5 contexts (suppressed: 2 from 2)
Segmentation fault

comment:2 Changed 5 years ago by pk_hariprasad

Some debugging updates:
Segmentation fault happens when invoking the function av_rescale_q to calculate delta_dts with i = 1 and ff_interleave_packet_per_dts is called 479th time starting from 1

comment:3 Changed 5 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

comment:4 Changed 5 years ago by julian

could you tell me the revision that fixed it?

thanks for fixing it!

comment:6 Changed 5 years ago by cehoyos

The sample currently also needs -fix_sub_duration so I will not delete it (at least for the moment).

comment:7 follow-up: Changed 5 years ago by Cigaes

That is not true. Decoding from Matroska never requires -fix_sub_duration.

Complex ASS can not be converted to mov_text, that is not a bug, that is a limitation of the format.

-fix_sub_duration may make it seem to work, but it is only hiding the problems, not solving anything.

comment:8 in reply to: ↑ 7 ; follow-up: Changed 5 years ago by cehoyos

I believe it is acceptable (and expected) that the conversion from ass to mov_text will damage some and drop other subtitles and that the resulting file does not show all effects that the original ass track encoded. Not acceptable imo is ffmpeg producing unusable output files without any warning. With -fix_sub_duration, the resulting file is watchable (with subtitles). I am neither claiming this is expected behaviour, nor that it works perfectly but it is nonetheless currently needed to produce a useful output file.
I'd like to keep the file so it is possible to test once the re-encoding without -fix_sub_duration is possible.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 5 years ago by Cigaes

Replying to cehoyos:

I believe it is acceptable (and expected)

I think you overestimate the users.

that the conversion from ass to mov_text will damage some and drop other subtitles and that the resulting file does not show all effects that the original ass track encoded.

That may be acceptable, but that is what happens when -fix_sub_durations is not used.

Not acceptable imo is ffmpeg producing unusable output files without any warning.

Under what circumstances do you get that?

With -fix_sub_duration, the resulting file is watchable (with subtitles).

Let me correct you: the parts of the resulting file that you looked at are watchable. Most of it will be, but the parts with overlapping subtitles will not.

I am neither claiming this is expected behaviour, nor that it works perfectly but it is nonetheless currently needed to produce a useful output file.

It is currently useful for ignoring errors, but that does not make the output file useful. Advocating its use will only let the users produce damaged files and delay a proper solution.

I'd like to keep the file

I am 100% in favor of keeping all files, but please stop suggesting using -fix_sub_duration in this circumstance, it is 100% wrong.

comment:10 in reply to: ↑ 9 Changed 5 years ago by cehoyos

Replying to Cigaes:

Not acceptable imo is ffmpeg producing unusable output files without any warning.

Under what circumstances do you get that?

I get that with the sample from this ticket and the sample from #2212.

comment:11 Changed 5 years ago by Cigaes

For #2212, it was an A-V desync, IIRC, was it not? If so, it was a bug in the MOV+mov_text muxer, nothing more.

Note: See TracTickets for help on using tickets.