JasonLG1979 / gnome-shell-extension-mpris-indicator-button

A full featured MPRIS indicator button extension for GNOME Shell 3.38+
https://extensions.gnome.org/extension/1379/mpris-indicator-button/
GNU General Public License v3.0
159 stars 21 forks source link

Extension causes Gnome-shell to crash when locking #1

Closed nariox closed 5 years ago

nariox commented 5 years ago

Distro Name & Version

Archlinux (latest packages as of Jan 24th)

GNOME Shell Version

3.30.2

Other Installed Extensions

Tried with just this one enabled, same behavior. Tried with other extensions enabled without this one, no problem.

Expected Behavior

After clicking the lock button, session locks and asks for password.

Current Behavior

After trying to lock the session, gnome-shell crashes, no lock dialog is generated, gnome-shell reloads (or sometimes crashes the session). I have not found any other instances where this extension causes gnome-shell to crash.

Detailed Description

I'm not too handy with core dumps, but this seems to be the relevant line:

Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f0da29f6a58 in st_widget_get_theme_node () from /usr/lib/gnome-shell/libst-1.0.so
JasonLG1979 commented 5 years ago

Confirmed.

I can reproduce the issue in Fedora 29.

I played around a bit and the problem happens when the indicator is destroyed in the disable function when the screen is locked. It's strange because it only causes an issue when locking. Logging out and disabling the extension otherwise calls the same function and causes no issues that I can tell?

I'm working mandatory overtime at my day job for the foreseeable future (12 days on, 2 days off) so it may be a little while before I can dedicate a lot of time to fix this. I would certainly welcome any help if you are able and inclined.

nariox commented 5 years ago

No worries, stay strong! Thank you for developing this extension.

JasonLG1979 commented 5 years ago

@nariox, I think I found what's causing the issue.

The ScrollablePopupMenu causes the crash from what I can tell. Removing it and using the builtin "normal" non-scrollable menu seems to stop the crash from happening. The drawback is that without scrollabilty it's possible for the players list to overflow the screen. Although for that to happen you'd need either a really small screen or you'd have to have like 20 player open at once.

I'll push a fix here in a bit that removes ScrollablePopupMenu.

JasonLG1979 commented 5 years ago

There. I pushed and update that should among other things, fix the issue.

nariox commented 5 years ago

Thank you, do you think this is an upstream bug? Should I report it?

EDIT: WOW, that's a huge rewrite. Thank you again! I'll close the bug.

JasonLG1979 commented 5 years ago

EDIT: WOW, that's a huge rewrite.

Yep. I've been sitting on that for a while. Mostly just moving things around and encapsulating things.

do you think this is an upstream bug? Should I report it?

Nah. ScrollablePopupMenu was a bit of a hack to workaround the fact that there are no stock popup menus that are both scrollable and non collapsible. Even if it is an upstream issue they won't do anything about it. The Shell works just fine for their use case as far as they're concerned.