Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#2116 closed defect (fixed)

Pressing Ctrl-C while running FFMPEG on Windows causes it to crash

Reported by: ramitbhalla Owned by:
Priority: important Component: ffmpeg
Version: git-master Keywords: crash regression win
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: If once presses Ctrl+C while ffmpeg is running, crashes, ie. windows throws up the process terminated box with errors etc.

Output:

ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 21 2012 09:06:30 with gcc 4.7.2 (GCC)
  configuration: --enable-static --arch=x86 --target-os=mingw32 --cross-prefix=/home/rdp/dev/ffmpeg-windows-build-helper
s/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth -
-enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfig --ena
ble-libass --enable-libutvideo --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-lib
vo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopenc
ore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbluray --enable-libvpx --enable-runtime-cpudetect

  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 49.102 / 54. 49.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 29.100 /  3. 29.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mp2 @ 02fd4e00] Header missing
[mpeg2video @ 02fceee0] mpeg_decode_postinit() failure
    Last message repeated 7 times
Input #0, wtv, from '..\CSI.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : CSI: Crime Scene Investigation
    WM/SubTitle     : Justice Is Served
    WM/SubTitleDescription: Grissom investigates the death of a jogger; Catherine tries to determine the cause of death
of a little girl on a carnival ride.
    genre           : Drama;General;Series;Action/Adventure
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : William Petersen/Marg Helgenberger/Paul Guilfoyle/George Eads/Gary Dourdan/Jorja Fox;Thomas J. Wri
ght;;Eric Szmanda/Robert David Hall/Skip O'Brien/David Berman/Alicia Coppola/Earl Brown/Kellie Waymire/Brad Johnson/Wayn
e Wilderson/Steffanie Brass/Joseph Pa
    service_provider: USA
    service_name    : USA Network
    WM/MediaNetworkAffiliation: Satellite
    WM/MediaOriginalChannel: 42
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2001-04-26T04:00:00Z
    WM/MediaOriginalRunTime: 20288549297
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: true
    WM/MediaIsLive  : false
    WM/MediaIsTape  : false
    WM/MediaIsDelay : false
    WM/MediaIsSubtitled: false
    WM/MediaIsMovie : false
    WM/MediaIsPremiere: false
    WM/MediaIsFinale: false
    WM/MediaIsSAP   : false
    WM/MediaIsSport : false
    WM/ParentalRating: TV-PG
    WM/Provider     : MediaCenterDefault
    WM/VideoClosedCaptioning: true
    WM/WMRVEncodeTime: 2012-01-27 06:28:11
    WM/WMRVSeriesUID: !MCSeries!00380341
    WM/WMRVServiceID: !MCService!28459373
    WM/WMRVProgramID: !MCProgram!29070181
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 3
    WM/WMRVOriginalSoftPrePadding: 1745
    WM/WMRVOriginalSoftPostPadding: 120
    WM/WMRVHardPrePadding: -1685
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: false
    WM/WMRVDTVContent: false
    WM/WMRVHDContent: false
    Duration        : 475547199
    WM/WMRVEndTime  : 2012-01-27 06:28:58
    WM/WMRVBitrate  : 8.257536
    WM/WMRVKeepUntil: 0
    WM/WMRVActualSoftPrePadding: 16
    WM/WMRVActualSoftPostPadding: -1861
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : false
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 234
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 255
    WM/MediaThumbRatingLevel: 255
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: -4616189618054758400
    WM/MediaThumbType: 2
  Duration: 00:00:46.55, start: 14.626711, bitrate: 8290 kb/s
    Stream #0:0[0x11]: Subtitle: eia_608
    Stream #0:1[0x12]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 10000k tbn, 5
9.94 tbc
    Stream #0:2[0x13]: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 384 kb/s
    Stream #0:3[0x0]: Attachment: mjpeg
    Metadata:
      title           : TV Thumbnail
Output #0, mpegts, to 'test-csi.ts':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : CSI: Crime Scene Investigation
    WM/SubTitle     : Justice Is Served
    WM/SubTitleDescription: Grissom investigates the death of a jogger; Catherine tries to determine the cause of death
of a little girl on a carnival ride.
    genre           : Drama;General;Series;Action/Adventure
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : William Petersen/Marg Helgenberger/Paul Guilfoyle/George Eads/Gary Dourdan/Jorja Fox;Thomas J. Wri
ght;;Eric Szmanda/Robert David Hall/Skip O'Brien/David Berman/Alicia Coppola/Earl Brown/Kellie Waymire/Brad Johnson/Wayn
e Wilderson/Steffanie Brass/Joseph Pa
    service_provider: USA
    service_name    : USA Network
    WM/MediaNetworkAffiliation: Satellite
    WM/MediaOriginalChannel: 42
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2001-04-26T04:00:00Z
    WM/MediaOriginalRunTime: 20288549297
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: true
    WM/MediaIsLive  : false
    WM/MediaIsTape  : false
    WM/MediaIsDelay : false
    WM/MediaIsSubtitled: false
    WM/MediaIsMovie : false
    WM/MediaIsPremiere: false
    WM/MediaIsFinale: false
    WM/MediaIsSAP   : false
    WM/MediaIsSport : false
    WM/ParentalRating: TV-PG
    WM/Provider     : MediaCenterDefault
    WM/VideoClosedCaptioning: true
    WM/WMRVEncodeTime: 2012-01-27 06:28:11
    WM/WMRVSeriesUID: !MCSeries!00380341
    WM/WMRVServiceID: !MCService!28459373
    WM/WMRVProgramID: !MCProgram!29070181
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 3
    WM/WMRVOriginalSoftPrePadding: 1745
    WM/WMRVOriginalSoftPostPadding: 120
    WM/WMRVHardPrePadding: -1685
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: false
    WM/WMRVDTVContent: false
    WM/WMRVHDContent: false
    Duration        : 475547199
    WM/WMRVEndTime  : 2012-01-27 06:28:58
    WM/WMRVBitrate  : 8.257536
    WM/WMRVKeepUntil: 0
    WM/WMRVActualSoftPrePadding: 16
    WM/WMRVActualSoftPostPadding: -1861
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : false
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 234
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 255
    WM/MediaThumbRatingLevel: 255
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: -4616189618054758400
    WM/MediaThumbType: 2
    encoder         : Lavf54.49.102
    Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 480x320 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97
tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 384 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video -> libxvid)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  506 fps=283 q=25.0 Lsize=    1459kB time=00:00:16.92 bitrate= 706.0kbits/s dup=14 drop=0
video:477kB audio:787kB subtitle:0 global headers:0kB muxing overhead 15.436609%
Received signal 2: terminating.

Change History (18)

comment:1 Changed 5 years ago by cehoyos

  • Keywords crash added

Please provide a backtrace.

comment:2 Changed 5 years ago by ramitbhalla

Here is what I have (i can't build but have Visual Studio which I've tried to use)

Unhandled exception at 0x0040b733 in ffmpeg.2311.exe: 0xC0000005: Access violation reading location 0x00000000.

>	ffmpeg.2311.exe!0040b733() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ffmpeg.2311.exe]	
 	msvcrt.dll!768fc182() 	
 	msvcrt.dll!768fc3e9() 	
 	msvcrt.dll!768ff4d2() 	
 	msvcrt.dll!7690118e() 	
 	msvcrt.dll!76901162() 	
 	ffmpeg.2311.exe!004013fa() 	
 	kernel32.dll!756eed6c() 	
 	ntdll.dll!7707377b() 	
 	ntdll.dll!7707374e() 	

0040B70B  nop  
0040B70C  lea         esi,[esi]  
0040B710  push        ebp  
0040B711  push        edi  
0040B712  xor         edi,edi  
0040B714  push        esi  
0040B715  push        ebx  
0040B716  sub         esp,1Ch  
0040B719  mov         ebp,dword ptr ds:[1C12778h]  
0040B71F  test        ebp,ebp  
0040B721  jle         0040B815  
0040B727  mov         eax,dword ptr ds:[01C12774h]  
0040B72C  lea         esi,[edi*4]  
0040B733  mov         eax,dword ptr [eax+edi*4]  

comment:3 Changed 5 years ago by cehoyos

You have to use ffmpeg_g which contains debugging symbols.

comment:4 Changed 5 years ago by ramitbhalla

I don't see ffmpeg_g anywhere in the Zeronae builds

comment:5 Changed 5 years ago by cehoyos

Please compile current FFmpeg, a default compilation with ./configure && make contains a debug binary.

comment:6 Changed 5 years ago by rogerdpack

http://rogerdpack.t28.net/incoming/ffmpeg_distros/ffmpeg-distro-static-2013-01-11-969e75eb80dad51481152f868dafa802579a19aa.debug_symbols.7z may be a build you could use with debug symbols
but...why are you using ctrl+c here, instead of 'q'? Are you saying that ctrl+c should act like the q key does? What is an example command line that causes the behavior?

comment:7 Changed 5 years ago by ramitbhalla

same thing, i started out with ffmpeg using ctrl+c like any command line program. just that in the newer releases it crashes, where as earlier it used to quit like 'q'. i can test it when I get back otherwise rogerdpack, if you have a debugger setup, just run any ffmpeg command and while it's runnign press ctrl+c and you can trace the stack.

comment:8 follow-up: Changed 5 years ago by ramitbhalla

Not really sure how to use the debug symbols here since I don't have the source code:

Here's the stack I get:

ffmpeg_g.exe!0040b573()

[Frames below may be incorrect and/or missing, no symbols loaded for ffmpeg_g.exe]
msvcrt.dll!76e0c182()
msvcrt.dll!76e0c3e9()
msvcrt.dll!76e0f4d2()
msvcrt.dll!76e1118e()
msvcrt.dll!76e11162()
ffmpeg_g.exe!0072006f()

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

Replying to ramitbhalla:

Not really sure how to use the debug symbols here since I don't have the source code:

You will need the source code to give gdb the possibility to provide a useful backtrace.

comment:10 Changed 5 years ago by ramitbhalla

I don't have GDB, I use Visual Studio - an to be honest not the best at it.

I can only request someone like rogerdpack to replicate it (very very easy) and see where it bugs out.

comment:11 Changed 5 years ago by michael

if it worked before, which change broke it ?

comment:12 Changed 5 years ago by ramitbhalla

Good question, can't say which change broke it but here is one version wiht me that works with ctrl + c

ffmpeg version N-37915-g6cb2085 Copyright (c) 2000-2012 the FFmpeg developers

built on Feb 15 2012 20:47:20 with gcc 4.6.2

comment:13 Changed 5 years ago by ramitbhalla

BTW this is VERY minor issue, no biggie but thought since I noticed it would be good to report it.

comment:14 Changed 5 years ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important
  • Version changed from unspecified to git-master

comment:15 Changed 5 years ago by cehoyos

  • Keywords win added

comment:16 Changed 5 years ago by cehoyos

  • Component changed from undetermined to FFmpeg
  • Reproduced by developer set
  • Status changed from new to open

Regression since 032ba74 / 5e3f997

comment:17 Changed 5 years ago by michael

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

comment:18 Changed 2 years ago by rogerdpack

Any chance of pointing me to the commit that fixed this?
Cheers!

Note: See TracTickets for help on using tickets.