Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915831 - media-gfx/krita-5.1.5: refuses to open recently created, and older kra files
Summary: media-gfx/krita-5.1.5: refuses to open recently created, and older kra files
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-15 21:01 UTC by latex
Modified: 2023-12-03 17:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A wall of drippy latex with a paw sticking out (latex_background.kra,301.95 KB, application/x-krita)
2023-10-15 21:32 UTC, latex
Details
Some attempted drawings of a folf. Opens fine in Krita 5.1.5 (folfdraw.kra,287.19 KB, application/x-krita)
2023-10-16 13:45 UTC, latex
Details
Screenshot - Krita does not support this file format (krita_does_not_support_this_file_format.png,278.36 KB, image/png)
2023-10-16 13:54 UTC, latex
Details
GDB backtrace on all threads when the error message is shown (file_915831.txt,44.25 KB, text/plain)
2023-10-18 14:44 UTC, latex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description latex 2023-10-15 21:01:12 UTC
I cannot open about half of the kra files I've made throughout my lifetime. The error message that I get is as follows:
Could not open /path/to/file.kra.
Reason: Krita does not support this file format.

Reproducible: Always

Steps to Reproduce:
1. Download the attachment (or make your own .kra files and hope it reproduces, not all kra files will end up unopenable)
2. Open it in Krita
Actual Results:  
Krita does not support this file format

Expected Results:  
File opens successfully

I already reported this bug upstream, but they cannot reproduce it. It doesn't happen with the Krita appimage, but the Krita binaries produces by the ebuild do seem to cause this bug somehow. This even happens on my Krita 5.2.0 ebuild somehow, so a simple ebuild version bump won't fix this :/
Comment 1 latex 2023-10-15 21:03:47 UTC
Reproducible: Often, but not always*
Comment 2 Andreas Sturmlechner gentoo-dev 2023-10-15 21:23:02 UTC
Since when is this the case?
Did you upgrade to x11-misc/shared-mime-info-2.3 prior to this happening?
Comment 3 latex 2023-10-15 21:26:53 UTC
Huh. I was on x11-misc/shared-mime-info-2.2 but now after upgrading to 2.3, it still doesn't work.
Comment 4 latex 2023-10-15 21:28:26 UTC
And it's hard to track down how long this has been happening. I just suddenly noticed I can't open my recently created and older kra files. I also had a decent break from drawing and now when I want to get into it, Krita is broken.
Comment 5 Andreas Sturmlechner gentoo-dev 2023-10-15 21:28:48 UTC
Please fix URL to link to the actual upstream bug, not an attachment.
Comment 6 latex 2023-10-15 21:32:18 UTC
Created attachment 872946 [details]
A wall of drippy latex with a paw sticking out

Doesn't load in =media-gfx/krita-5.1.5
Comment 7 Andreas Sturmlechner gentoo-dev 2023-10-15 21:33:52 UTC
At least I can open the file you linked to without any problems, so not a Gentoo problem in general, it would seem.

My USE flags:

[ebuild   R    ] media-gfx/krita-5.1.5:5::gentoo  USE="fftw gif gsl mypaint-brush-engine openexr pdf raw webp -color-management -debug -heif -jpegxl -qtmedia -test" PYTHON_SINGLE_TARGET="python3_11 -python3_10" 180.647 KiB

Total: 1 package (1 reinstall), Size of downloads: 180.647 KiB


This bug is severely missing your emerge --info.
Comment 8 latex 2023-10-15 21:38:26 UTC
Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.37-r7, 6.1.53-gentoo-r1 x86_64)
=================================================================
System uname: Linux-6.1.53-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-glibc2.37
KiB Mem:     8064608 total,   1034096 free
KiB Swap:   25165816 total,  22006460 free
Timestamp of repository gentoo: Sun, 15 Oct 2023 15:00:01 +0000
Head commit of repository gentoo: d8139eeaa48ba16b399aff35986af5077286b3bd
Timestamp of repository cova: Mon, 09 Oct 2023 11:03:20 +0000
Head commit of repository cova: a10d1515aa75758b6ef415553ce424ce0b3d5cb6

Timestamp of repository guru: Fri, 13 Oct 2023 10:46:48 +0000
Head commit of repository guru: d8d65a7efffbb1ffbb44eed8289456c33c796d41

Timestamp of repository java: Tue, 10 Oct 2023 19:16:53 +0000
Head commit of repository java: c445079b278ae855f39e2e6430cca85d8b8fc131

Timestamp of repository kde: Sat, 14 Oct 2023 20:03:38 +0000
Head commit of repository kde: e4d47971c21137b08ce8242ed5d7b09999096deb

Head commit of repository librewolf: cf0e96e73f451363acdfcdcfffe10e91296896f2

Timestamp of repository nest: Fri, 13 Oct 2023 20:16:46 +0000
Head commit of repository nest: c7c984545160e74b39894ca692b96e537d32a021

Timestamp of repository pf4public: Sat, 14 Oct 2023 20:17:38 +0000
Head commit of repository pf4public: 54f1bc5d58a0097d7ef122ec1b57ebf9d0abd990

Timestamp of repository xarblu-overlay: Fri, 13 Oct 2023 16:31:53 +0000
Head commit of repository xarblu-overlay: 5a7ec66e54e3b314f30c021683702e1342d434a1

Timestamp of repository zugaina: Fri, 16 Jun 2023 08:32:15 +0000
Head commit of repository zugaina: a31fcec20b159a13ccd069d4e13b92d18bc0ffec

Timestamp of repository haskell: Thu, 12 Oct 2023 03:01:52 +0000
Head commit of repository haskell: 8996e5e69b32030efe522d864746518e55ac1b88

sh dash 0.5.12
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8.2 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           2.7.18_p16-r1::gentoo, 3.11.5::gentoo
dev-lang/rust-bin:         1.72.0::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.2.1-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             6.5.0-r4::gentoo, 9.4.0::gentoo, 11.3.1_p20230427::gentoo, 12.3.1_p20230526::gentoo, 13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

cova
    location: /var/db/repos/cova
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/cova.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

java
    location: /var/db/repos/java
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/java.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    volatile: False

nest
    location: /var/db/repos/nest
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/nest.git
    masters: gentoo
    volatile: False

pf4public
    location: /var/db/repos/pf4public
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pf4public.git
    masters: gentoo
    volatile: False

rubbery
    location: /var/db/repos/rubbery
    masters: gentoo
    volatile: False

xarblu-overlay
    location: /var/db/repos/xarblu-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/xarblu-overlay.git
    masters: gentoo
    volatile: False

zugaina
    location: /var/db/repos/zugaina
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/zugaina.git
    masters: gentoo
    volatile: False

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo
    priority: 50
    volatile: False

Binary Repositories:

gentoo-binpkg
    priority: 9999
    sync-uri: https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/i2pd/certificates"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -g"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 2"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ rsync://mirror.leaseweb.com/gentoo/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j2"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/portagetmp"
SHELL="/bin/bash"
USE="X accessibility acl aio alsa amd64 bittorrent bzip2 cdda cli crypt cuda cue curl dri dssi dvd elogind fbcon ffmpeg flac fluidsynth fortran gdbm gif gme gpm heif iconv id3tag ipv6 jack jpeg jpeg2k jpegxl ladspa lame lash libsamplerate libtirpc lv2 lvm matroska midi multilib ncurses nls nptl nvenc ogg opencl opengl openmp openmpt opus osc pam pcre pipewire png pulseaudio raw readline rtmp seccomp sftp shout sid split-usr srt ssl test-rust threads tiff truetype udev unicode upnp vaapi vdpau vorbis vpx vulkan wavpack webp xattr xinerama zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia nouveau amdgpu radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Sorry I was really hasty from frustration so I forgot to read that I had to paste emerge --info in additional comments
Comment 9 latex 2023-10-15 21:40:02 UTC
=================================================================
                        Package Settings
=================================================================

media-gfx/krita-5.2.0::rubbery was built with the following:
USE="fftw gif gsl heif jpegxl mypaint-brush-engine openexr pdf raw webp -color-management -debug -qtmedia -test" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
CFLAGS="-march=native -O2 -pipe -ggdb3"
CXXFLAGS="-march=native -O2 -pipe -ggdb3"
FEATURES="strict userfetch splitdebug distlocks userpriv sandbox binpkg-docompress ipc-sandbox merge-sync protect-owned binpkg-logs xattr sfperms qa-unresolved-soname-deps config-protect-if-modified usersandbox unknown-features-warn pid-sandbox multilib-strict preserve-libs ebuild-locks binpkg-dostrip usersync unmerge-orphans assume-digests news compressdebug buildpkg-live fixlafiles network-sandbox parallel-fetch unmerge-logs"

Also this is my own experimental Krita version bump, however this bug is also reproducible on =media-gfx/krita-5.1.5::gentoo so it shouldn't make a difference.
Comment 10 latex 2023-10-15 21:49:24 UTC
If you want me to use =media-gfx/krita-5.1.5::gentoo specifically, then that's going to take me 3 hours to compile on this Haswell system, so yeah
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 02:03:07 UTC
(In reply to latex from comment #10)
> If you want me to use =media-gfx/krita-5.1.5::gentoo specifically, then
> that's going to take me 3 hours to compile on this Haswell system, so yeah

Please try to leave your frustration out of it.

This is the first we've heard of the problem and we're trying to get to the bottom of it.

It's worth noting you're not on a Plasma profile which generally enables support for various useful codecs and such in packages.

What changes would 'emerge -p -uvDU @world' make if you pretend to change to it but don't really? If you try changing to one, does it help?
Comment 12 latex 2023-10-16 12:42:51 UTC
Okay so I just switched to the default/linux/amd64/17.1/desktop/plasma (stable) profile, and ran emerge -p -uvDU @world --verbose-conflicts --backtrack=9999
Here's the output:

These are the packages that would be merged, in order:

Calculating dependencies  .. ... done!
Dependency resolution took 34.05 s.


!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

x11-libs/wxGTK:3.2-gtk3

  (x11-libs/wxGTK-3.2.2.1-r3:3.2-gtk3/3.2-gtk3::gentoo, ebuild scheduled for merge) USE="X curl gstreamer libnotify lzma opengl sdl spell tiff wayland -debug -doc -keyring (-pch) -test -webkit" ABI_X86="(64) -32 (-x32)" pulled in by
    (no parents that aren't satisfied by other packages in this slot)

  (x11-libs/wxGTK-3.2.2.1-r2:3.2-gtk3/3.2-gtk3::gentoo, ebuild scheduled for merge) USE="X curl gstreamer libnotify lzma opengl sdl spell tiff wayland -debug -doc -keyring (-pch) -test -webkit" ABI_X86="(64) -32 (-x32)" pulled in by
    <=x11-libs/wxGTK-3.2.2.1-r2:3.2-gtk3[X,opengl] required by (sci-electronics/kicad-7.0.1:0/0::gentoo, installed) USE="ngspice nls openmp -doc -examples" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
    ^^               ^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 

net-libs/libnice:0

  (net-libs/libnice-0.1.21:0/0::gentoo, ebuild scheduled for merge) USE="gnutls introspection upnp -gtk-doc -test" ABI_X86="(64) -32 (-x32)" pulled in by
    (no parents that aren't satisfied by other packages in this slot)

  (net-libs/libnice-0.1.19-r1:0/0::gentoo, installed) USE="gnutls introspection upnp -gtk-doc -test" ABI_X86="(64) -32 (-x32)" pulled in by
    ~net-libs/libnice-0.1.19[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (media-plugins/gst-plugins-libnice-0.1.19:1.0/1.0::gentoo, installed) USE="userland_GNU" ABI_X86="(64) -32 (-x32)"
    ^                 ^^^^^^                                                                                                                                                                                                                                                                  

media-video/ffmpeg:0

  (media-video/ffmpeg-6.0-r6:0/58.60.60::gentoo, ebuild scheduled for merge) USE="X alsa amr amrenc bluray bzip2 cdio codec2 dav1d encode fdk frei0r gme gnutls gpl gsm iconv jack jpeg2k jpegxl kvazaar ladspa lcms libaom libass libcaca libdrm libilbc libplacebo librtmp libsoxr lv2 lzma modplug mp3 network nvenc opencl opengl openssl opus postproc pulseaudio rav1e rubberband sdl speex srt ssh svg svt-av1 theora threads truetype twolame v4l vaapi vdpau vidstab vorbis vpx vulkan webp x264 x265 xvid zimg zlib zvbi (-amf) (-appkit) -bs2b -chromaprint -chromium -cpudetection (-cuda) -debug -doc -flite -fontconfig -fribidi -gcrypt -gmp -hardcoded-tables -iec61883 -ieee1394 -libaribb24 -libtesseract -libv4l -libxml2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -openal -openh264 -oss -pic (-qsv) -samba -snappy -sndio -static-libs -test -verify-sig (-vmaf) -zeromq" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" pulled in by
    media-video/ffmpeg:0/58.60.60= required by (net-misc/tigervnc-1.13.1-r3:0/0::gentoo, installed) USE="drm gnutls nls opengl server viewer xinerama -dri3 -java" ABI_X86="(64)"
                      ^^^^^^^^^^^^                                                                                                                                                
    media-video/ffmpeg:0/58.60.60=[abi_x86_64(-)] required by (media-libs/opencv-4.8.0-r1:0/4.8.0::gentoo, installed) USE="contrib contribdnn eigen features2d ffmpeg jpeg jpeg2k opencl opengl openmp png python qt5 threads tiff vaapi webp (-contribcvv) -contribfreetype (-contribhdf) (-contribovis) (-contribsfm) (-contribxfeatures2d) (-cuda) -debug -dnnsamples -download -examples -gdal (-gflags) (-glog) -gphoto2 -gstreamer -gtk3 -ieee1394 -java -lapack -lto -opencvapps -openexr (-tesseract) -testprograms -v4l (-vtk) -xine" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="avx avx2 f16c fma3 popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 -avx512f" PYTHON_TARGETS="python3_11 -python3_10"
                      ^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    media-video/ffmpeg:0/58.60.60= required by (www-plugins/lightspark-0.8.7:0/0::gentoo, installed) USE="curl ffmpeg nsplugin rtmp -gles2-only -ppapi -profile" ABI_X86="(64)" CPU_FLAGS_X86="sse2"
                      ^^^^^^^^^^^^                                                                                                                                                                   
    >=media-video/ffmpeg-4:0/58.60.60=[abi_x86_64(-)] required by (media-plugins/gst-plugins-libav-1.20.6:1.0/1.0::gentoo, installed) USE="nls -test" ABI_X86="(64) -32 (-x32)"
                          ^^^^^^^^^^^^                                                                                                                                          
    >=media-video/ffmpeg-5.1.2:=[postproc,fdk?] required by (media-video/handbrake-1.6.1:0/0::gentoo, installed) USE="fdk gtk nvenc -gstreamer -numa -x265" ABI_X86="(64)"
    ^^                   ^^^^^                                                                                                                                             
    >=media-video/ffmpeg-5.1.2:0/58.60.60=[postproc,fdk] required by (media-video/handbrake-1.6.1:0/0::gentoo, installed) USE="fdk gtk nvenc -gstreamer -numa -x265" ABI_X86="(64)"
    ^^                   ^^^^^^^^^^^^^^^^^                                                                                                                                          
    >=media-video/ffmpeg-2.7:0/58.60.60= required by (media-video/ffmpegthumbnailer-2.2.2-r1:0/0::gentoo, installed) USE="gtk jpeg png -gnome -test" ABI_X86="(64)"
                            ^^^^^^^^^^^^                                                                                                                            

  (media-video/ffmpeg-4.4.4-r3:0/56.58.58::gentoo, ebuild scheduled for merge) USE="X alsa amr amrenc bluray bzip2 cdio codec2 dav1d encode fdk frei0r gme gnutls gpl gsm iconv jack jpeg2k kvazaar ladspa libaom libass libcaca libdrm libilbc librtmp libsoxr lv2 lzma modplug mp3 network nvenc opencl opengl openssl opus postproc pulseaudio rav1e rubberband sdl speex srt ssh svg svt-av1 theora threads truetype twolame v4l vaapi vdpau vidstab vorbis vpx vulkan webp x264 x265 xvid zimg zlib zvbi (-amf) (-appkit) -bs2b -chromaprint -chromium -cpudetection (-cuda) -debug -doc -flite -fontconfig -fribidi -gcrypt -gmp -hardcoded-tables -iec61883 -ieee1394 -libaribb24 -libtesseract -libv4l -libxml2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -openal -openh264 -oss -pic (-qsv) -samba -snappy -sndio -static-libs -test -verify-sig (-vmaf) -zeromq" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" pulled in by
    media-video/ffmpeg:0/56.58.58= required by (media-sound/spek-0.8.4:0/0::gentoo, installed) USE="userland_GNU" ABI_X86="(64)"
                      ^^^^^^^^^^^^                                                                                               

media-libs/libcanberra:0

  (media-libs/libcanberra-0.30-r7:0/0::gentoo, ebuild scheduled for merge) USE="alsa gtk2 pulseaudio sound udev -gnome -gstreamer -gtk3 -oss -tdb" ABI_X86="(64) -32 (-x32)" pulled in by
    (no parents that aren't satisfied by other packages in this slot)

  (media-libs/libcanberra-0.30-r7:0/0::gentoo, installed) USE="alsa gtk2 gtk3 sound userland_GNU -gnome -gstreamer -oss -pulseaudio -tdb -udev" ABI_X86="(64) -32 (-x32)" pulled in by
    >=media-libs/libcanberra-0.16[gtk3] required by (media-sound/pavucontrol-5.0-r2:0/0::gentoo, installed) USE="nls" ABI_X86="(64)"
                                  ^^^^                                                                                               
    media-libs/libcanberra[gtk3] required by (media-sound/easytag-2.4.3-r5:0/0::gentoo, ebuild scheduled for merge) USE="flac mp3 mp4 opus vorbis wavpack -speex -test" ABI_X86="(64)"
                           ^^^^                                                                                                                                                        


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.


The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by x11-libs/gtk+-2.24.33-r3::gentoo[cups]
# required by media-gfx/graphviz-8.1.0::gentoo[gtk2]
# required by media-libs/ganv-1.8.2::gentoo[graphviz]
# required by media-sound/patchage-1.0.10::gentoo
# required by @selected
# required by @world (argument)
>=net-print/cups-2.4.7-r1 abi_x86_32
# required by net-print/cups-2.4.7-r1::gentoo[zeroconf]
# required by net-misc/freerdp-2.10.0-r3::gentoo[cups]
# required by net-misc/remmina-1.4.31::gentoo[rdp]
# required by @selected
# required by @world (argument)
>=net-dns/avahi-0.8-r7 abi_x86_32

 * In order to avoid wasting time, backtracking has terminated early
 * due to the above autounmask change(s). The --autounmask-backtrack=y
 * option can be used to force further backtracking, but there is no
 * guarantee that it will produce a solution.

!!! All ebuilds that could satisfy "media-libs/faac" have been masked.
!!! One of the following masked packages is required to complete your request:
- media-libs/faac-1.30::gentoo (masked by: MPEG-4 license(s))
A copy of the 'MPEG-4' license is located at '/var/db/repos/gentoo/licenses/MPEG-4'.


(dependency required by "media-sound/darkice-1.4-r1::gentoo[aac]" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

The news item is about pipewire and such, which I already have.
I doubt that any of these changes listed above will solve the issue.
Comment 13 latex 2023-10-16 12:47:32 UTC
=================================================================
                        Package Settings
=================================================================

media-gfx/krita-5.1.5::gentoo was built with the following:
USE="fftw gif gsl heif jpegxl mypaint-brush-engine openexr pdf raw webp -color-management -debug -qtmedia -test" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
CFLAGS="-march=native -O2 -pipe -ggdb3"
CXXFLAGS="-march=native -O2 -pipe -ggdb3"
FEATURES="sfperms config-protect-if-modified fail-clean unmerge-logs userfetch assume-digests strict buildpkg-live userpriv multilib-strict unmerge-orphans pid-sandbox binpkg-logs fixlafiles
usersync binpkg-dostrip compressdebug ipc-sandbox splitdebug unknown-features-warn binpkg-docompress distlocks network-sandbox news sandbox protect-owned ebuild-locks usersandbox merge-sync preserve-libs xattr parallel-fetch qa-unresolved-soname-deps"

I also compiled =media-gfx/krita-5.1.5 again, so here's the relevant emerge --info krita
Comment 14 latex 2023-10-16 12:49:47 UTC
I also tried rm -rf ~/.local/share/krita* and rm -rf ~/.config/krita* and I can still reproduce this bug no matter what. Some kra files load, but many do not.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 13:08:00 UTC
Putting a pin in the USE flag stuff which is still going to be worth poking at, just braindumping..

in 5.1.5 tag:

$ rg "does not support this file format" --type=cpp
libs/ui/KisImportExportErrorCode.cpp:170:                return i18n("Krita does not support this file format.");

$ rg FileFormatNotSupported --type=cpp
libs/ui/KisImportExportErrorCode.h:37:        FileFormatNotSupported, // this file format is not supported by Krita
libs/ui/KisDocument.cpp:780:        KisImportExportErrorCode error = ImportExportCodes::FileFormatNotSupported;
libs/ui/KisImportExportManager.cpp:328:        return KisImportExportErrorCode(ImportExportCodes::FileFormatNotSupported);
libs/ui/kis_clipboard.cc:705:            QString msg = KisImportExportErrorCode(ImportExportCodes::FileFormatNotSupported).errorMessage();
libs/ui/KisView.cpp:676:                                    ImportExportCodes::FileFormatNotSupported)
libs/ui/KisImportExportErrorCode.cpp:169:            case ImportExportCodes::FileFormatNotSupported:

* The case in KisDocument.cpp gets hit with job.mimeType.isEmpty().
* The case in libs/ui/KisImportExportManager.cpp gets hit if it can't find a "filter" (?) (derived from mimeTypeForFile)
* The case in kis_clipboard.cc is from mimeTypeForFile/supportedMimeTypes but you're not using clipboard here anyway
* The case in KisView.cpp is for drag/drop, mime again

so I guess the places to focus on are KisDocument.cpp, KisImportExportManager.cpp. I still don't really get it yet though.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 13:12:15 UTC
latex: how comfortable are you with gdb? Do you think you could do something like:

gdb --args krita /path/to/file.kra
b KisImportExportComplexError::qtErrorMessage
r
<wait until it errors out>
bt

and share the output?

Any other output it dumps to the terminal would be great as well.

(you'll need debugging symbols for krita at least, see https://wiki.gentoo.org/wiki/Debugging#Per-package)
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 13:14:25 UTC
another q: could you upload a .kra which works? i'd like to diff the two
Comment 18 latex 2023-10-16 13:45:01 UTC
Created attachment 872955 [details]
Some attempted drawings of a folf. Opens fine in Krita 5.1.5

Here's another kra file that does open. It is one of the few that does open, because actually nearly all other kra files I have do not open.
Comment 19 latex 2023-10-16 13:54:18 UTC
Created attachment 872956 [details]
Screenshot - Krita does not support this file format

I tried gdb and it won't break on KisImportExportComplexError::qtErrorMessage it seems. When the dialog showed up, I Ctrl+C'd and took a look at the backtrace.
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 14:01:46 UTC
maybe try KisImportExportComplexError::qtErrorMessage as well, or even maybe b KisImport<TAB> and see what gdb suggests
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-16 14:12:01 UTC
there's really not much different between these at all, surprisingly

documentinfo.xml is the same modulo text, and maindoc.xml seems mostly the same with a lot of the differences being unstable sort order of fields rather than anything substantial?

-<DOC xmlns="http://www.calligra.org/DTD/krita" editor="Krita" syntaxVersion="2.0" kritaVersion="5.1.5">
-  <IMAGE width="512" x-res="100" mime="application/x-kra" colorspacename="RGBA" description="" name="latex_background" height="512" profile="sRGB-elle-V2-srgbtrc.icc" y-res="100">
+<DOC xmlns="http://www.calligra.org/DTD/krita" editor="Krita" kritaVersion="4.4.2" syntaxVersion="2">
+<IMAGE mime="application/x-kra" width="1000" colorspacename="RGBA" y-res="100" profile="sRGB-elle-V2-srgbtrc.icc" name="folfdraw" height="1000" description="" x-res="100">
[...]

the pngs are the same as well:
$ file $(find . | grep -i .png)
./good/mergedimage.png: PNG image data, 1000 x 1000, 8-bit/color RGBA, non-interlaced
./good/preview.png:     PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
./bad/mergedimage.png:  PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced
./bad/preview.png:      PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced
Comment 22 latex 2023-10-18 14:19:13 UTC
(In reply to Sam James from comment #20)
> maybe try KisImportExportComplexError::qtErrorMessage as well, or even maybe
> b KisImport<TAB> and see what gdb suggests

It's hard. It takes GDB about 5 to 10 minutes to come with suggestions. This is barely usable. And no, KisImportExportComplexError::qtErrorMessage never gets triggered.
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-18 14:30:42 UTC
perhaps try:
1) open krita normally
2) trigger the error
3) keep the error open
4) attach gdb with gdb -p <pid here>, then inside: thread apply all backtrace
Comment 24 latex 2023-10-18 14:44:21 UTC
Created attachment 873080 [details]
GDB backtrace on all threads when the error message is shown
Comment 25 latex 2023-12-03 17:25:12 UTC
I still have this stupid bug to this day. It's such a shame I have to put this beautiful piece of software to the side due to such a major bug that I seem to be the only one in the world who can reproduce it.
Comment 26 latex 2023-12-03 17:27:12 UTC
And due to GDB taking 5 to 10 minutes to give suggestions in Krita's codebase, I cannot even debug this comfortably. It's so off-putting I don't want to deal with this, but it just makes me so angry inside.