olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.13k stars 548 forks source link

[CRASH] Olive crashes when Opencolorio config is applied #2209

Open taimi7364 opened 1 year ago

taimi7364 commented 1 year ago

Commit Hash 5626e6ae

Platform Windows 10

Summary I was trying to export openexr sequence in vp9, gbrp10le video with ocio rec.2020 color space (in matroska format) and audio was set to flac 16bit. Latest Olive (5626e6ae) crashes when these 2 configs are applied (linked at the bottom). But on the same version (5626e6ae) if no ocio config is used everything works as it should. I’m trying to upgrade from 10bc448c to the latest version. On 10bc448c everything works fine and no crashes when trying to export with ocio config applied. I don’t know if it is on my end that something creates an error (old cache?).

I have tested these opencolorio-configs: https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases https://github.com/colour-science/OpenColorIO-Configs/releases  (1.2 used in crash report)

Steps to Reproduce

  1. Open new project
  2. Open ocio config in project properties and set it to Output – rec.2020
  3. Import one openexr frame or sequence. And then set openexr’s color space (not in project properties) to ACES - ACEScg
  4. Set on preview display to ACES and view to rec. 2020
  5. On export options set format to matroska video, codec to vp9 and in advanced pixel format to gbrp10le full range, on audio set the codec to flac and bit depth to 16bit
  6. Try to export here it should crash
Crash Report



[crash.txt](https://github.com/olive-editor/olive/files/11119169/crash.txt)

**Additional Information**
Thanks for making this amazing software. I could try this on linux (Mint) but I doubt it would make a difference.            
ThomasWilshaw commented 1 year ago

In step 2 what are you setting to Output- Rec.2020? The reference space or the default input color space?

ThomasWilshaw commented 1 year ago

After a bit of digging it looks like the export dialoge is using the default config rather than the newly selected one. To test this I added qWarning() << config->GetConfig()->getDefaultDisplay(); to line 76 of colorprocessor.cpp and it consitently returned sRGB which is not a display available in the config I tested with (aces_1.2) but is the default display in Olive's config.

taimi7364 commented 1 year ago

Here is the video showing what I do: https://www.youtube.com/watch?v=CU5FCH7fdnc

So would it be hard to change Olive's config from the sRGB to the selected one in aces_1.2 for example to rec.2020? At least on older versions of Olive these color spaces work just fine.

Quackdoc commented 1 year ago

Forwarded from discord

The issue is that it seems like the color_manager_ color_manager_ = copier_->GetCopiedProject()->color_manager(); that gets sent to olive is the default color manager.

when you update the color manager via project settings, it doesn't updater whatever the exporter inherits from.

sorry I don't have the time right now to investigate and make a patch, I might later? not sure. QT stuff confuses me though so it might take a while thankfully we can set default using OCIO so thats what ill be doing temporarily also in projectproperties.cpp, this should probably not fail if no colorspace is set, when it does olive crashes

      if (cs == working_project_->color_manager()->GetDefaultInputColorSpace()) {
        default_input_colorspace_->setCurrentIndex(default_input_colorspace_->count()-1);
      }
taimi7364 commented 10 months ago

How to get OCIO working you have to add it in enviroment variables. Like this: image