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
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.
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:
switch: Fix touch support
infobar: Make clickable for default action
emojichooser:
fontchooser:
filechooser:
modelbutton:
input:
x11:
wayland:
OS X:
Printing:
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 :-)

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)
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.
Most helpful comment
Ok! Got it :-)
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)