[Testng Needed] Krita updates all the libraries it depends on

Hi, all!

We are in a process of upgrading the libraries we depend on. These libraries allow Krita to open various file formats (i.e. .png, .tiff, .exr, .heif, .avif, .heif, .webp), play animation audio, render fonts and so on. We plan to release the next stable release of Krita already with the updated set of dependencies :slight_smile:

Could you please help up with testing the updated packages with your personal workflow before we actually release them?

The list of things that could potentially break :slight_smile:

  1. Save and open documents in various file formats, especially the actively developing ones like avif, heif, jpegxl and webp
  2. Animation playback and scrubbing
  3. Animation audio playback with different types of audio file formats
  4. Non-standard fonts rendering and the fonts selector

PS:
We didn’t update Qt in this wave of updates, so it shouldn’t break too much :slight_smile:

Tested on macOS.

  1. Imported and exported some basic .heif, .jxl, .webp without issue.
  2. Animation playback works.
  3. Animation audio works (.flac, .mp3, .ogg, .opus, .wav).
  4. Fonts and the font selector seem to work fine.

G’MIC works, Python plugins work.

The builtin FFmpeg works for the MP4, GIF, and Matroska presets. However, the WebM preset results in ‘FFMpeg crashed’. For comparison, using 5.3.2.1’s FFmpeg results in Automatic encoder selection failed Default encoder for format webm (codec vp8) is probably disabled. Please choose an encoder manually., so this is a regression, but apparently already wasn’t working.

Externally running this FFmpeg with the same arguments shows it crashed to an illegal instruction, somewhere in libvpx.

Backtrace (from the prebuilt deps with debug symbols)
* thread #2, name = 'enc0:0:libvpx-v', stop reason = EXC_BAD_INSTRUCTION (code=1, subcode=0x44d10223)
  * frame #0: 0x0000000102189c90 libvpx.11.dylib`vpx_sum_squares_2d_i16_sve + 160
    frame #1: 0x000000010225c7e0 libvpx.11.dylib`sum_squares_visible + 264
    frame #2: 0x000000010225bf88 libvpx.11.dylib`block_rd_txfm + 1332
    frame #3: 0x00000001021edf3c libvpx.11.dylib`vp9_foreach_transformed_block_in_plane + 376
    frame #4: 0x000000010225720c libvpx.11.dylib`super_block_yrd + 1344
    frame #5: 0x0000000102250e90 libvpx.11.dylib`vp9_rd_pick_intra_mode_sb + 452
    frame #6: 0x000000010221b340 libvpx.11.dylib`rd_pick_sb_modes + 1796
    frame #7: 0x000000010221969c libvpx.11.dylib`rd_pick_partition + 2108
    frame #8: 0x000000010220cb1c libvpx.11.dylib`vp9_encode_sb_row + 8280
    frame #9: 0x000000010220cc40 libvpx.11.dylib`vp9_encode_tile + 104
    frame #10: 0x00000001022211c0 libvpx.11.dylib`enc_worker_hook + 96
    frame #11: 0x00000001021ad608 libvpx.11.dylib`execute + 36
    frame #12: 0x0000000102220b4c libvpx.11.dylib`vp9_encode_tiles_mt + 620
    frame #13: 0x000000010220e358 libvpx.11.dylib`encode_frame_internal + 2120
    frame #14: 0x000000010220d488 libvpx.11.dylib`vp9_encode_frame + 700
    frame #15: 0x0000000102242d44 libvpx.11.dylib`encode_frame_to_data_rate + 14860
    frame #16: 0x000000010223e5c4 libvpx.11.dylib`vp9_get_compressed_data + 4700
    frame #17: 0x00000001021fc624 libvpx.11.dylib`encoder_encode + 1968
    frame #18: 0x000000010218a4f0 libvpx.11.dylib`vpx_codec_encode + 160
    frame #19: 0x000000010417ea7c libavcodec.62.dylib`vpx_encode + 2580
    frame #20: 0x00000001044c8bec libavcodec.62.dylib`ff_encode_encode_cb + 48
    frame #21: 0x00000001044c9088 libavcodec.62.dylib`encode_receive_packet_internal + 352
    frame #22: 0x00000001044c8edc libavcodec.62.dylib`avcodec_send_frame + 400
    frame #23: 0x0000000100015960 ffmpeg`frame_encode + 1064
    frame #24: 0x0000000100015444 ffmpeg`encoder_thread + 496
    frame #25: 0x000000010002ba7c ffmpeg`task_wrapper + 56
    frame #26: 0x000000018af17bc8 libsystem_pthread.dylib`_pthread_start + 136

With my workflow, haven’t noticed anything strange/broken so far (on arch). Will update from Windows later, maybe, if I fix up my PC cable hell. I have no config there so I’ll be doing this in a more ‘clean’ way there. : P

Android arm64
Android 16, one UI 8.5

  • pegxl and webp - export as and open documents works
  • Heif and avif - not able to export as (they aren’t in the list) and unable to open either file type

Animation - unable to render video, it does image sequence only

Timelapse - the render button is missing on the recorder docker

Fonts - didn’t test. I’ll try to do that later (not sure how to do that yet)

Error message when attempting to open avif:

That the animation and timelapse export options aren’t there is intentional. Previous versions showed you the options, but you could never actually perform an export because you can’t set up ffmpeg on Android. Making that work via the Android video encoders instead is a different job site.

Oh, I’m sorry. I tested those APKs - it was so great. I thought this was part of it. I’m greedy.

Unfortunately not, since it involves quite a lot of text changes, the translators will need to have a round with it first. We may ask them to make an exception, but that’s something to look at once all the exports are working, rather than having to do two rounds of it for timelapses and animations.

Hi, @freyalupen!

Thanks a lot for testing and this backtrace! It was really useful. Could you please test the updated package?

It seems like Apple Silicon doesn’t support SVE and SVE2 ISAs, while libvpx automatically enables them if the compiles supports them, disabling the runtime checks at the same time…

The updated package works, its FFmpeg renders WebM without issue.

Thanks a lot! :slight_smile:

Arch Linux 7.0.13-arch1-1

krita-5.4.0-prealpha-6d381b9bbb-x86_64.AppImage

Error on launch:

Krita has encountered an internal error:

SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2160

What does it say before that? You probably cut out the message that explains the cause of it.

And can you check whether this is exclusive to this version of Krita? I get the same kind of error on earlier versions anyway:

Could not execute addResourceVersionImpl statement QSqlError(“19”, “Unable to fetch row”, “UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version”) 1063 “fontregistry” “fontregistry” “Noto Sans Sinhala” “Noto Sans Sinhala” version 0
SAFE ASSERT (krita): “result” in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2160

You may just never have noticed because release versions of Krita don’t show you a dialog box about safe assertions.

You are right, the same line appears in v5.3.2.1’s log.

Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2826 "fontregistry" "fontregistry" "Taco and Tequila Shadow" "Taco and Tequila Shadow" version 0

SAFE ASSERT (krita): “result” in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2160

and a bunch of fonconfig warnings before, e.g.
Fontconfig warning: “/etc/fonts/conf.d/49-sansserif.conf”, line 10: invalid constant used : serif
Fontconfig warning: “/etc/fonts/conf.d/49-sansserif.conf”, line 18: invalid constant used : sans-serif
Fontconfig warning: “/etc/fonts/conf.d/49-sansserif.conf”, line 26: invalid constant used : monospace
Fontconfig warning: “/etc/fonts/conf.d/49-sansserif.conf”, line 34: invalid constant used : emoji
Fontconfig warning: “/etc/fonts/conf.d/49-sansserif.conf”, line 42: invalid constant used : math

etc.

Hi, @Vladar!

Could you please share your resources cache database via private messages?

It should be located in ~/.local/share/krita/resourcecache.sqlite