Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#11159 closed defect (worksforme)

Crash access violation in certain deployment

Reported by: Truong Quoc Khanh Owned by:
Priority: normal Component: avcodec
Version: 7.0 Keywords: windows h264
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Truong Quoc Khanh)

Summary of the bug: crash when render

Window Event Viewer
`
Faulting application name: ffmpeg.exe, version: 0.0.0.0, time stamp: 0x66cdca04
Faulting module name: avcodec-61.dll, version: 61.3.100.0, time stamp: 0x66cdca06
Exception code: 0xc0000005
Fault offset: 0x0000000002ac488c
Faulting process id: 0x0xB40
Faulting application start time: 0x0x1DAF9277F9D8C91
Faulting application path: <path>\ffmpeg.exe
Faulting module path: <path>\avcodec-61.dll
Report Id: 0e68b06a-0aac-4849-b26d-3dc759893094
Faulting package full name:
Faulting package-relative application ID:

`
FFmpeg version: https://github.com/BtbN/FFmpeg-Builds/releases/tag/latest
Latest Auto-Build (2024-08-27 12:49)
ffmpeg-n7.0-latest-win64-gpl-shared-7.0.zip

Attachments (3)

ffmpeg-20240828-155140.s.log (69.9 KB ) - added by MasterQuestionable 3 months ago.
͏    Filtered summary of "ffmpeg-20240828-155140.log". ͏    For complete files, see comment:3.
log.txt (50.0 KB ) - added by Truong Quoc Khanh 2 months ago.
ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc2=1920x1080:30:d=5" -c:v libx264 "Out.mkv"
ffmpeg-20240828-155140.log.7z (183.4 KB ) - added by MasterQuestionable 2 months ago.
͏    Workaround failed [ https://streams.videolan.org/upload/ ].

Download all attachments as: .zip

Change History (22)

comment:1 by Truong Quoc Khanh, 3 months ago

Report log file: https://drive.google.com/file/d/1F-eC0X3dY6FhZD-Yi1-_miYEqhBYIJTz/view?usp=sharing
Video file: https://drive.google.com/drive/folders/1NeRpXyEmtzuO9nrKQA6G266tpKccSib8

Note:
-It happened on some computer, and other computer work well.
-On error computer, was tested with ffmpeg 5, 6.1, lasted same error

Last edited 3 months ago by Truong Quoc Khanh (previous) (diff)

comment:2 by Truong Quoc Khanh, 3 months ago

Description: modified (diff)

comment:3 by MasterQuestionable, 3 months ago

Cc: MasterQuestionable added

͏    "ffmpeg-20240828-155140.log":
͏    https://drive.usercontent.google.com/download?confirm=t&export=download&id=1F-eC0X3dY6FhZD-Yi1-_miYEqhBYIJTz (~ 5.44 MiB)
͏    Filtered version: https://trac.ffmpeg.org/raw-attachment/ticket/11159/ffmpeg-20240828-155140.log.7z (~ 183.39 KiB)

͏    "1 (1).mp4":
͏    https://drive.usercontent.google.com/download?confirm=t&export=download&id=1TOMET8R5Xys6KxlCl3K7E5-2fczstPtu (~ 3.33 GiB)

͏    "1. 航拍视频(高清)难以置信的美丽-令人惊叹的自然风景 与优雅旋律.mp4":
͏    https://drive.usercontent.google.com/download?confirm=t&export=download&id=1E8DrB20aXNA4j5VozSYU_Ex67ZXtylpb (~ 1.05 GiB)

͏    "12.mp4":
͏    https://drive.usercontent.google.com/download?confirm=t&export=download&id=196aYE6WQz4u8Pn32tEM4dssfQX_uwb4b (~ 3.93 GiB)

͏    ... Good luck.
͏    See also: https://trac.ffmpeg.org/ticket/11146#comment:11

͏    I won't download the video samples.
͏    But you may try running certain `ffprobe` commands that reveal the input characteristics.

Last edited 2 months ago by MasterQuestionable (previous) (diff)

comment:4 by MasterQuestionable, 3 months ago

Component: ffmpegavcodec

comment:5 by Truong Quoc Khanh, 3 months ago

I was request they try reinstall windows. Only their computer crash, it work well on my computer.

comment:6 by MasterQuestionable, 3 months ago

͏    Don't hurry to do so.
͏    Is "ffmpeg-20240828-155140.log" generated by you, or their computers? (rough parse didn't find error..?)
͏    Report the OS (all Windows?) version and exact CPU models all involved.
͏    Also the RAM size correspondingly.

͏    "crash when render"
͏    I suppose `ffmpeg` doesn't render: it decodes and encodes. (render implied playback)

comment:7 by Truong Quoc Khanh, 3 months ago

-Cpu: Intel Core i7 14700
-Ram: 32GiB, when crash ram only 8Gib/32
-Window 11

"ffmpeg-20240828-155140.log" generate by me on their computers

Last edited 3 months ago by Truong Quoc Khanh (previous) (diff)

comment:8 by MasterQuestionable, 3 months ago

͏    What's the error message in "ffmpeg-20240828-155140.log"?
͏    I didn't find it.

͏    Did the program just abruptly stopped? (so incomplete log)

by MasterQuestionable, 3 months ago

͏    Filtered summary of "ffmpeg-20240828-155140.log".
͏    For complete files, see comment:3.

comment:9 by MasterQuestionable, 3 months ago

Keywords: filter_complex h264 aac added
Summary: crash access violationCrash access violation

͏    Marvelous it is... your splendid filterchain:
[[

    [0:v:0]format=yuv420p,
    crop=0:602:1920:400,
    geq='if( gt( lum( X, Y ), 220 ), 255, 0 )',
    hue=s=0[f_3];
    [0:v:0]crop=0:602:1920:400,format=bgra[f_5];

    [1:v:0]scale=2304:1296,
    crop=192:108:1920:1080,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997[f_15];

    [2:v:0]scale=1024:576,
    crop=0:0:1024:576,
    split[f_18_0][f_18_1];

    [f_5][f_3]alphamerge,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=rgba[f_10];

    [f_18_0]scale=1920:1080,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=rgba,
    boxblur=100,
    setsar=1[f_25];

    [f_18_1]scale
    = 'if( gte( iw/ih, 1920/1080 ), min( iw, 1920 ), -1 )'
    : 'if( gte( iw/ih, 1920/1080 ), -1, min( ih, 1080 ) )',
    scale=(( trunc( iw/2 ) * 2 )):(( trunc( ih/2 ) * 2 )),
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=rgba[f_31];

    [f_25][f_31]overlay=(( (main_w - overlay_w)/2 )):(( (main_h - overlay_h)/2 )),
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=rgba[f_36];

    [f_15][f_36]concat,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=rgba,
    drawbox=0:'min( 720, (( ih - 400 )) )':1920:400:#000000a0:fill[f_42];

    [f_42][f_10]overlay=0:'min( 720, (( main_h - overlay_h )) )':shortest=1,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=yuv420p,
    setpts=(( PTS - STARTPTS )),
    setsar=1,
    fps=29.97002997002997,
    format=yuv420p[f_51];

]]
͏    Does it really work, I must wonder?

͏    Sheer madness, I see:
͏    What does it really intend?

͏    Unwieldy output from some monstrous program..?

Last edited 3 months ago by MasterQuestionable (previous) (diff)

comment:10 by MasterQuestionable, 3 months ago

Summary: Crash access violationCrash access violation of complex filterchain

͏    Does using "-an" to disable audio still cause crash?
͏    What about using another FFmpeg build:
͏    https://www.gyan.dev/ffmpeg/builds/

Last edited 3 months ago by MasterQuestionable (previous) (diff)

in reply to:  8 comment:11 by Truong Quoc Khanh, 3 months ago

Replying to MasterQuestionable:

͏    What's the error message in "ffmpeg-20240828-155140.log"?
͏    I didn't find it.

͏    Did the program just abruptly stopped? (so incomplete log)

-It crash, so no error message, the code not handle it. (may be some dll on that window error and return wrong value, so i request them try reinstall window)
-That filter work, and run well on my computer.
-That output from my library https://github.com/tqk2811/FFmpegArgs
(https://gist.github.com/tqk2811/29b4a8567d11d5e4cad0d41f1bfcf2ae)

Version 0, edited 3 months ago by Truong Quoc Khanh (next)

comment:12 by MasterQuestionable, 3 months ago

͏    There appears to be significant no-op in the filterchain.
͏    Try dissecting and reduce?

͏    Also, as the crashed is "avcodec":
͏    Would mere transcoding each file independently, without the filter reproduce?

in reply to:  12 comment:13 by Truong Quoc Khanh, 3 months ago

Replying to MasterQuestionable:

͏    There appears to be significant no-op in the filterchain.
͏    Try dissecting and reduce?

͏    Also, as the crashed is "avcodec":
͏    Would mere transcoding each file independently, without the filter reproduce?

Oh, it crash with only ffmpeg -i input.mp4 -c:v libx264 -b:v 3000K output.mp4
and ffmpeg -i input.mp4 -c copy output.mp4 not crash

Last edited 3 months ago by Truong Quoc Khanh (previous) (diff)

comment:14 by MasterQuestionable, 3 months ago

͏    What happens?
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc2=1920x1080:30:d=5" -c:v libx264 "Out.mkv"

͏    And in different Windows builds?

by Truong Quoc Khanh, 2 months ago

Attachment: log.txt added

ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc2=1920x1080:30:d=5" -c:v libx264 "Out.mkv"

comment:15 by Truong Quoc Khanh, 2 months ago

Out.mkv: https://drive.google.com/file/d/1RjDH5VXZjASp4Rxj43wc8Z0sXno6Y60E/view?usp=sharing

Sorry for late response, It is quite difficult to communicate with third parties

comment:16 by Truong Quoc Khanh, 2 months ago

ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc2=1920x1080:30:d=5000" -c:v libx264 "Out.mkv" work well (changed to 5000s). Then crash only when decode

Last edited 2 months ago by Truong Quoc Khanh (previous) (diff)

comment:17 by Truong Quoc Khanh, 2 months ago

ffmpeg -i "D:\AM NHAT\1 闇アバキ OK\video 1080\1. 【スカッとする話】軽トラ作業着で娘の運動会にかけつけると、外車で来た大企業部長の夫人が「貧乏人はうちの子と関わるな!」俺「了解!俺に媚び売る旦那に二度と関わるなって言っててw」【修羅場】.mp4" -vn -c:a libmp3lame test.mp3 -y -v debug 2>mp3.log
https://drive.google.com/file/d/1pQFVEXzpNvYeLH294v9OR5qU77dUI0I2/view?usp=sharing

ffmpeg -i "D:\AM NHAT\1 闇アバキ OK\video 1080\1. 【スカッとする話】軽トラ作業着で娘の運動会にかけつけると、外車で来た大企業部長の夫人が「貧乏人はうちの子と関わるな!」俺「了解!俺に媚び売る旦那に二度と関わるなって言っててw」【修羅場】.mp4" -an -c:v libx264 test.mp4 -y -v debug 2>mp4.log
https://drive.google.com/file/d/1GSVvzm6W2eSKNoo5sQyBn3fkW1epcItr/view?usp=drive_link

ffmpeg -i "D:\AM NHAT\1 闇アバキ OK\video 1080\1. 【スカッとする話】軽トラ作業着で娘の運動会にかけつけると、外車で来た大企業部長の夫人が「貧乏人はうちの子と関わるな!」俺「了解!俺に媚び売る旦那に二度と関わるなって言っててw」【修羅場】.mp4" -an -c:v libx265 test.mp4 -y -v debug 2>mp4_265.log
https://drive.google.com/file/d/1xhvyyzrxyOBYIiUNNvdPubY2VCMTzRZV/view?usp=sharing

look like crash when decode video

But ffplay can play video without crash
ffplay -i "D:\AM NHAT\1 闇アバキ OK\video 1080\1. 【スカッとする話】軽トラ作業着で娘の運動会にかけつけると、外車で来た大企業部長の夫人が「貧乏人はうちの子と関わるな!」俺「了解!俺に媚び売る旦那に二度と関わるなって言っててw」【修羅場】.mp4" -v debug 1> play_1.log 2> play_2.log
https://drive.google.com/file/d/1U6ohHuE0Av2HNL7AZzIGjM_zErcWXAsX/view?usp=sharing

ffprobe -i "D:\AM NHAT\1 闇アバキ OK\video 1080\1. 【スカッとする話】軽トラ作業着で娘の運動会にかけつけると 、外車で来た大企業部長の夫人が「貧乏人はうちの子と関わるな!」俺「了解!俺に媚び売る旦那に二度と関わるなって言っててw」【修羅場】.mp4" -print_format json -show_streams -v debug -show_format -show_packets 1>ffprobe_1.json 2>ffprobe_2.log
https://drive.google.com/file/d/11MySLD4eZxFAEJe6l-nNQSXfOWxsKPuH/view?usp=drive_link
https://drive.google.com/file/d/1DuyL0JLZEG2zr21h4es6u_RS0ZB9Fcj7/view?usp=drive_link

Last edited 2 months ago by Truong Quoc Khanh (previous) (diff)

comment:18 by MasterQuestionable, 2 months ago

Keywords: windows added; filter_complex aac removed
Resolution: worksforme
Status: newclosed
Summary: Crash access violation of complex filterchainCrash access violation in certain deployment

͏    I guessed much what's going on.
͏    I believe the problem is likely specific to their deployment: mostly just corrupt program files.
͏    Probably not something can be fixed upstream.
͏    Potentially a build problem?

͏    Note:
͏    I'm not sure I perfectly understand your every statement after comment:14.
͏    Questions:
͏    |1| All listed commands resulted in alike crash of "avcodec"? (as in comment:description)
͏    |2| Are all the FF-* tools of the same build?
͏    [ ^ Per the command logs apparently not: later ones are of 6.1.1-20240130?? ]

comment:19 by Truong Quoc Khanh, 2 months ago

1: Yes, all crash in window event viewer is avcodec

2: Since log.txt​, all file i upload is 6.1.1..... https://gitlab.com/tqk2811/FFmpegBuildSubmodule/-/tree/master_6.1/out/ffmpeg-n6.1.1-1-g61b88b4dda-win64-gpl-shared-6.1/bin?ref_type=heads
And before, i was tested with many versions 5.0, 6.1, 7.0,...

Last edited 2 months ago by Truong Quoc Khanh (previous) (diff)

by MasterQuestionable, 2 months ago

͏    Workaround failed [ https://streams.videolan.org/upload/ ].

Note: See TracTickets for help on using tickets.