Segmentation fault running Picard

It seems you disabled notifications by email, live (browser) notifications are enabled though, check your preferences.

I noticed Picard 2.5 was released and installed it. I still get segmentation errors with that too. :cry:

There is not much to work with, the logs above look completely normal. If it does not run from menu I suspect something is different in regards to the environment.

My best guess would be that you have some kind of library version mixup. Do you have a separate Python install or maybe a different Qt5 install somewhere?

I am getting the same behavior on 2.4.2, but I believe it is unrelated to Puddletag, as I have never had that installed. I tested it on my desktop and laptop, BOTH running Ubuntu 20.10, BOTH with the same exact list of packages installed.

However, I am only able to reproduce it on my laptop, for some reason; my desktop opens the program without fail each time.

Notes for my laptop, running the same exact configuration:

  • Running Picard from the app drawer is successful about 40% of time. The other times, there is a loading animation for the mouse pointer and then the program exits without having opened any visible window.

  • Running from the command line also is successful about 40% of the time, but exits with segmentation fault (core dumped) picard

  • On the SUCCESSFUL command-line runs, picard -d outputs:

D: 05:30:44,177 /usr/lib/picard/picard/tagger.__init__:225: Starting Picard from '/usr/lib/picard/picard/tagger.py'
D: 05:30:44,177 /usr/lib/picard/picard/tagger.__init__:226: Platform: Linux-5.8.0-25-generic-x86_64-with-glibc2.32 CPython 3.8.6
D: 05:30:44,177 /usr/lib/picard/picard/tagger.__init__:228: Versions: Picard 2.4.2, Python 3.8.6, PyQt 5.15.0, Qt 5.14.2, Mutagen 1.45.0, Discid discid 1.1.0 (compat layer from python-libdiscid 1.1), libdiscid 0.6.2, astrcmp C, SSL OpenSSL 1.1.1f  31 Mar 2020
D: 05:30:44,177 /usr/lib/picard/picard/tagger.__init__:229: Configuration file path: '/home/abdl-dev/.config/MusicBrainz/Picard.ini'
D: 05:30:44,177 /usr/lib/picard/picard/tagger.__init__:231: User directory: '/home/abdl-dev/.config/MusicBrainz/Picard'
D: 05:30:44,178 /usr/lib/picard/picard/i18n.setup_gettext:83: Using locale 'en_US.UTF-8'
D: 05:30:44,178 /usr/lib/picard/picard/i18n.setup_gettext:85: Loading gettext translation, localedir='/usr/share/locale'
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:87: Loading gettext translation (picard-countries), localedir='/usr/share/locale'
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:92: [Errno 2] No translation file found for domain: 'picard-countries'
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:108: _ = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f897c04e550>>
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:109: N_ = <function <lambda> at 0x7f8980a5baf0>
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:110: ngettext = <bound method NullTranslations.ngettext of <gettext.NullTranslations object at 0x7f897c04e550>>
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:111: gettext_countries = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f897c04e5e0>>
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:112: gettext_attributes = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f897c04e6a0>>
D: 05:30:44,179 /usr/lib/picard/picard/i18n.setup_gettext:113: pgettext_attributes = <bound method NullTranslations.pgettext of <gettext.NullTranslations object at 0x7f897c04e6a0>>
D: 05:30:44,193 /usr/lib/picard/picard/webservice/__init__._network_accessible_changed:291: Network accessible requested: 1, actual: 1
D: 05:30:44,194 /usr/lib/picard/picard/webservice/__init__.set_cache:314: NetworkDiskCache dir: '/home/abdl-dev/.cache/network/' current size: 21.2 MB max size: 100 MB
D: 05:30:44,195 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory '/usr/lib/picard/picard/plugins', 0 names found
D: 05:30:44,195 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory '/home/abdl-dev/.config/MusicBrainz/Picard/plugins', 1 names found
D: 05:30:44,196 /usr/lib/picard/picard/plugin.register:74: ExtensionPoint: track_metadata_processors register <- plugin='standardise_feat' item=<function standardise_track_artist at 0x7f897c065ca0>
D: 05:30:44,196 /usr/lib/picard/picard/plugin.register:74: ExtensionPoint: album_metadata_processors register <- plugin='standardise_feat' item=<function standardise_album_artist at 0x7f897c065d30>
D: 05:30:44,196 /usr/lib/picard/picard/pluginmanager._load_plugin_from_directory:275: Loading plugin 'Standardise Feat.' version 0.3.0.final0, compatible with API: 2.0, 2.1, 2.2, 2.3
D: 05:30:44,198 /usr/lib/picard/picard/ui/playertoolbar.__init__:91: Internal player: QtMultimedia available, initializing QMediaPlayer
D: 05:30:44,218 /usr/lib/picard/picard/ui/playertoolbar.__init__:98: Internal player: available, QMediaPlayer set up
D: 05:30:44,265 /usr/lib/picard/picard/tagger.main:980: Looking for Qt locale en_US in /usr/share/qt5/translations
D: 05:30:44,266 /usr/lib/picard/picard/browser/browser.start:78: Starting the browser integration (127.0.0.1:8000)
D: 05:30:47,198 /usr/lib/picard/picard/tagger.exit:376: Picard stopping
D: 05:30:47,198 /usr/lib/picard/picard/browser/browser.stop:85: Stopping the browser integration
  • On FAILED command-line runs, picard -d outputs:
D: 05:32:11,936 /usr/lib/picard/picard/tagger.__init__:225: Starting Picard from '/usr/lib/picard/picard/tagger.py'
D: 05:32:11,937 /usr/lib/picard/picard/tagger.__init__:226: Platform: Linux-5.8.0-25-generic-x86_64-with-glibc2.32 CPython 3.8.6
D: 05:32:11,937 /usr/lib/picard/picard/tagger.__init__:228: Versions: Picard 2.4.2, Python 3.8.6, PyQt 5.15.0, Qt 5.14.2, Mutagen 1.45.0, Discid discid 1.1.0 (compat layer from python-libdiscid 1.1), libdiscid 0.6.2, astrcmp C, SSL OpenSSL 1.1.1f  31 Mar 2020
D: 05:32:11,937 /usr/lib/picard/picard/tagger.__init__:229: Configuration file path: '/home/abdl-dev/.config/MusicBrainz/Picard.ini'
D: 05:32:11,937 /usr/lib/picard/picard/tagger.__init__:231: User directory: '/home/abdl-dev/.config/MusicBrainz/Picard'
D: 05:32:11,938 /usr/lib/picard/picard/i18n.setup_gettext:83: Using locale 'en_US.UTF-8'
D: 05:32:11,938 /usr/lib/picard/picard/i18n.setup_gettext:85: Loading gettext translation, localedir='/usr/share/locale'
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:87: Loading gettext translation (picard-countries), localedir='/usr/share/locale'
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:92: [Errno 2] No translation file found for domain: 'picard-countries'
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:108: _ = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f10f52b7550>>
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:109: N_ = <function <lambda> at 0x7f10fdcc6af0>
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:110: ngettext = <bound method NullTranslations.ngettext of <gettext.NullTranslations object at 0x7f10f52b7550>>
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:111: gettext_countries = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f10f52b75e0>>
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:112: gettext_attributes = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x7f10f52b76a0>>
D: 05:32:11,939 /usr/lib/picard/picard/i18n.setup_gettext:113: pgettext_attributes = <bound method NullTranslations.pgettext of <gettext.NullTranslations object at 0x7f10f52b76a0>>
D: 05:32:11,952 /usr/lib/picard/picard/webservice/__init__._network_accessible_changed:291: Network accessible requested: 1, actual: 1
D: 05:32:11,953 /usr/lib/picard/picard/webservice/__init__.set_cache:314: NetworkDiskCache dir: '/home/abdl-dev/.cache/network/' current size: 21.2 MB max size: 100 MB
D: 05:32:11,953 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory '/usr/lib/picard/picard/plugins', 0 names found
D: 05:32:11,953 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory '/home/abdl-dev/.config/MusicBrainz/Picard/plugins', 1 names found
D: 05:32:11,956 /usr/lib/picard/picard/plugin.register:74: ExtensionPoint: track_metadata_processors register <- plugin='standardise_feat' item=<function standardise_track_artist at 0x7f10f52ceca0>
D: 05:32:11,956 /usr/lib/picard/picard/plugin.register:74: ExtensionPoint: album_metadata_processors register <- plugin='standardise_feat' item=<function standardise_album_artist at 0x7f10f52ced30>
D: 05:32:11,956 /usr/lib/picard/picard/pluginmanager._load_plugin_from_directory:275: Loading plugin 'Standardise Feat.' version 0.3.0.final0, compatible with API: 2.0, 2.1, 2.2, 2.3
D: 05:32:11,958 /usr/lib/picard/picard/ui/playertoolbar.__init__:91: Internal player: QtMultimedia available, initializing QMediaPlayer
[1]    2841 segmentation fault (core dumped)  picard -d

I have noticed that the behavior seems to be seemingly arbitrary, but once it starts to fail, it will not succeed for a long time. For example, on a fresh boot, the first 2-3 times will run the program fine, but after which it will fail with segfault for many subsequent runs (each with at least 20 seconds between runs). I had NO other user programs running.

For what it’s worth, my laptop (late 2019) is running significantly newer hardware than my desktop (2013). If further hardware details would be helpful, I can provide that.

Does it always segfault when initializing QMediaPlayer?

Yes, it seems to always segfault at this point, after:
/usr/lib/picard/picard/ui/playertoolbar.__init__:91: Internal player: QtMultimedia available, initializing QMediaPlayer

I’m not sure how to test more specifically.

I had Anaconda installed before but I removed it because it was so unwieldy. My problem echoes that referred to by temp_user256. Sometimes it works from a command line or the icon on the menu. When it fails from the terminal there is a segmentation fault and it always seems to be QMediaPlayer. When it fails from the menu nothing happens.

I can confirm that the only programs manually installed, outside of the default (minimal option) Ubuntu 20.10 install are:

  • Alacritty (deb)
  • Chromium (deb)
  • MusicBrainz Picard (deb)

Not really sure what to do about this. Hard to propose a solution without being able to reproduce it. The problem is that it crashes the app hard when we try to ask QMultimedia if playback is available. The problem itself can lie in Qt or in GStreamer. It’s probably some bug with these software components and your hardware.

What we probably should do is having a command line flag to completely disable the player. That would enable a way to users to start Picard without uninstalling qtmultimedia.

1 Like

Picard 2.5.1 will provide a --no-player command line option.

1 Like

Well, thank you for looking into it! I know that bugs aren’t always the easiest to nail, so I appreciate the effort. If this becomes a more widespread problem and I can provide more detailed logs/hardware info/etc., let me know (me@abdl.dev).

In the end it is a bug in Qt5 and/or GStreamer and something specific to your system (e.g. it could be hardware specific). So there is not much we can do about. What Picard tries is loading QMultimedia and ask it if the service is available. But in this case this already leads to a hard crash we cannot recover from.

1 Like

Picard 2.5.1 is out now. The builds for the Ubuntu PPA are still running and scheduled to run in 8 hours (Canonical seems to do some heavy package rebuilds currently), but once this is out my recommendation to those affected by this issue is running Picard with the --no-player command line option.

If you want to change the launcher shortcut my recommended way is to copy the file /usr/share/applications/org.musicbrainz.Picard.desktop over to $HOME/.local/share/applications/org.musicbrainz.Picard.desktop. Then edit the file in a text editor and change the line:

Exec=picard %F

to

Exec=picard --no-player %F
4 Likes

Thank you very much, Philipp. :grinning:

| outsidecontext
October 28 |

  • | - |

Picard 2.5.1 is out now. The builds for the Ubuntu PPA are still running and scheduled to run in 8 hours (Canonical seems to do some heavy package rebuilds currently), but once this is out my recommendation to those affected by this issue is running Picard with the --no-player command line option.

If you want to change the launcher shortcut my recommended way is to copy the file /usr/share/applications/org.musicbrainz.Picard.desktop over to $HOME/.local/share/applications/org.musicbrainz.Picard.desktop. Then edit the file in a text editor and change the line:

Exec=picard %F

to

Exec=picard --no-player %F
1 Like

I am having this same problem on Ubuntu too, I think. I haven’t used Picard in a few days and now it’s suddenly happening, I don’t know why. This is what I get when I run picard from the terminal:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
ac: Unknown GPU, using 0 for raster_config
Segmentation fault (core dumped)

I tried running with the --no-player option and it worked. So what is this Qplayer anyway? Is it like a player for local files or something similar to the last.fm radio? I have no use for it whatsoever.

It looks like this is a pretty old thread, but your issue may have something to do with recent updates that landed in GNOME, which were released to Ubuntu about a week ago. More information on that can be seen here:

With regard to the error message, your system is nudging you to investigate a windowing system issue between the newer Wayland, vs. legacy X11. Have you tried running Picard over either protocol?

e.g., from the command line:

export QT_QPA_PLATFORM=xcb, followed by picard
—or—
export QT_QPA_PLATFORM=wayland followed by picard?

If so, were there any error messages, or did the application load successfully between the two systems?

QMediaPlayer is the Qt class that allows the player at the bottom of Picard. This lets you preview tracks that are loaded into Picard.

Well drag n drop is still working for me so I’m not sure what the issue could be… somewhat recently I had to install qt4 alongside my already existing qt5 libraries. I wonder if it has something to do with that?

I tried running picard on Ubuntu over Wayland and an Xorg session, but both gave me that same error message I mentioned above.

e.g., from the command line:

export QT_QPA_PLATFORM=xcb, followed by picard
—or—
export QT_QPA_PLATFORM=wayland followed by picard?

If so, were there any error messages, or did the application load successfully between the two systems?

I am currently running an X session. I tried both of those suggestions in the terminal and nothing happens at all - no error message and no picard.

Sorry, I didn’t realize that I was supposed to run picard after the export command. I get the same segmentation fault on Xorg than I do Wayland, the only difference is it doesn’t ask me to use QT_QPA_PLATFORM this time. picard --no-player is still the only way to make it work.

i.e.
ac: Unknown GPU, using 0 for raster_config
Segmentation fault (core dumped)

I’m going to reboot and try on Wayland real quick

export QT_QPA_PLATFORM=wayland followed by picard works but I still get the warning message:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

Now with this directly beneath it:

QSocketNotifier: Can only be used with threads started with QThread

Picard also still will not start from clicking it’s icon in the start menu/unity dash. I’m going to check it’s exec params in the .desktop file

Check for any global environment variables set in your user’s .bashrc file, specifically exports that mention X11, xcb, or wayland with regard to Qt. Remove or comment them out if needed. Note that environment variables in this file are loaded at login, and are not refreshed automatically. You will need to log out, or reboot to test changes made therein.

This message is normal, and can be ignored.

You’re on the right track here if Picard is starting now via command line with export QT_QPA_PLATFORM=wayland. The Exec line of Picard’s .desktop file should read as follows:

Exec=env QT_QPA_PLATFORM=wayland picard %F