squentin / gmusicbrowser

jukebox for large collections of music
http://gmusicbrowser.org
GNU General Public License v3.0
194 stars 42 forks source link

Segfaults on startup - layout/interface related? #251

Open robber49 opened 1 year ago

robber49 commented 1 year ago

Using current git version on Arch.

gmusicbrowser is segfaulting on startup with some themes (shimmer, my custom themes, maybe others - haven't tested every one).

For the themes that do work past startup I'm also experiencing segfault crashes when running, they seemed tied to clicking on certain elements of the interface.

iGormilhit commented 1 year ago

I'm having the same issue. Also running archlinux, installed gmusicbrowser 1.1.99 through the gmusicbrowser AUR package.

GMB is crashing on startup with the Shimmer Desktop theme. When started with songtree, it crashes when I'm interacting with the interface (right click, for instance).

I tried to rebuild the installation, to remove the .cache/gmusicbrowser folder, to empty the .config/gmusicbrowser directory to start anew, without any changes in the behavior.

Here's what I get when starting gmb from the console:

Found orphaned fifo '/home/igor/.config/gmusicbrowser/gmusicbrowser.fifo' : previous session wasn't closed properly
Reading saved tags in /home/igor/.config/gmusicbrowser/gmbrc ...
*** WebKit2::WebContext::get_default: passed too many parameters (expected 0, got 1); ignoring excess at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 24.
Reading saved tags in /home/igor/.config/gmusicbrowser/gmbrc ... done
[1]    6628 segmentation fault (core dumped)  gmusicbrowser
MountainX commented 1 year ago
at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 24

based on that, try disabled the web context plugin (uncheck it under the plugins menu, then restart)

please report back

iGormilhit commented 1 year ago

I've disabled the plugin, restarted gmb without it, tried to change the theme to Shimmer Desktop:

gmusicbrowser
Found orphaned fifo '/home/igor/.config/gmusicbrowser/gmusicbrowser.fifo' : previous session wasn't closed properly
Reading saved tags in /home/igor/.config/gmusicbrowser/gmbrc ...
Reading saved tags in /home/igor/.config/gmusicbrowser/gmbrc ... done

(gmusicbrowser:8869): Gtk-CRITICAL **: 18:28:23.774: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
*** unhandled exception in callback:
***   Can't call method "set_markup" on an undefined value at /usr/bin/../share/gmusicbrowser/gmusicbrowser_layout.pm line 3191.
***  ignoring at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67.
*** unhandled exception in callback:
***   Can't call method "set_markup" on an undefined value at /usr/bin/../share/gmusicbrowser/gmusicbrowser_layout.pm line 3191.
***  ignoring at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67.

(gmusicbrowser:8869): Gtk-CRITICAL **: 18:28:48.355: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
[1]    8869 segmentation fault (core dumped)  gmusicbrowser

The line that worried me the most is (gmusicbrowser:8869): Gtk-CRITICAL **: 18:28:48.355: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar.

MountainX commented 1 year ago

That specific error is just an assertion caused by line 3192. It may or may not be a big deal, but it is definitely not the root cause. It's just alerting the developer to the fact that something unexpected happened prior to that line.

3191 { my $label=$_[0]->get_child; $label->set_markup($_[1]); $label->{dx}=0;
3192   $_[0]->checksize;

I looked through the code, but I don't know Perl and I'm not a developer so unfortunately, I'm not able to understand the issue. I hope @squentin will look into this.

iGormilhit commented 1 year ago

I hope so. :slightly_smiling_face:

But thanks for trying!

robber49 commented 1 year ago

I believe the 0.050 update to perl-glib-object-introspection is what started causing this. I downgraded to 0.049-3 and so far I'm not seeing any segfaults.

squentin commented 1 year ago

I've just made a quick test, and it seems it is indeed coming from perl-glib-object-introspection 0.050, I got a crash almost immediately with it. And it seems to be fixed in their git version as I couldn't get a crash with it.

Seems to be this issue: https://gitlab.gnome.org/GNOME/perl-glib-object-introspection/-/issues/4

I doubt there is anything I can do, just use either 0.049 or git version of perl-glib-object-introspection. I guess I will close the bug once they release a new version of perl-glib-object-introspection, so that people having the issue find this explanation.

iGormilhit commented 1 year ago

Thanks everyone for this workaround! I'm glad to be able to reach the precious gmb! :smile:

iGormilhit commented 11 months ago

Perl packages had been updated on my machine. I checked the perl-glib-object-introspection, and it has been upgraded too, despite the pacman configuration. So I downgraded it again, and got a warning:

(2/2) Warn about old perl modules
WARNING: '/usr/lib/perl5/5.36' contains data from at least 1 packages which will NOT be used by the installed perl interpreter.
 -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/5.36'

And of course:

❯ pacman -Qqo '/usr/lib/perl5/5.36'
perl-glib-object-introspection

So when I run gmusicbrowser, I get the following.

Can't locate Glib/Object/Introspection.pm in @INC (you may need to install the Glib::Object::Introspection module) (@INC entries checked: /usr/lib/perl5/5.38/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.38/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.38/core_perl /usr/share/perl5/core_perl) at /usr/share/perl5/vendor_perl/Gtk3.pm line 48.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Gtk3.pm line 48.
Compilation failed in require at /usr/bin/gmusicbrowser line 26.
BEGIN failed--compilation aborted at /usr/bin/gmusicbrowser line 26.

Does that mean that perl itself was updated and that the new version cannot find perl-glib-object-instrospection? I think I don't need to state that I don't understand very well what is happening... :smile:

squentin commented 11 months ago

Good news :) Looking at the perl-glib-object-introspection on archlinux, it seems the issue has been fixed in perl-glib-object-introspection 0.050-3 (released on July 25th) (edit: or maybe even 0.050-2), so you can probably just upgrade everything: https://gitlab.archlinux.org/archlinux/packaging/packages/perl-glib-object-introspection/-/commits/main

iGormilhit commented 11 months ago

Ok, indeed, after a complete upgrade, gmusicbrowser starts without any issue. Thanks!

noeltuote commented 11 months ago

Hello everyone, so I did the perl updates, also tried to keep a previous version of perl-glib-object-introspection, but gmb is not responding. This is what I get when I run gmb in the console:

Found orphaned fifo '/home/bureau/.config/gmusicbrowser/gmusicbrowser.fifo' : previous session wasn't closed properly Reading saved tags in /home/bureau/.config/gmusicbrowser/gmbrc ... Loading a gmbrc saved with a more recent version of gmusicbrowser, try upgrading gmusicbrowser if there are problems plugin /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm failed : Typelib file for namespace 'WebKit2', version '4.0' not found at /usr/lib/perl5/5.38/vendor_perl/Glib/Object/Introspection.pm line 108.

Reading saved tags in /home/bureau/.config/gmusicbrowser/gmbrc ... done Subroutine new_embed redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 30. Subroutine button_press_event_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 47. Subroutine mouse_target_changed_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 60. Subroutine net_startstop_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 68. Subroutine set_title redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 83. Subroutine loaded redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 86. Subroutine go_back redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 92. Subroutine go_forward redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 93. Subroutine stop_load redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 94. Subroutine get_location redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 95. Subroutine Open redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 97. Subroutine Start redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 172. Subroutine Stop redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 176. Subroutine UpdateCustom redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 181. Subroutine RemoveCustom redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 204. Subroutine new redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 212. Subroutine button_press_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 260. Subroutine addtoolbar redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 270. Subroutine prefbox redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 274. Subroutine load_url redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 284. Subroutine link_message redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 294. Subroutine popup_toolbar_menu redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 302. Subroutine Update redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 310. Subroutine SongChanged redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 318. Subroutine DynamicTitle redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 321. Subroutine set_title redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 332. Subroutine addtoolbar redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 357. Subroutine SongChanged redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 368. Subroutine addtoolbar redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 403. Subroutine SongChanged redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 413. Subroutine wikiload redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 428. Subroutine wikifilter redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 443. Subroutine SongChanged redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 453. Subroutine new redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 471. Subroutine fill_list redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 523. Subroutine fill_editbox redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 530. Subroutine entry_changed_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 565. Subroutine update_selection redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 571. Subroutine selchanged_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 600. Subroutine rename_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 611. Subroutine remove_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 620. Subroutine save_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 628. Subroutine preset_menu_cb redefined at /usr/bin/../share/gmusicbrowser/plugins/webcontext.pm line 641.

(gmusicbrowser:1501): Gtk-CRITICAL **: 14:36:32.938: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(gmusicbrowser:1501): Gtk-CRITICAL **: 14:36:32.939: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(gmusicbrowser:1501): Gtk-CRITICAL **: 14:36:32.943: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

ZinRicky commented 11 months ago

I have problems on startup as well. I’m using the AUR gmusicbrowser package. I noticed that, if I start the program from a terminal and Ctrl + C it, it spits this error and then starts working properly for a while:

^C*** unhandled exception in callback:
***   INT at /usr/bin/gmusicbrowser line 4228.
***     eval {...} called at /usr/bin/gmusicbrowser line 4228
***     main::Breakdown_List(ARRAY(0x5621e87c6720), "keys", ARRAY(0x5621e766c880), "displaynames", ARRAY(0x5621e87c6720), "widget", Gtk2::MenuItem=HASH(0x5621e85639f0), "makemenu", ...) called at /usr/bin/gmusicbrowser line 4140
***     main::PopupAA("album", "nosort", 1, "nominor", 1, "widget", Gtk2::MenuItem=HASH(0x5621e85639f0), "list", ...) called at /usr/bin/../share/gmusicbrowser/gmusicbrowser_list.pm line 23
***     Browser::__ANON__(HASH(0x5621e85640c8)) called at /usr/bin/gmusicbrowser line 4505
***     main::BuildMenu(ARRAY(0x5621e5beeba0), HASH(0x5621e85640c8), Gtk2::Menu=HASH(0x5621e8563a50)) called at /usr/bin/../share/gmusicbrowser/gmusicbrowser_layout.pm line 537
***     Layout::__ANON__(Gtk2::MenuItem=HASH(0x5621e85639f0)) called at /usr/bin/../share/gmusicbrowser/gmusicbrowser_layout.pm line 3893
***     Layout::MenuItem::UpdateSubMenu(Gtk2::MenuItem=HASH(0x5621e85639f0)) called at /usr/bin/gmusicbrowser line 3549
***     main::DoTask("9_UpdateSubMenu_Gtk2::MenuItem=HASH(0x5621e85639f0)") called at /usr/bin/gmusicbrowser line 3559
***     main::IdleLoop() called at /usr/bin/gmusicbrowser line 1677
***     eval {...} called at /usr/bin/gmusicbrowser line 1677
***  ignoring at /usr/bin/gmusicbrowser line 1677.