Segmentation fault running Picard

I was happily running Picard 2.4.2 on Linux Mint 20 without issues. I installed Puddletag 2.0.1 in the hope of using them in tandem. After that Picard became very problematic. Sometimes it would start from the menu, sometimes nothing would happen. Sometimes I could start Picard from a terminal but other times I got a message ‘Segmentation fault (core dumped)’. Puddletag seemed to work fine throughout but if I can’t have both, I’d sooner have Picard. Even after uninstalling Puddletag, Picard doesn’t work any more.
Any ideas, anyone?

I don’t see why Puddletag would prevent Picard to run.
Please enable debug mode, and provide a debug log, see https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#getting-logs

1 Like

Is this what you need? I’m now using 2.4.4 because that is what is in the ppa. It still will not run from menu at all.

D: 15:54:16,500 /usr/lib/picard/picard/tagger.init:225: Starting Picard from ‘/usr/lib/picard/picard/tagger.py’
D: 15:54:16,500 /usr/lib/picard/picard/tagger.init:226: Platform: Linux-5.4.0-45-generic-x86_64-with-glibc2.29 CPython 3.8.2
D: 15:54:16,500 /usr/lib/picard/picard/tagger.init:228: Versions: Picard 2.4.4, Python 3.8.2, PyQt 5.15.0, Qt 5.15.0, Mutagen 1.45.1, Discid discid 1.1.0 (compat layer from python-libdiscid 0.4.1), libdiscid 0.6.2, astrcmp C, SSL OpenSSL 1.1.1f 31 Mar 2020
D: 15:54:16,500 /usr/lib/picard/picard/tagger.init:229: Configuration file path: ‘/home/markb/.config/MusicBrainz/Picard.ini’
D: 15:54:16,500 /usr/lib/picard/picard/tagger.init:231: User directory: ‘/home/markb/.config/MusicBrainz/Picard’
D: 15:54:16,501 /usr/lib/picard/picard/i18n.setup_gettext:83: Using locale ‘en_GB.UTF-8’
D: 15:54:16,502 /usr/lib/picard/picard/i18n.setup_gettext:85: Loading gettext translation, localedir=’/usr/share/locale’
D: 15:54:16,503 /usr/lib/picard/picard/i18n.setup_gettext:87: Loading gettext translation (picard-countries), localedir=’/usr/share/locale’
D: 15:54:16,504 /usr/lib/picard/picard/i18n.setup_gettext:89: Loading gettext translation (picard-attributes), localedir=’/usr/share/locale’
D: 15:54:16,508 /usr/lib/picard/picard/i18n.setup_gettext:108: _ = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x7fc974db6d30>>
D: 15:54:16,509 /usr/lib/picard/picard/i18n.setup_gettext:109: N_ = <function at 0x7fc97e839040>
D: 15:54:16,509 /usr/lib/picard/picard/i18n.setup_gettext:110: ngettext = <bound method GNUTranslations.ngettext of <gettext.GNUTranslations object at 0x7fc974db6d30>>
D: 15:54:16,509 /usr/lib/picard/picard/i18n.setup_gettext:111: gettext_countries = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x7fc974db6d90>>
D: 15:54:16,509 /usr/lib/picard/picard/i18n.setup_gettext:112: gettext_attributes = <bound method GNUTranslations.gettext of <gettext.GNUTranslations object at 0x7fc974db6e20>>
D: 15:54:16,509 /usr/lib/picard/picard/i18n.setup_gettext:113: pgettext_attributes = <bound method GNUTranslations.pgettext of <gettext.GNUTranslations object at 0x7fc974db6e20>>
D: 15:54:16,532 /usr/lib/picard/picard/webservice/init._network_accessible_changed:291: Network accessible requested: 1, actual: 1
D: 15:54:16,535 /usr/lib/picard/picard/webservice/init.set_cache:314: NetworkDiskCache dir: ‘/home/markb/.cache/network/’ current size: 1.3 MB max size: 100 MB
D: 15:54:16,536 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory ‘/usr/lib/picard/picard/plugins’, 0 names found
D: 15:54:16,536 /usr/lib/picard/picard/pluginmanager.load_plugins_from_directory:219: Looking for plugins in directory ‘/home/markb/.config/MusicBrainz/Picard/plugins’, 0 names found
D: 15:54:16,537 /usr/lib/picard/picard/ui/playertoolbar.init:91: Internal player: QtMultimedia available, initializing QMediaPlayer
D: 15:54:16,580 /usr/lib/picard/picard/ui/playertoolbar.init:98: Internal player: available, QMediaPlayer set up
D: 15:54:16,675 /usr/lib/picard/picard/tagger.main:980: Looking for Qt locale en_GB in /home/markb/.local/lib/python3.8/site-packages/PyQt5/Qt/translations
D: 15:54:16,676 /usr/lib/picard/picard/browser/browser.start:78: Starting the browser integration (127.0.0.1:8000)

I see nothing wrong in this log, Is it complete til the crash?
You can try to back up your config file and start without one: mv /home/markb/.config/MusicBrainz/Picard.ini home/markb/.config/MusicBrainz/Picard.ini.bak then run Picard again and tell us if Picard starts.

@phw : any idea?

I am fairly sure I did try that. For a time, starting picard from the terminal using ‘picard -d’ worked a few times and then stopped altogether. After that it would give the segmentation fault every time. To satisfy my own curiosity, I tried ‘pip install picard’ too. Picard ran ONE time before returning to seg fault at every attempt. I should add that my reason for suspecting Puddletag 2.0.1 was that it uses a few of the same modules. Also, nothing else has been changed software/config-wise. At present I have a working version of Puddletag running from a local (ie inside my home) folder. I have completely purged picard for the time being.
Also, as an aside, I signed up for notifications for replies but have received none at all.

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