Crash when rendering to Quicktime RLE codec #53058

Closed
opened 2017-10-13 14:54:56 +02:00 by Jason van Gumster · 22 comments

System Information
Arch Linux, NVIDIA Quadro K5100M

Blender Version
Broken: 2.79 official and a51688d0b0
Worked: 2.78c

Short description of error
When rendering to a movie format using FFMPEG on a .blend file that was created at or before Blender 2.78c, Blender will crash if you choose to use the Quicktime RLE codec.

I made a debug build of a51688d0b0 and got the following GDB backtrace:

(gdb) bt
- 0  0x00007fffeaa038a0 in raise () from /usr/lib/libc.so.6
- 1  0x00007fffeaa04f09 in abort () from /usr/lib/libc.so.6
- 2  0x00007ffff07cdaac in ?? () from /usr/lib/libavutil.so.55
- 3  0x00007ffff07e6ea2 in av_image_copy () from /usr/lib/libavutil.so.55
- 4  0x00007ffff07dfc91 in av_frame_copy () from /usr/lib/libavutil.so.55
- 5  0x00007ffff07e0255 in av_frame_ref () from /usr/lib/libavutil.so.55
- 6  0x00007ffff0fc5e72 in ?? () from /usr/lib/libavcodec.so.57
- 7  0x00007ffff1084e68 in avcodec_encode_video2 ()
   from /usr/lib/libavcodec.so.57
#8  0x000055555825a98b in write_video_frame (context=0x7fffd25a5008,
    rd=0x7fffbc509490, cfra=0, frame=0x7fffd2582a00, reports=0x7fffc4f0be58)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:328
#9  0x000055555825cd8a in BKE_ffmpeg_append (context_v=0x7fffd25a5008,
    rd=0x7fffbc509490, start_frame=775, frame=775, pixels=0x7fffac7cf6c8,
    rectx=1920, recty=1080, suffix=0x55555bd363a4 "", reports=0x7fffc4f0be58)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:1241
#10 0x00005555578cf640 in RE_WriteRenderViewsMovie (reports=0x7fffc4f0be58,
    rr=0x7fffc1903670, scene=0x7fffccf5d808, rd=0x7fffbc509490,
    mh=0x55555d95fee0 <mh>, movie_ctx_arr=0x7fffd2583008, totvideos=1,
    preview=false)
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3446
#11 0x00005555578cf97c in do_write_image_or_movie (re=0x7fffbc508008,
    bmain=0x7fffccee3f08, scene=0x7fffccf5d808, mh=0x55555d95fee0 <mh>,
    totvideos=1, name_override=0x0)
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3494
#12 0x00005555578d06fc in RE_BlenderAnim (re=0x7fffbc508008,
    bmain=0x7fffccee3f08, scene=0x7fffccf5d808, camera_override=0x0,
    lay_override=0, sfra=775, efra=3058, tfra=1)
    at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3768
#13 0x000055555779efa6 in render_startjob (rjv=0x7fffd3688448,
    stop=0x7fffd364bcfc, do_update=0x7fffd364bcfa, progress=0x7fffd364bd00)
    at /home/jason_vangumster/src/blender/blender/source/blender/editors/render/render_internal.c:604
#14 0x00005555571efc4f in do_job_thread (job_v=0x7fffd364bc88)
    at /home/jason_vangumster/src/blender/blender/source/blender/windowmanager/intern/wm_jobs.c:337
#15 0x000055555857bab9 in tslot_thread_start (tslot_p=0x7fffd7aa6908)
    at /home/jason_vangumster/src/blender/blender/source/blender/blenlib/intern/threads.c:253
- 16 0x00007fffeaf9108a in start_thread () from /usr/lib/libpthread.so.0
- 17 0x00007fffeaac51bf in clone () from /usr/lib/libc.so.6

Exact steps for others to reproduce the error

  1. Open Blender
  2. Load the startup.blend attached to this report
  3. In the Output panel of Render Properties, change Format to FFMPEG video
  4. In the Encoding panel, change codec to QT rle/Quicktime Animation (container and audio codec don't seem to matter)
  5. Render animation (Ctrl+F12)
  6. Observe crash

Crash was confirmed on IRC by @jensverwiebe

startup.blend

**System Information** Arch Linux, NVIDIA Quadro K5100M **Blender Version** Broken: 2.79 official and a51688d0b06 Worked: 2.78c **Short description of error** When rendering to a movie format using FFMPEG on a .blend file that was created at or before Blender 2.78c, Blender will crash if you choose to use the Quicktime RLE codec. I made a debug build of a51688d0b06 and got the following GDB backtrace: ``` (gdb) bt - 0 0x00007fffeaa038a0 in raise () from /usr/lib/libc.so.6 - 1 0x00007fffeaa04f09 in abort () from /usr/lib/libc.so.6 - 2 0x00007ffff07cdaac in ?? () from /usr/lib/libavutil.so.55 - 3 0x00007ffff07e6ea2 in av_image_copy () from /usr/lib/libavutil.so.55 - 4 0x00007ffff07dfc91 in av_frame_copy () from /usr/lib/libavutil.so.55 - 5 0x00007ffff07e0255 in av_frame_ref () from /usr/lib/libavutil.so.55 - 6 0x00007ffff0fc5e72 in ?? () from /usr/lib/libavcodec.so.57 - 7 0x00007ffff1084e68 in avcodec_encode_video2 () from /usr/lib/libavcodec.so.57 #8 0x000055555825a98b in write_video_frame (context=0x7fffd25a5008, rd=0x7fffbc509490, cfra=0, frame=0x7fffd2582a00, reports=0x7fffc4f0be58) at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:328 #9 0x000055555825cd8a in BKE_ffmpeg_append (context_v=0x7fffd25a5008, rd=0x7fffbc509490, start_frame=775, frame=775, pixels=0x7fffac7cf6c8, rectx=1920, recty=1080, suffix=0x55555bd363a4 "", reports=0x7fffc4f0be58) at /home/jason_vangumster/src/blender/blender/source/blender/blenkernel/intern/writeffmpeg.c:1241 #10 0x00005555578cf640 in RE_WriteRenderViewsMovie (reports=0x7fffc4f0be58, rr=0x7fffc1903670, scene=0x7fffccf5d808, rd=0x7fffbc509490, mh=0x55555d95fee0 <mh>, movie_ctx_arr=0x7fffd2583008, totvideos=1, preview=false) at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3446 #11 0x00005555578cf97c in do_write_image_or_movie (re=0x7fffbc508008, bmain=0x7fffccee3f08, scene=0x7fffccf5d808, mh=0x55555d95fee0 <mh>, totvideos=1, name_override=0x0) at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3494 #12 0x00005555578d06fc in RE_BlenderAnim (re=0x7fffbc508008, bmain=0x7fffccee3f08, scene=0x7fffccf5d808, camera_override=0x0, lay_override=0, sfra=775, efra=3058, tfra=1) at /home/jason_vangumster/src/blender/blender/source/blender/render/intern/source/pipeline.c:3768 #13 0x000055555779efa6 in render_startjob (rjv=0x7fffd3688448, stop=0x7fffd364bcfc, do_update=0x7fffd364bcfa, progress=0x7fffd364bd00) at /home/jason_vangumster/src/blender/blender/source/blender/editors/render/render_internal.c:604 #14 0x00005555571efc4f in do_job_thread (job_v=0x7fffd364bc88) at /home/jason_vangumster/src/blender/blender/source/blender/windowmanager/intern/wm_jobs.c:337 #15 0x000055555857bab9 in tslot_thread_start (tslot_p=0x7fffd7aa6908) at /home/jason_vangumster/src/blender/blender/source/blender/blenlib/intern/threads.c:253 - 16 0x00007fffeaf9108a in start_thread () from /usr/lib/libpthread.so.0 - 17 0x00007fffeaac51bf in clone () from /usr/lib/libc.so.6 ``` **Exact steps for others to reproduce the error** 1. Open Blender 2. Load the startup.blend attached to this report 3. In the Output panel of Render Properties, change Format to FFMPEG video 4. In the Encoding panel, change codec to QT rle/Quicktime Animation (container and audio codec don't seem to matter) 5. Render animation (Ctrl+F12) 6. Observe crash Crash was confirmed on IRC by @jensverwiebe [startup.blend](https://archive.blender.org/developer/F1014231/startup.blend)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscribers: @jensverwiebe, @JasonvanGumster

Added subscribers: @jensverwiebe, @JasonvanGumster

#55237 was marked as duplicate of this issue

#55237 was marked as duplicate of this issue

#61727 was marked as duplicate of this issue

#61727 was marked as duplicate of this issue
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

Can repro this on windows as well.

Can repro this on windows as well.
Member

I use a quickfix for now cause it seems rle is always handled/expected with alpha in blender:

diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index a19e414..57dbbe8 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -648,9 +648,9 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int
        }
 
        if (codec_id == AV_CODEC_ID_QTRLE) {
-               if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
+//             if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = AV_PIX_FMT_ARGB;
-               }
+//             }
        }
 
        if (codec_id == AV_CODEC_ID_PNG) {

Jens
I use a quickfix for now cause it seems rle is always handled/expected with alpha in blender: ``` diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index a19e414..57dbbe8 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -648,9 +648,9 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int } if (codec_id == AV_CODEC_ID_QTRLE) { - if (rd->im_format.planes == R_IMF_PLANES_RGBA) { +// if (rd->im_format.planes == R_IMF_PLANES_RGBA) { c->pix_fmt = AV_PIX_FMT_ARGB; - } +// } } if (codec_id == AV_CODEC_ID_PNG) { Jens ```

Added subscriber: @LucianoMunoz

Added subscriber: @LucianoMunoz

hey I think this bug is still in 2.8!
:(

hey I think this bug is still in 2.8! :(

Added subscribers: @lichtwerk, @Sergey

Added subscribers: @lichtwerk, @Sergey

hey guys any news on this?

hey guys any news on this?

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

I can confirm this is still an issue in current master (3994084e6a).

As a workaround, select RGBA as color model in Blender. It basically does the same as @jensverwiebe 's fix, without having to touch the C code and rebuild Blender.

I can confirm this is still an issue in current master (3994084e6a33a32b111188b91c28440181405f1d). As a workaround, select RGBA as color model in Blender. It basically does the same as @jensverwiebe 's fix, without having to touch the C code and rebuild Blender.
Sybren A. Stüvel was assigned by Brecht Van Lommel 2019-06-30 23:40:52 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

@dr.sybren can you fix this then? It shouldn't be too hard to just always write RGBA under the hood if that is all we support.

@dr.sybren can you fix this then? It shouldn't be too hard to just always write RGBA under the hood if that is all we support.

This issue was referenced by a5b7cf9b5f

This issue was referenced by a5b7cf9b5f134febd726dc7a92e7602dc60862ad

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

holy moly you did it!!!

holy moly you did it!!!

@LucianoMunoz I also fixed it properly in D5174. It's probably safest to keep that for 2.81, but then writing RGB is also possible with QTRLE (and it is also a bit faster).

@LucianoMunoz I also fixed it properly in [D5174](https://archive.blender.org/developer/D5174). It's probably safest to keep that for 2.81, but then writing RGB is also possible with QTRLE (and it is also a bit faster).

next time i see you ill kiss ya!

next time i see you ill kiss ya!

This issue was referenced by 08a6321501

This issue was referenced by 08a63215018222062e6d669f9ac4de3980722042

Writing RGB with QTRLE is now also possible, as D5174 is now in master. And WebM+VP9 also has proper alpha support now.

Writing RGB with QTRLE is now also possible, as [D5174](https://archive.blender.org/developer/D5174) is now in master. And WebM+VP9 also has proper alpha support now.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#53058
No description provided.