Asbru-cm: App crashes (Can't find information for method TreeModel::sort_new_with_model)

Created on 18 Feb 2020  路  17Comments  路  Source: asbru-cm/asbru-cm

Describe the bug
asbru 6.0.4.r86.gf896176-1
I had been using the loki branch for several days, even with the new look / themes. Everything was fine until I got this error after rebooting.

Can't find information for method TreeModel::sort_new_with_model at /opt/asbru-cm-loki/lib/PACMain.pm line 566.
then it closes immediately

  • Archlinux
  • Kde/Plasma
dependency

Most helpful comment

Ok! Got it :-)

image

So there's an override of sort_new_with_model in the Gtk3 perl glue code that has been added to override a bug in Gtk3. Now that the bug has been fix, that glue code is not needed anymore or even worse : it makes things crashing !

--> we need to report that to the upstream project (https://metacpan.org/pod/Gtk3)

All 17 comments

Same here after system update. Temporary solution: downgrade gtk-related packages (in my case gtk3, gtk-update-icon-cache) from 3.24.14 to 3.24.13.

  • Archlinux
  • Plasma 5.18.0-3

Same here:

Archlinux
Kde/Plasma

Same again, using Arch and Cinnamon. Downgrading gtk3 and gtk-update-icon-cache as suggested about did fix the issue for me also.

https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/NEWS

Overview of Changes in GTK+ 3.24.14

Fix the opaque region for windows on X11

theme:

  • Fix flat buttons in backdrop
  • Make popovers look more similar to menus
  • Tweak checkbox & radiobutton appearance
  • Add general typography classes (heading, title-1, etc)
    language bindings:

    • Fix annotations for gtk_tree_model_sort_new_with_model

switch: Fix touch support

infobar: Make clickable for default action

emojichooser:

  • respect a no-emoji input hint

fontchooser:

  • Fix an oversight with hiding the size label

filechooser:

  • Disable recursive search without a system indexer

modelbutton:

  • Fix a11y support to reflect button state

input:

  • Fix touchpad gesture center calculation

x11:

  • Fix root window scaling
  • Support _GTK_WORKAREAS_Dn property

wayland:

  • Support a terminal purpose in input methods
  • Fix preedit cursor positioning
  • Fix enabling/disabling of text inputs
  • Support simultaneous selection requests
  • Require Wayland 1.14.91

OS X:

  • Fix fullscreen state
  • Fix an Inkscape crash at startup
  • Fix OpenGL extension detection

Printing:

  • Fix a crash with Avahi

There's definitely something that has been changed in Gtk3 that broke the 脕sbr煤 code :(

Fix annotations for gtk_tree_model_sort_new_with_model

I believe this corresponds to this change ... This is a comment only ; that should not hurt.

I've been able to reproduce it. I commented out the lines that gave an error and ended up a bit later with the error:

Can't locate object method "get_model" via package "Gtk3::TreeStore" at /opt/asbru-cm-loki/lib/ex/PACTree.pm line 83

This is really confusing. I've the feeling the perl introspection is broken...

Fix annotations for gtk_tree_model_sort_new_with_model
I believe this corresponds to this change ... This is a comment only ; that should not hurt.

Well, no, there is a bit more than just comments : https://gitlab.gnome.org/GNOME/gtk/issues/1077

It's indeed related to introspection but at this stage, I don't understand what needs to be changed...

Ok! Got it :-)

image

So there's an override of sort_new_with_model in the Gtk3 perl glue code that has been added to override a bug in Gtk3. Now that the bug has been fix, that glue code is not needed anymore or even worse : it makes things crashing !

--> we need to report that to the upstream project (https://metacpan.org/pod/Gtk3)

Deleting Gtk3::TreeModelSort::new_with_model entirely allows asbru to launch successfully.

Yes, I commented on those lines in the code.
perl-gtk3 0.035-1
/usr/share/perl5/vendor_perl/Gtk3.pm
and already started correctly

we need to report that to the upstream project (https://metacpan.org/pod/Gtk3)

Done -> https://rt.cpan.org/Ticket/Display.html?id=131871

Thanks for this issue investigation guys.

So workaround seems to comment all these lines?

sudo sed -e '1742,1753s/^/#/' -i /usr/share/perl5/vendor_perl/Gtk3.pm
1742 #=cut
1743 #
1744 # Not needed anymore once <https://bugzilla.gnome.org/show_bug.cgi?id=646742>
1745 # is fixed.
1746 #sub Gtk3::TreeModelSort::new_with_model {
1747 #  my ($class, $child_model) = @_;
1748 #  Glib::Object::Introspection->invoke (
1749 #    $_GTK_BASENAME, 'TreeModel', 'sort_new_with_model', $child_model);
1750 #}
1751 #
1752 #=item * Gtk3::TreeModelSort has a C<get> method that calls
1753 #C<Gtk3::TreeModel::get> instead of C<Glib::Object::get>.

If yes, can another packages be affected by this change?

So workaround seems to comment all these lines?

This is one workaround, yes.

If yes, can another packages be affected by this change?

If you are sure that the target machine has Gtk 3.24.14 (or higher), I believe it will actually fix issues for all other packages (using Gtk3 + perl) as well... Said differently : the changein Gtk 3.24.14 will likely break any package using Gtk3::TreeModelSort::new_with_model. Not sure there are so many, though :-/

Would the patch proposed to the Gtk3-perl team be an option as well ? There I tried to check the version of Gtk and call the appropriate "introspected" function.
(see https://rt.cpan.org/Public/Bug/Display.html?id=131871)

But I'm feeling like the sorcerer's apprentice here, some feedback from the Gtk3-perl team will be much appreciated :)

Unfortunately, no reaction on my message to the Gtk3-perl project ; can anyone try to reach them out en increase the importance of the issue ?

On the other side, I'll think about a way to workaround the issue inside the 脕sbr煤 code base.

Fyi, a fix has been pushed upstream (see https://gitlab.gnome.org/GNOME/perl-gtk3/-/commit/b857d1c1bf1ce29813639d35b5459755ec08462c).

Can someone test it ?

Upstream patch is working. Thanks for the report and all your work.

On Debian SID the file is located on:
/usr/share/perl5/Gtk3.pm

I also confirm that deleting lines works.

Thank to all as always.
Mirko

Fixed upstream.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikuzz picture nikuzz  路  6Comments

popxunga picture popxunga  路  7Comments

popxunga picture popxunga  路  12Comments

mooky31 picture mooky31  路  3Comments

Silex picture Silex  路  8Comments