SUMMARY When rendering animation to GIF for the first time after opening Krita, only some of the frames are written and the render fails with: "Failed to render animation frames! Output files are incomplete." It works when you do it the second time. STEPS TO REPRODUCE 1. Start Krita and open https://github.com/libjxl/conformance/raw/master/testcases/animation_newtons_cradle/input.jxl 2. Choose File -> Render Animation 3. Select video and set render as GIF image 4. Select OK OBSERVED RESULT Export fails with "Failed to render animation frames! Output files are incomplete." EXPECTED RESULT Export should succeed. SOFTWARE/OS VERSIONS Windows: 10 ADDITIONAL INFORMATION Tested with nightly 44e3597339
This seems to be happening with the first export attempt in general after Krita's initial startup currently. For some reason, we're getting a erroneous "filetype not supported" error from the KisImportExportManager's filterForMimeType method until we run again.
I found the source of the bug: Something in commit 710e424a965d945ed2f91091f7aabcab431d3199 is causing the exporter to fail on the first export attempt. For now, I've assigned the bug to Dmitry since it was introduced in that commit. I was going to fix it myself, but since it's tied to Windows performance, I wanted to be doubly sure that this is fixed appropriately for the OS.
Git commit 8106e5c92af65d5d52304858a63e4d88e4f87b12 by Dmitry Kazakov. Committed on 04/08/2022 at 12:59. Pushed by dkazakov into branch 'master'. Fix problem of rendering animation Animation is rendered in multiple threads, the loaders cannot be accessed in multiple threads though. So now there is a wrapper class that locks the access to the library loading. M +3 -3 libs/flake/KoShapeFactoryBase.cpp M +34 -3 libs/koplugin/KoJsonTrader.cpp M +17 -1 libs/koplugin/KoJsonTrader.h M +17 -17 libs/koplugin/KoPluginLoader.cpp M +15 -12 libs/ui/KisImportExportManager.cpp M +4 -4 plugins/extensions/qmic/QMic.cpp https://invent.kde.org/graphics/krita/commit/8106e5c92af65d5d52304858a63e4d88e4f87b12
Git commit 1f874f2da2cdf9c66647c0a7ed937f8321f35bc7 by Dmitry Kazakov. Committed on 04/08/2022 at 13:22. Pushed by dkazakov into branch 'krita/5.1'. Fix problem of rendering animation Animation is rendered in multiple threads, the loaders cannot be accessed in multiple threads though. So now there is a wrapper class that locks the access to the library loading. M +3 -3 libs/flake/KoShapeFactoryBase.cpp M +34 -3 libs/koplugin/KoJsonTrader.cpp M +17 -1 libs/koplugin/KoJsonTrader.h M +17 -17 libs/koplugin/KoPluginLoader.cpp M +15 -12 libs/ui/KisImportExportManager.cpp M +4 -4 plugins/extensions/qmic/QMic.cpp https://invent.kde.org/graphics/krita/commit/1f874f2da2cdf9c66647c0a7ed937f8321f35bc7
Git commit c90e21774385eec3cbf28aa41c2261e1be52aaeb by L. E. Segovia. Committed on 04/08/2022 at 15:20. Pushed by lsegovia into branch 'master'. MSVC: fix export of KoJsonTrader::Plugin M +1 -1 libs/koplugin/KoJsonTrader.h https://invent.kde.org/graphics/krita/commit/c90e21774385eec3cbf28aa41c2261e1be52aaeb
Git commit 3f4352e6aff894009f904cba90a363aeece9baf7 by Alvin Wong, on behalf of L. E. Segovia. Committed on 04/08/2022 at 17:17. Pushed by alvinwong into branch 'krita/5.1'. MSVC: fix export of KoJsonTrader::Plugin (cherry picked from commit c90e21774385eec3cbf28aa41c2261e1be52aaeb) M +1 -1 libs/koplugin/KoJsonTrader.h https://invent.kde.org/graphics/krita/commit/3f4352e6aff894009f904cba90a363aeece9baf7