jnsh / arc-theme

A flat theme with transparent elements (actively maintained fork)
GNU General Public License v3.0
900 stars 77 forks source link

[xdg-desktop-portal-gnome] Resource path /org/gnome/arc-theme/assets/radio-checked.png is not a valid image #168

Closed tkit1994 closed 2 years ago

tkit1994 commented 2 years ago

Before submitting

Details

Please add the following information:

Unless this is a non-visual issue, always add screenshots to help describe your problem.

Ways to reproduce

Use flameshot to screenshot on gnome wayland will crash xdg-portal-gnome under arc-gtk-theme I have tried other themes they work fine. It used to work several days ago, I do not know which update broke it. But I think it has something to do with the missing or broken assets/radio-checked.png.

`gnome-tweak-tools` configuration ![image](https://user-images.githubusercontent.com/12221881/147843185-c305ad00-a5d1-423d-ba76-58b2cdeb58ac.png)
Click to toggle output of `journalctl --user -u xdg-desktop-portal-gnome --no-pager` ``` 1月 01 10:39:58 tkit-pc systemd[757]: Starting Portal service (GNOME implementation)... 1月 01 10:39:58 tkit-pc systemd[757]: Started Portal service (GNOME implementation). 1月 01 10:39:58 tkit-pc xdg-desktop-por[25253]: Unhandled parent window type 1月 01 10:39:58 tkit-pc xdg-desktop-por[25253]: Failed to associate portal window with parent window '' 1月 01 10:39:58 tkit-pc xdg-desktop-por[25253]: Resource path /org/gnome/arc-theme/assets/radio-checked.png s not a valid image: 无法识别的图像文件格式 1月 01 10:39:59 tkit-pc systemd-coredump[25266]: [🡕] Process 25253 (xdg-desktop-por) of user 1000 dumped core. Module linux-vdso.so.1 with build-id ced46242a6b9759d71c9299603af4fb373b21362 Module libgvfscommon.so with build-id 90d1858292300e4e1ee3fbe84ab06079af840ec6 Module libgvfsdbus.so with build-id dcb9d652f2e5c65154517fe6934215ec6bd1c29c Module libdconfsettings.so with build-id 7a4ba7af122c4d11168004a9ea6def330f02089f Module libibus-1.0.so.5 with build-id 8d43fdd351cf9c9678c8f4eba4fc3be59a4e255b Module libim-ibus.so with build-id 0540643434e803c61bebbab03f0d9df725437358 Module libgcc_s.so.1 with build-id 7f8508bb914546ada778809b64b99d234337d835 Module libstdc++.so.6 with build-id 9b5eeeb149bf3c4efe787fb398b44f00507aec87 Module libicudata.so.70 with build-id e1dcc2a88cfaafed882d09c90c668af0eed4efed Module libdatrie.so.1 with build-id 6fe3b6ece2c8e7d11869fa051375128d8f808f58 Module libbrotlicommon.so.1 with build-id a4ba3f4b4571c8272343b621da812a6e24a202a7 Module libXdmcp.so.6 with build-id 8ca0792d23c8b8b4c0864297512349292bea5955 Module libXau.so.6 with build-id 1c67764663e07bec24d8951e5fd93f4d165979ff Module liblzo2.so.2 with build-id ed8e33ba505954ca344aea58d10c7b8a37fd2f39 Module liblzma.so.5 with build-id 8b615460aa230708c5183f16bede67aa0437d95e Module libzstd.so.1 with build-id 6214183688018e3fba6d66db10c2c8d0b45e0578 Module libxml2.so.2 with build-id b710b880b0d4e9c93554fa632129db44c20632cd Module libjson-glib-1.0.so.0 with build-id 5865be5fcc01b48a0a113e0145ec45529bff89a6 Module libsqlite3.so.0 with build-id 6514739218fd9adab53e2e53a63a7364f9e544b3 Module libicui18n.so.70 with build-id 95af755fca990df26753a7d720b8e3ae24270e42 Module libicuuc.so.70 with build-id 2e245c2bf12f95fd8ab79b3a4be99524677cbd70 Module libstemmer.so.0 with build-id aa44a40dfb223020ed8e49cd2d28fc3887128463 Module libgraphite2.so.3 with build-id 47761dc11e553f519cde97ed9ee985be12ccdae2 Module libthai.so.0 with build-id a7ac5010b4275c49308021200d23690533952702 Module libblkid.so.1 with build-id f03a24e92c9852272bd0049b5bcb7ed6cf0e664f Module libbrotlidec.so.1 with build-id 45defc036e918e0140a72f1fbce6e7692d38241d Module libbz2.so.1.0 with build-id 919597c477c9b2cb9cdbb7745ed6494ac0e6da60 Module libdl.so.2 with build-id 5abc547e7b0949f89f3c0e21ab0c8331a7440a8a Module libpixman-1.so.0 with build-id 341f793dcada3a48a306a793d265a517e3f2e7d6 Module libxcb-shm.so.0 with build-id fb797f299a446f559a95afcc168227482cc800d1 Module libxcb-render.so.0 with build-id a37bdb37744b508be9dd29fd9ccb9bb0170d43e5 Module libxcb.so.1 with build-id 0d1ef11740a5daad2ee331e812a51aa6574af222 Module libXrender.so.1 with build-id 97e0b9ab6ba96ebc86527cc2b3c3078aad8616b3 Module libcairo-script-interpreter.so.2 with build-id a3dad249e313cbbadf1212802a04bca6bf4a0b91 Module libXinerama.so.1 with build-id dbb6adece34ea2766d3efcd628af8f9757344dd6 Module libXrandr.so.2 with build-id d4e869b5c72541e1de8f96b456248987ea52d51b Module libXfixes.so.3 with build-id 0a05c7e8714522bfbdd7c0027c3e2a94965664b0 Module libXdamage.so.1 with build-id a1d867e093c16944b2c0083be98050ef35c9e5c2 Module libXcursor.so.1 with build-id eb6315bcd7526aaf51b0a1307efdc587cea0a152 Module libXext.so.6 with build-id d70f24beb4fad748d6becffdcc13e51be0a2ebfa Module libwayland-egl.so.1 with build-id 791e39283cdcc5a08cfd091b8cd4c59869a11278 Module libwayland-client.so.0 with build-id 0a237f2fd096bada4ca381eec5d64474c4078be4 Module libxkbcommon.so.0 with build-id 1f1bc7527e57c886c3df5803068122e1971d4724 Module librt.so.1 with build-id 75484da2d6f1515189eefa076e0a40328834cd16 Module libjpeg.so.8 with build-id 879ca18a2f58c25d77ba881db3a44a5676ef6c7d Module libtiff.so.5 with build-id e8d89a0fb0847641ddb75c5f03fa89d68155a75d Module libpng16.so.16 with build-id 2dc0bce07f199bf983c07a05fb95a6f4af83a9b3 Module libtracker-sparql-3.0.so.0 with build-id b0eee5a9b660fed5221ea15139e9608282320503 Module libcloudproviders.so.0 with build-id ed1d9c9e60be4e858ad148484767249be1edf95f Module libXi.so.6 with build-id 16603be937a02a7e61b0b0395d064be7efd86f49 Module libpangoft2-1.0.so.0 with build-id ef74c3ce7ee52a746fb5f2840d80a84e314edb92 Module libgraphene-1.0.so.0 with build-id 3a967a1f87378940d58d44a233dec7239760884d Module libepoxy.so.0 with build-id b6357fc6b748c512f90339433d74502b9d0621dc Module libcairo-gobject.so.2 with build-id abbf5a8a182ea1b8b7d68540df5c2e25c0bdae0c Module libfribidi.so.0 with build-id 79124bad061c2aab4ec89f25d067363d5b781114 Module libharfbuzz.so.0 with build-id 1d9dee49dd99162c3f83eb3259c3c88c6b4cd7fe Module libpango-1.0.so.0 with build-id 730a8183a36afae82dd6a5564c0e490fed239a40 Module libpangocairo-1.0.so.0 with build-id 10d2af38056eee9a6b3458d8aac24095c4dfab72 Module libffi.so.8 with build-id f90d8b734f6de9b25faedb8cbfab7054dafc0a42 Module libresolv.so.2 with build-id c915c72668282861a813f7ea3c0780f37b681dc0 Module libmount.so.1 with build-id ff9a1d99d35cf640d0bfdaba294854372672c29b Module libz.so.1 with build-id 0c1459c56513efd5d53eb3868290e9afee6a6a26 Module libgmodule-2.0.so.0 with build-id 34cabbd12d9baf397a0255f174e4c96165bc329b Module libpcre.so.1 with build-id 845483dd0acba86de9f0313102bebbaf3ce52767 Module libpthread.so.0 with build-id 07c8f95b4f3251d08550217ad8a1f31066229996 Module libexpat.so.1 with build-id 16023a53e7b5bbdff92bd0bf2eebd36f9b5b879f Module libfreetype.so.6 with build-id 26c5f833068ff72660d1975cbc2074c3eb47fad8 Module ld-linux-x86-64.so.2 with build-id 040cc3dd10461562f177df39e3be2f3704258c3c Module libc.so.6 with build-id 4b406737057708c0e4c642345a703c47a61c73dc Module libX11.so.6 with build-id 5ba5798d193c0065014b8c6252a0678671c8d478 Module libcairo.so.2 with build-id 06820af9cf79c2deb207d9533a61caf04e67a8ad Module libgdk_pixbuf-2.0.so.0 with build-id ca4beb15a30de8d8767f7bca8222038c61b58b36 Module libgtk-4.so.1 with build-id 122d0b5a6078642a117c308068bab1e25b356488 Module libgobject-2.0.so.0 with build-id 3e451709a0a5772b9550d3a4c28dcb37a87028fa Module libgio-2.0.so.0 with build-id fc7ccd9c7c26cbb1e938b1c0879f078c2f47d803 Module libglib-2.0.so.0 with build-id 8214b56e554b7cbead4034b6ba32c90bc8c674da Module libfontconfig.so.1 with build-id 1103a641395c7d3b42e49b793d3a9ea927c77bf6 Module libm.so.6 with build-id 2b8fd1f869ecab4e0b55e92f2f151897f6818acf Module xdg-desktop-portal-gnome with build-id 7ba88deeecbc92d31b67e7b6a37d5d8422278732 Stack trace of thread 25253: #0 0x00007fcc148794f8 g_log_writer_default (libglib-2.0.so.0 + 0x5f4f8) #1 0x00007fcc14875215 g_log_structured_array (libglib-2.0.so.0 + 0x5b215) #2 0x00007fcc14875411 g_log_structured_standard (libglib-2.0.so.0 + 0x5b411) #3 0x00007fcc142285e7 gdk_texture_new_from_resource (libgtk-4.so.1 + 0x3c65e7) #4 0x00007fcc1415fea5 n/a (libgtk-4.so.1 + 0x2fdea5) #5 0x00007fcc1416000a n/a (libgtk-4.so.1 + 0x2fe00a) #6 0x00007fcc1415df18 n/a (libgtk-4.so.1 + 0x2fbf18) #7 0x00007fcc1415c3e6 n/a (libgtk-4.so.1 + 0x2fa3e6) #8 0x00007fcc1416dd5e n/a (libgtk-4.so.1 + 0x30bd5e) #9 0x00007fcc14172b5d n/a (libgtk-4.so.1 + 0x310b5d) #10 0x00007fcc14167e3f n/a (libgtk-4.so.1 + 0x305e3f) #11 0x00007fcc141641ee n/a (libgtk-4.so.1 + 0x3021ee) #12 0x00007fcc1416452c n/a (libgtk-4.so.1 + 0x30252c) #13 0x00007fcc1416457d n/a (libgtk-4.so.1 + 0x30257d) #14 0x00007fcc1416457d n/a (libgtk-4.so.1 + 0x30257d) #15 0x00007fcc1416457d n/a (libgtk-4.so.1 + 0x30257d) #16 0x00007fcc1416457d n/a (libgtk-4.so.1 + 0x30257d) #17 0x00007fcc14167d0b n/a (libgtk-4.so.1 + 0x305d0b) #18 0x00007fcc146301c0 g_signal_emit_valist (libgobject-2.0.so.0 + 0x301c0) #19 0x00007fcc14630330 g_signal_emit (libgobject-2.0.so.0 + 0x30330) #20 0x00007fcc14217a8c n/a (libgtk-4.so.1 + 0x3b5a8c) #21 0x00007fcc1486ead4 n/a (libglib-2.0.so.0 + 0x54ad4) #22 0x00007fcc1486e435 g_main_context_dispatch (libglib-2.0.so.0 + 0x54435) #23 0x00007fcc148c27b9 n/a (libglib-2.0.so.0 + 0xa87b9) #24 0x00007fcc1486dab3 g_main_loop_run (libglib-2.0.so.0 + 0x53ab3) #25 0x0000555dc9adf208 n/a (xdg-desktop-portal-gnome + 0x11208) #26 0x00007fcc13a14b25 __libc_start_main (libc.so.6 + 0x27b25) #27 0x0000555dc9adf33e n/a (xdg-desktop-portal-gnome + 0x1133e) Stack trace of thread 25258: #0 0x00007fcc13ae0b2f __poll (libc.so.6 + 0xf3b2f) #1 0x00007fcc148c2749 n/a (libglib-2.0.so.0 + 0xa8749) #2 0x00007fcc1486bc11 g_main_context_iteration (libglib-2.0.so.0 + 0x51c11) #3 0x00007fcc1486bc62 n/a (libglib-2.0.so.0 + 0x51c62) #4 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #5 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #6 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) Stack trace of thread 25259: #0 0x00007fcc13ae618d syscall (libc.so.6 + 0xf918d) #1 0x00007fcc148bcbdb g_cond_wait_until (libglib-2.0.so.0 + 0xa2bdb) #2 0x00007fcc1483d7d3 n/a (libglib-2.0.so.0 + 0x237d3) #3 0x00007fcc1489fa8b n/a (libglib-2.0.so.0 + 0x85a8b) #4 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #5 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #6 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) Stack trace of thread 25261: #0 0x00007fcc13ae0b2f __poll (libc.so.6 + 0xf3b2f) #1 0x00007fcc148c2749 n/a (libglib-2.0.so.0 + 0xa8749) #2 0x00007fcc1486bc11 g_main_context_iteration (libglib-2.0.so.0 + 0x51c11) #3 0x00007fcc0e928ebe n/a (libdconfsettings.so + 0x5ebe) #4 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #5 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #6 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) Stack trace of thread 25263: #0 0x00007fcc13ae618d syscall (libc.so.6 + 0xf918d) #1 0x00007fcc148bcbdb g_cond_wait_until (libglib-2.0.so.0 + 0xa2bdb) #2 0x00007fcc1483d7d3 n/a (libglib-2.0.so.0 + 0x237d3) #3 0x00007fcc1489fa8b n/a (libglib-2.0.so.0 + 0x85a8b) #4 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #5 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #6 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) Stack trace of thread 25260: #0 0x00007fcc13aeccfd sendmsg (libc.so.6 + 0xffcfd) #1 0x00007fcc146ef1bd g_socket_send_message_with_timeout (libgio-2.0.so.0 + 0x951bd) #2 0x00007fcc146ef484 g_socket_send_message (libgio-2.0.so.0 + 0x95484) #3 0x00007fcc14765faa n/a (libgio-2.0.so.0 + 0x10bfaa) #4 0x00007fcc14766626 n/a (libgio-2.0.so.0 + 0x10c626) #5 0x00007fcc14766b43 n/a (libgio-2.0.so.0 + 0x10cb43) #6 0x00007fcc146fab84 n/a (libgio-2.0.so.0 + 0xa0b84) #7 0x00007fcc146fabb9 n/a (libgio-2.0.so.0 + 0xa0bb9) #8 0x00007fcc1486e435 g_main_context_dispatch (libglib-2.0.so.0 + 0x54435) #9 0x00007fcc148c27b9 n/a (libglib-2.0.so.0 + 0xa87b9) #10 0x00007fcc1486dab3 g_main_loop_run (libglib-2.0.so.0 + 0x53ab3) #11 0x00007fcc1475d598 n/a (libgio-2.0.so.0 + 0x103598) #12 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #13 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #14 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) Stack trace of thread 25262: #0 0x00007fcc13ae618d syscall (libc.so.6 + 0xf918d) #1 0x00007fcc148bcbdb g_cond_wait_until (libglib-2.0.so.0 + 0xa2bdb) #2 0x00007fcc1483d7d3 n/a (libglib-2.0.so.0 + 0x237d3) #3 0x00007fcc1489fa8b n/a (libglib-2.0.so.0 + 0x85a8b) #4 0x00007fcc1489cd51 n/a (libglib-2.0.so.0 + 0x82d51) #5 0x00007fcc138d8259 start_thread (libpthread.so.0 + 0x9259) #6 0x00007fcc13aeb5e3 __clone (libc.so.6 + 0xfe5e3) ELF object binary architecture: AMD x86-64 1月 01 10:39:59 tkit-pc systemd[757]: xdg-desktop-portal-gnome.service: Main process exited, code=dumped, status=5/TRAP 1月 01 10:39:59 tkit-pc systemd[757]: xdg-desktop-portal-gnome.service: Failed with result 'core-dump'. ```
tkit1994 commented 2 years ago

I extracted both /usr/share/themes/Adapta/gtk-3.24/gtk.gresource and /usr/share/themes/Arc/gtk-3.0/gtk.gresource with

gresource extract gtk.gresource `gresource list gtk.gresource | grep radio-unchecked.png` > radio-unchecked.png

file from Adapta:

❯ file radio-checked.png
radio-checked.png: PNG image data, 20 x 20, 8-bit/color RGBA, non-interlaced

file from Arc:

❯ file radio-checked.png
radio-checked.png: data

The radio-checked.png from gtk-2 folder is a valid png file

❯ file /usr/share/themes/Arc/gtk-2.0/assets/radio-checked.png
/usr/share/themes/Arc/gtk-2.0/assets/radio-checked.png: PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced
tkit1994 commented 2 years ago

Maybe it has something to do with the <file preprocess="to-pixdata"> and I should report to flameshot or xdg-desktop-portal-gnome because they have truble reading it?

jnsh commented 2 years ago

Hello

I'm not sure why you closed this, is the problem now fixed?

Either way, I'm unable to reproduce this on same distribution and environment. If you still need support, can you elaborate when does the crash happen (I tried taking screenshot with flameshot, and it seemed to work). Also could you launch Flameshot with LC_ALL=C flameshot to get the full error message in English.

Since Flameshot is a QT5 application, it is not using any Arc GTK themes directly out of the box. One option is using one of the QT platform plugins (see e.g. https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications#Theme_engines), and the problem may result from the specific plugin you're using. I'm not experiencing any issues with QT_QPA_PLATFORMTHEME=gtk3.

radioactiveman commented 2 years ago

After updating GTK4 on Arch Linux I get the same error when starting gnome-chess. A simple "Hello World" GTK4 application is not affected. Probably because it does not use this image.

gtk4: 4.6.0 gnome-chess: 41.1 arc-gtk-theme: 20211018

Related GTK commit: https://gitlab.gnome.org/GNOME/gtk/-/commit/f2ca9ebbd7d5ff0b92d47c1f56b2d4a25d52bb16

I hope this helps. The problem is not fixed, please reopen this issue. Thanks and a happy new year.

$ gnome-chess

(gnome-chess:2851): Gdk-ERROR **: 15:15:09.168: Resource path /org/gnome/arc-theme/assets/titlebutton-minimize-dark.png s not a valid image: Unrecognized image file format
Trace/breakpoint trap (core dumped)
jnsh commented 2 years ago

@radioactiveman Thanks, I can reproduce that as well.

Looks like this happens after recent GTK 4.6 update, and the issue disappears after downgrading to 4.4.1. I'll look up what is going on.

jnsh commented 2 years ago

At least the crash with gnome-chess seems to be fixed with https://github.com/jnsh/arc-theme/commit/54b20abadaa1b810f50249707bb03919a235c446. Sorry, the GTK 4 theme is still a bit unfinished, and I had not updated the gresource xmls.

@tkit1994 Can you try rebuilding arc-gtk-theme-git again to check whether that fixed your issue as well?

euclio commented 2 years ago

I was running into this same issue and can confirm that the git version fixes the issue.

tkit1994 commented 2 years ago

The git version fixes the issue. Thanks and happy new year. @jnsh