Summary: | gnome-base/gnome-control-center-3.32.2: Error building template class 'CcApplicationsPanel' for an instance of type 'CcApplicationsPanel': Invalid object type 'CcToggleRow' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chris Mayo <aklhfex> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahvenas, da5id2001, emeric.maschino, ngentoo, spikyatlinux |
Priority: | Normal | Keywords: | EBUILD |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=903129 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch removing Applications panel
gnome-control-center CLI Gnome-control-center strace emerge-info gdb output strace output Patch to try fixed missing some custom widget type issue |
got that one, clicking on the "applications" panel as well. I tried launching g-c-c with another panel on the cli, same crash I've looked a bit at the git repo and there's a ton of commits related to segfaults in half the panels. It's hard to figure out which one will fix this one particular crash when it looks like the whole application is very fragile. It's somewhat worrisome. Anyhow, found another workaround that doesn't involve any patching or rebuilding: dconf reset /org/gnome/control-center/last-panel That will make g-c-c forget the last panel you clicked on and will let you access the other, not broken, panels. Hopefully 3.34.4 is better on this? (In reply to Mart Raudsepp from comment #3) > Hopefully 3.34.4 is better on this? Not here - gnome-base/gnome-control-center-3.34.4 and the application panel still crashes, still need to reset the last panel to start g-c-c again... Same issue here on ia64. BTW, what g-c-c' Applications panel is supposed to do/show? I don't remember the previous releases. Or is it an new panel introduced with >=gnome-base/gnome-control-center-3.32.2? You can do per-application settings in there, like if it's allowed to send desktop notifications, micro-manage mime type associations (e.g. unset an application from handling a certain file type), toggle gnome-shell search integration enablement, etc. I still can't reproduce the issue, unfortunately. Created attachment 639836 [details]
gnome-control-center CLI
So I'm getting this now too (hadn't noticed it before at least).
Attached on this one is the output on the console, first of a failed launch, then a reset, then a successful launch.
I'll also attach an strace, and emerge --info. I'm wondering if it's down to a specific app that's installed, that for reason is causing it when it tries to display. Hence it happening for some, but not others.
Created attachment 639838 [details]
Gnome-control-center strace
Created attachment 639840 [details]
emerge-info
I also had just rebuilt it in case, but no help.
[ebuild R ] gnome-base/gnome-control-center-3.34.5:2::gentoo
USE="cups gnome-online-accounts ibus systemd -bluetooth -debug (-elogind) -flickr -kerberos -networkmanager -test -v4l -wayland"
INPUT_DEVICES="-wacom" 0 KiB
From a short look together with Soap__ on IRC, it seems to be a problem of the necessary code somehow being optimized out of the final binary or something. As in, those experiencing the problem don't have this command return anything, for example: nm -D /usr/bin/gnome-control-center |grep cc_toggle_row_ne For me that gives 000000000005fff0 T cc_toggle_row_new so the GtkBuilder UI file can find the CcToggleRow stuff fine from the type machinery and instantiate this for the applications panel. I don't see anything in the single emerge --info I see here that could cause this different compilation from me. Please check with that nm command, that you are ending up in the same specific issue that it did for Soap__ (In reply to Mart Raudsepp from comment #10) > nm -D /usr/bin/gnome-control-center |grep cc_toggle_row_ne > > For me that gives > 000000000005fff0 T cc_toggle_row_new > so the GtkBuilder UI file can find the CcToggleRow stuff fine from the type > machinery and instantiate this for the applications panel. > It returns nothing for me. brandon@Rostia ~ $ nm -D /usr/bin/gnome-control-center |grep cc_toggle_row_ne brandon@Rostia ~ $ FWIW, under the Config stage of the ebuild, I noticed this: Optimized .................................. false Also, I rebuilt with this: LDFLAGS="" CFLAGS="-march=znver2" CXXFLAGS="-march=znver2" USE="debug" emerge gnome-control-center and nm still returns blank. Some stabs in the dark here, since I'm not fully familiar with it, but it does seem to build cc-toggle-row.c.o, which has that output: Rostia /var/tmp/portage/portage/gnome-base/gnome-control-center-3.34.5/work/gnome-control-center-3.34.5-build/panels/applications/cd6fcfa@@applications@sta # nm cc-toggle-row.c.o | grep cc_toggle_row_new 0000000000000230 T cc_toggle_row_new Is that maybe not being included in the final binary for some reason? I'd suspect more in the direction of "optimized out" What if you put this into cc_applications_panel_class_init function in panels/applications/cc-applications-panel.c CC_TYPE_TOGGLE_ROW(); (In reply to Mart Raudsepp from comment #14) > What if you put this into cc_applications_panel_class_init function in > panels/applications/cc-applications-panel.c > > CC_TYPE_TOGGLE_ROW(); It fails the compile: FAILED: panels/applications/cd6fcfa@@applications@sta/cc-applications-panel.c.o x86_64-pc-linux-gnu-gcc -Ipanels/applications/cd6fcfa@@applications@sta -Ipanels/applications -I../gnome-control-center-3.34.5/panels/applications -I. -I../gnome-control-center-3.34.5 -Ipanels/common -I../gnome-control-center-3.34.5/panels/common -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gsettings-desktop-schemas -I/usr/include/libhandy-0.0 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/uuid -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -O2 -march=znver2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mfma -mbmi -mbmi2 -mwbnoinvd -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mclflushopt -mxsavec -mxsaves -mclwb -mmwaitx -mclzero -mrdpid --param l1-cache-size=768 --param l1-cache-line-size=768 --param l2-cache-size=6144 -mtune=znver2 -fforce-addr -fomit-frame-pointer -fPIC -pthread '-DG_LOG_DOMAIN="applications-cc-panel"' '-DPANEL_ID="applications"' '-DGNOMELOCALEDIR="/usr/share/locale"' -MD -MQ 'panels/applications/cd6fcfa@@applications@sta/cc-applications-panel.c.o' -MF 'panels/applications/cd6fcfa@@applications@sta/cc-applications-panel.c.o.d' -o 'panels/applications/cd6fcfa@@applications@sta/cc-applications-panel.c.o' -c ../gnome-control-center-3.34.5/panels/applications/cc-applications-panel.c ../gnome-control-center-3.34.5/panels/applications/cc-applications-panel.c:21: warning: "G_LOG_DOMAIN" redefined 21 | #define G_LOG_DOMAIN "cc-applications-panel" | <command-line>: note: this is the location of the previous definition In file included from ../gnome-control-center-3.34.5/panels/applications/cc-applications-panel.c:30: ../gnome-control-center-3.34.5/panels/applications/cc-applications-panel.c: In function ‘cc_applications_panel_class_init’: ../gnome-control-center-3.34.5/panels/applications/cc-toggle-row.h:27:29: error: called object is not a function or function pointer 27 | #define CC_TYPE_TOGGLE_ROW (cc_toggle_row_get_type()) | ~^~~~~~~~~~~~~~~~~~~~~~~~~ ../gnome-control-center-3.34.5/panels/applications/cc-applications-panel.c:1650:3: note: in expansion of macro ‘CC_TYPE_TOGGLE_ROW’ 1650 | CC_TYPE_TOGGLE_ROW(); | ^~~~~~~~~~~~~~~~~~ ninja: build stopped: subcommand failed. FWIW, 3.34.5-r1 is still failing to the same error. (gnome-control-center:133383): Gtk-CRITICAL **: 08:55:53.956: gtk_size_group_add_widget: assertion 'GTK_IS_WIDGET (widget)' failed ** ERROR:../gnome-control-center-3.34.5/shell/cc-panel.c:232:cc_panel_get_sidebar_widget: assertion failed: (sidebar_widget != NULL) Bail out! ERROR:../gnome-control-center-3.34.5/shell/cc-panel.c:232:cc_panel_get_sidebar_widget: assertion failed: (sidebar_widget != NULL) Aborted (core dumped) Situation is still the same with freshly rebuilt 3.36.4, same error messages and same workaround with dconf to get the app open again. No cc_* rows in the nm -D output as well. I use these CFLAGS with things working fine: CFLAGS="-O2 -pipe -march=native -fno-omit-frame-pointer -ggdb2 -frecord-gcc-switches" (FEATURES=splitdebug also of course, due to the -ggdb2) I wonder if someone that is able to reproduce the issue can get it working with tweaking their CFLAGS, perhaps adding -ggdb2 for this or something, to narrow it down a bit in what situations it might get badly optimized out and when not. From the reinstalled gnome-control-center-3.36 package: FEATURES="pid-sandbox sandbox usersync news config-protect-if-modified merge-sync assume-digests binpkg-logs distlocks ccache strict fixlafiles unknown-features-warn ebuild-locks binpkg-docompress sign unmerge-orphans multilib-strict network-sandbox preserve-libs protect-owned sfperms usersandbox userpriv parallel-fetch binpkg-dostrip splitdebug unmerge-logs qa-unresolved-soname-deps userfetch xattr ipc-sandbox" CFLAGS="-O2 -pipe -march=native -fno-omit-frame-pointer -ggdb2 -frecord-gcc-switches" Situation has not changed. One thing that is also corrupt is the icon for non-functional Applications: https://imgur.com/a/FRLUP6c The real icon can be seen here: https://commons.wikimedia.org/wiki/File:GNOME_Control_Center.png Am I the only one? The icon is probably assumed to come from adwaita-icon-theme-3.34 or 3.36, which we don't have, because most of the scalable icons would look broken with librsvg-2.40, so these have been delayed. Only having one icon known broken so far from this isn't too much of a problem, considering this is ~arch. Though librsvg-2.46+ work is planned soon for main tree as one next bigger thing (it is written in rust language), but irrelevant to this bug entry here. Created attachment 650142 [details]
gdb output
Created attachment 650146 [details]
strace output
I rebuilt with the following command:
SE="${USE} debug" CFLAGS="-O2 -pipe -march=native -fno-omit-frame-pointer -ggdb2 -frecord-gcc-switches" FEATURES="splitdebug" emerge gnome-control-center
gcc 10.1.0. FWIW, 3900x on X570, 32G RAM, nvme storage.
It still happens. Attached are the output of gdb (opening and clicking applications), and strace (running just after gdb).
I think I created that issue by firstly using Gnome Tweaks and using Reset to Defaults option globally. The issue still persists since 3.32 through 3.36. To confirm the symbol problem, someone could try adding LDFLAGS="${LDFLAGS} -Wl,--no-as-needed" temporarily for gnome-control-center build and see if it starts working when it didn't before. The LDFLAGS change didn't change anything for me, still the same error. ok, thanks, no point for others to test that part then. Figured it might workaround the issue, but it not helping doesn't mean it's not a symbol issue - it clearly is based on the nm outputs. In any case, it would be nice if someone could work with upstream on this. It seems the symbols get optimized out in some situations on some setups, but then they need to be used via GtkBuilder UI files (which is something a compiler doesn't see), so hence the failures. hello. I faced same issue and googled it and found this. https://stackoverflow.com/questions/24235937/custom-gtk-widget-with-template-ui I made some patch and it works cat /etc/portage/patches/gnome-base/gnome-control-center/gnome-control-center-application.patch diff -urN gnome-control-center-3.34.5.orig/shell/meson.build gnome-control-center-3.34.5/shell/meson.build --- gnome-control-center-3.34.5.orig/shell/meson.build 2020-07-28 17:06:45.588081492 +0900 +++ gnome-control-center-3.34.5/shell/meson.build 2020-07-28 18:03:05.185763440 +0900 @@ -130,7 +130,8 @@ dependencies : shell_deps, c_args : cflags, link_with : panels_libs, - install : true + install : true, + link_args : '-rdynamic' ) (In reply to Jeongsu Kim from comment #27) > hello. > > I faced same issue and googled it and found this. > https://stackoverflow.com/questions/24235937/custom-gtk-widget-with-template- > ui > > I made some patch and it works > > cat > /etc/portage/patches/gnome-base/gnome-control-center/gnome-control-center- > application.patch > diff -urN gnome-control-center-3.34.5.orig/shell/meson.build > gnome-control-center-3.34.5/shell/meson.build > --- gnome-control-center-3.34.5.orig/shell/meson.build 2020-07-28 > 17:06:45.588081492 +0900 > +++ gnome-control-center-3.34.5/shell/meson.build 2020-07-28 > 18:03:05.185763440 +0900 > @@ -130,7 +130,8 @@ > dependencies : shell_deps, > c_args : cflags, > link_with : panels_libs, > - install : true > + install : true, > + link_args : '-rdynamic' > ) Also fixes the issue with 3.36.4. We should write and upstream a solution as per 1) there - making a cc_toggle_row_get_type call in an appropriate place. However I remember having Soap__ try this over irc, and didn't help. But perhaps it was not an appropriate place. Created attachment 651132 [details, diff]
Patch to try
Please try this patch INSTEAD of any -rdynamic or other tweaks and let me know if this solves it as well. This one should be upstreamable then, and I'll take it there if it fixes it for you guys
(In reply to Mart Raudsepp from comment #30) > Created attachment 651132 [details, diff] [details, diff] > Patch to try > > Please try this patch INSTEAD of any -rdynamic or other tweaks and let me > know if this solves it as well. This one should be upstreamable then, and > I'll take it there if it fixes it for you guys Crashes at the usual place - there is no difference in normal error output with or without that patch. OK, thanks, this is more involved then. Created attachment 651342 [details, diff]
fixed missing some custom widget type issue
I made another patch and it works fine.
Please check this patch.
(In reply to Jeongsu Kim from comment #33) > Created attachment 651342 [details, diff] [details, diff] > fixed missing some custom widget type issue > > I made another patch and it works fine. > Please check this patch. Fixes the issue on 3.36.4. (In reply to Jeongsu Kim from comment #33) > Created attachment 651342 [details, diff] [details, diff] > fixed missing some custom widget type issue > > I made another patch and it works fine. > Please check this patch. Can you please go upstream with this patch too? https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests (In reply to Mart Raudsepp from comment #35) > (In reply to Jeongsu Kim from comment #33) > > Created attachment 651342 [details, diff] [details, diff] [details, diff] > > fixed missing some custom widget type issue > > > > I made another patch and it works fine. > > Please check this patch. > > Can you please go upstream with this patch too? > > https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests I wrote merge request. https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/802 (In reply to Jeongsu Kim from comment #36) > I wrote merge request. > https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/802 Seems that this was cherrypicked for 3.36 and with current g-c-c 3.36.4 the applications tab actually works for me. Looks like it's in 3.36.5 to me: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commits/gnome-3-36/#commit-1cd98472 The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=820ecba8c45da3239dc5478617c2734d8f143b1f commit 820ecba8c45da3239dc5478617c2734d8f143b1f Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2021-01-09 17:39:21 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2021-01-09 17:48:20 +0000 gnome-base/gnome-control-center: Version bump to 3.36.5 Closes: https://bugs.gentoo.org/695326 Signed-off-by: Matt Turner <mattst88@gentoo.org> gnome-base/gnome-control-center/Manifest | 2 + .../gnome-control-center-3.36.5.ebuild | 180 +++++++++++++++++++++ 2 files changed, 182 insertions(+) |
Created attachment 590538 [details, diff] Patch removing Applications panel I managed to run gnome-control-center once. The second and subsequent times I tried to start it it crashed with messages including: (gnome-control-center:456): Gtk-CRITICAL **: Error building template class 'CcApplicationsPanel' for an instance of type 'CcApplicationsPanel': .:2:3512 Invalid object type 'CcToggleRow' ERROR:../gnome-control-center-3.32.2/shell/cc-panel.c:243:cc_panel_get_sidebar_widget: assertion failed: (sidebar_widget != NULL) Aborted I believe the last panel I had clicked on was the Applications panel. I've worked around this by re-building without the Applications panel (patch attached).