Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1606

Crashes on opening options with broken plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.2.2
    • 2.2
    • Other
    • Windows 10 v1903 x64

      All attempts to access Help > About... result in an application crash.

      All attempts to access Options > Options... result in an application crash.

       

      This installation was upgraded from v2.1.3.

       

      Generated log:

       

      D: 22:22:26,944 tagger.__init__:208: Starting Picard from 'c:\\Program Files\\MusicBrainz Picard\\picard\\tagger.pyc'
      D: 22:22:26,944 tagger.__init__:210: Platform: Windows-10-10.0.18362-SP0 CPython 3.7.4
      D: 22:22:26,944 tagger.__init__:211: Versions: Picard 2.2, Python 3.7.4, PyQt 5.13.0, Qt 5.13.0, Mutagen 1.42.0, Discid discid 1.1.1, libdiscid 0.6.2, astrcmp Python, SSL OpenSSL 1.1.1b  26 Feb 2019
      D: 22:22:26,944 tagger.__init__:212: Configuration file path: 'C:/Users/sturm/AppData/Roaming/MusicBrainz/Picard.ini'
      D: 22:22:26,945 tagger.__init__:214: User directory: 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard'
      D: 22:22:26,961 i18n.setup_gettext:60: unsupported locale setting
      D: 22:22:26,962 i18n.setup_gettext:76: Using locale 'en_US.cp1252'
      D: 22:22:26,962 i18n.setup_gettext:78: Loading gettext translation, localedir='c:\\Program Files\\MusicBrainz Picard\\locale'
      D: 22:22:26,963 i18n.setup_gettext:82: Loading gettext translation (picard-countries), localedir='c:\\Program Files\\MusicBrainz Picard\\locale'
      D: 22:22:26,964 i18n.setup_gettext:89: [Errno 2] No translation file found for domain: 'picard-countries'
      D: 22:22:26,964 i18n.setup_gettext:108: _ = <function setup_gettext.<locals>.<lambda> at 0x000001F18BE68708>
      D: 22:22:26,964 i18n.setup_gettext:109: N_ = <function <lambda> at 0x000001F18B90EDC8>
      D: 22:22:26,964 i18n.setup_gettext:110: ngettext = <function setup_gettext.<locals>._ngettext at 0x000001F18BC4D828>
      D: 22:22:26,964 i18n.setup_gettext:111: gettext_countries = <function setup_gettext.<locals>._gettext_countries at 0x000001F18BE86948>
      D: 22:22:26,965 i18n.setup_gettext:112: gettext_attributes = <function setup_gettext.<locals>._gettext_attributes at 0x000001F18BE86F78>
      D: 22:22:26,991 webservice.set_cache:297: NetworkDiskCache dir: 'C:/Users/sturm/AppData/Local/MusicBrainz/Picard/cache/picard/' size: 45893647 / 104857600
      I: 22:22:26,991 pluginmanager.load_plugins_from_directory:198: Plugin directory 'plugins' doesn't exist
      D: 22:22:26,993 pluginmanager.load_plugins_from_directory:212: Looking for plugins in directory 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard\\plugins', 2 names found
      D: 22:22:27,176 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method PartLevels.add_work_info of <picard.plugins.classical_extras.PartLevels object at 0x000001F18DB1FE08>>
      D: 22:22:27,176 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method ExtraArtists.add_artist_info of <picard.plugins.classical_extras.ExtraArtists object at 0x000001F18D687808>>
      D: 22:22:27,177 plugin.register:54: ExtensionPoint: pages register <- plugin='classical_extras' item=<class 'picard.plugins.classical_extras.ClassicalExtrasOptionsPage'>
      D: 22:22:27,178 pluginmanager._load_plugin_from_directory:269: Loading plugin 'Classical Extras' version 2.0.4, compatible with API: 2.0
      D: 22:22:27,181 plugin.register:54: ExtensionPoint: file_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000001F18DAF44C8>
      D: 22:22:27,181 plugin.register:54: ExtensionPoint: track_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000001F18DAF44C8>
      D: 22:22:27,181 pluginmanager._load_plugin_from_directory:269: Loading plugin 'View script variables' version 0.7, compatible with API: 2.0
      D: 22:22:27,182 ui.playertoolbar.__init__:83: Internal player: QtMultimedia available, initializing QMediaPlayer
      D: 22:22:27,318 ui.playertoolbar.__init__:90: Internal player: available, QMediaPlayer set up
      D: 22:22:27,712 tagger.main:910: Looking for Qt locale en_US in C:/Program Files/MusicBrainz Picard/PyQt5/Qt/translations
      D: 22:22:27,713 tagger.main:914: Qt locale en_US not available
      D: 22:22:27,716 browser.browser.start:69: Starting the browser integration (127.0.0.1:8000)
      D: 22:22:27,776 ui.mainwindow.auto_update_check:1188: Skipping start-up check for program updates.  Today: 2019-09-16, Last check: 2019-09-16 (Check interval: 7 days), Update level: 0 (stable)
      

       

          [PICARD-1606] Crashes on opening options with broken plugin

          I reopen this as I think it is actually not enough to fix this in the affected plugin. Picard itself must handle this better.

          Proposed fix in https://github.com/metabrainz/picard/pull/1301

          Philipp Wolfer added a comment - I reopen this as I think it is actually not enough to fix this in the affected plugin. Picard itself must handle this better. Proposed fix in https://github.com/metabrainz/picard/pull/1301

          Chris McGee added a comment -

          That works a treat! Thanks to all who helped fix this bug; you are awesome! đŸ˜ƒ

          Chris McGee added a comment - That works a treat! Thanks to all who helped fix this bug; you are awesome! đŸ˜ƒ

          The fixed plugin has been released.

          See also the following post in MetaBrainz community on how to handle this:

          https://community.metabrainz.org/t/classical-extras-2-0/394627/94?u=outsidecontext

          Philipp Wolfer added a comment - The fixed plugin has been released. See also the following post in MetaBrainz community on how to handle this: https://community.metabrainz.org/t/classical-extras-2-0/394627/94?u=outsidecontext

          No, I'm outsidecontext on MusicBrainz But the plugins available for download from inside Picard are managed centrally, and I care a lot about Picard's stability. Usually MetaTunes will do updates to Classical Extras in his repository and submit it for inclusion into the main repository from time to time. But sometimes fixes like this go the other way round.

          MetaTunes is already informed, the fixes are proposed for inclusion in his repository at https://github.com/MetaTunes/picard-plugins/pulls

          Philipp Wolfer added a comment - No, I'm outsidecontext on MusicBrainz But the plugins available for download from inside Picard are managed centrally, and I care a lot about Picard's stability. Usually MetaTunes will do updates to Classical Extras in his repository and submit it for inclusion into the main repository from time to time. But sometimes fixes like this go the other way round. MetaTunes is already informed, the fixes are proposed for inclusion in his repository at https://github.com/MetaTunes/picard-plugins/pulls

          Chris McGee added a comment -

          Awesome! Oh, so you are also the Classical Extras developer, MetaTunes, Philipp? Or, if not, should I inform them on their community thread?

          Chris McGee added a comment - Awesome! Oh, so you are also the Classical Extras developer, MetaTunes, Philipp? Or, if not, should I inform them on their community thread?

          So this has been merged. I'll keep this issue open till we have deployed a new website with the updated plugin.

          Philipp Wolfer added a comment - So this has been merged. I'll keep this issue open till we have deployed a new website with the updated plugin.

          Philipp Wolfer added a comment - - edited

          The reason is indeed classical extras. Thanks a lot for the details.

          Proposed fix is at https://github.com/metabrainz/picard-plugins/pull/235

          Update: Now at https://github.com/metabrainz/picard-plugins/pull/236

          You can download a fixed version temporarily from https://keybase.pub/phwolfer/picard-plugins/classical_extras.zip

          Philipp Wolfer added a comment - - edited The reason is indeed classical extras. Thanks a lot for the details. Proposed fix is at https://github.com/metabrainz/picard-plugins/pull/235 Update: Now at https://github.com/metabrainz/picard-plugins/pull/236 You can download a fixed version temporarily from https://keybase.pub/phwolfer/picard-plugins/classical_extras.zip

          Chris McGee added a comment - - edited

          Thank you all for your responses. Here is the information you requested.

          @outsidecontext: Here's the debug log:

          D: 18:46:36,924 tagger.__init__:208: Starting Picard from 'C:\\Program Files\\MusicBrainz Picard\\picard\\tagger.pyc'
          D: 18:46:36,925 tagger.__init__:210: Platform: Windows-10-10.0.18362-SP0 CPython 3.7.4
          D: 18:46:36,926 tagger.__init__:211: Versions: Picard 2.2, Python 3.7.4, PyQt 5.13.0, Qt 5.13.0, Mutagen 1.42.0, Discid discid 1.1.1, libdiscid 0.6.2, astrcmp Python, SSL OpenSSL 1.1.1b  26 Feb 2019
          D: 18:46:36,926 tagger.__init__:212: Configuration file path: 'C:/Users/sturm/AppData/Roaming/MusicBrainz/Picard.ini'
          D: 18:46:36,926 tagger.__init__:214: User directory: 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard'
          D: 18:46:36,943 i18n.setup_gettext:60: unsupported locale setting
          D: 18:46:36,944 i18n.setup_gettext:76: Using locale 'en_US.cp1252'
          D: 18:46:36,944 i18n.setup_gettext:78: Loading gettext translation, localedir='C:\\Program Files\\MusicBrainz Picard\\locale'
          D: 18:46:36,945 i18n.setup_gettext:82: Loading gettext translation (picard-countries), localedir='C:\\Program Files\\MusicBrainz Picard\\locale'
          D: 18:46:36,946 i18n.setup_gettext:89: [Errno 2] No translation file found for domain: 'picard-countries'
          D: 18:46:36,947 i18n.setup_gettext:108: _ = <function setup_gettext.<locals>.<lambda> at 0x000002341968D948>
          D: 18:46:36,947 i18n.setup_gettext:109: N_ = <function <lambda> at 0x000002341934EEE8>
          D: 18:46:36,947 i18n.setup_gettext:110: ngettext = <function setup_gettext.<locals>._ngettext at 0x00000234198B7A68>
          D: 18:46:36,947 i18n.setup_gettext:111: gettext_countries = <function setup_gettext.<locals>._gettext_countries at 0x00000234198B7168>
          D: 18:46:36,947 i18n.setup_gettext:112: gettext_attributes = <function setup_gettext.<locals>._gettext_attributes at 0x00000234198D80D8>
          D: 18:46:36,973 webservice.set_cache:297: NetworkDiskCache dir: 'C:/Users/sturm/AppData/Local/MusicBrainz/Picard/cache/picard/' size: 48027510 / 104857600
          I: 18:46:36,974 pluginmanager.load_plugins_from_directory:198: Plugin directory 'C:\\Program Files\\MusicBrainz Picard\\plugins' doesn't exist
          D: 18:46:36,975 pluginmanager.load_plugins_from_directory:212: Looking for plugins in directory 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard\\plugins', 2 names found
          D: 18:46:37,158 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method PartLevels.add_work_info of <picard.plugins.classical_extras.PartLevels object at 0x000002341B551E88>>
          D: 18:46:37,158 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method ExtraArtists.add_artist_info of <picard.plugins.classical_extras.ExtraArtists object at 0x000002341B551B08>>
          D: 18:46:37,160 plugin.register:54: ExtensionPoint: pages register <- plugin='classical_extras' item=<class 'picard.plugins.classical_extras.ClassicalExtrasOptionsPage'>
          D: 18:46:37,160 pluginmanager._load_plugin_from_directory:269: Loading plugin 'Classical Extras' version 2.0.4, compatible with API: 2.0
          D: 18:46:37,164 plugin.register:54: ExtensionPoint: file_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000002341B5215E8>
          D: 18:46:37,164 plugin.register:54: ExtensionPoint: track_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000002341B5215E8>
          D: 18:46:37,165 pluginmanager._load_plugin_from_directory:269: Loading plugin 'View script variables' version 0.7, compatible with API: 2.0
          D: 18:46:37,166 ui.playertoolbar.__init__:83: Internal player: QtMultimedia available, initializing QMediaPlayer
          D: 18:46:37,304 ui.playertoolbar.__init__:90: Internal player: available, QMediaPlayer set up
          D: 18:46:37,718 tagger.main:910: Looking for Qt locale en_US in C:/Program Files/MusicBrainz Picard/PyQt5/Qt/translations
          D: 18:46:37,718 tagger.main:914: Qt locale en_US not available
          D: 18:46:37,721 browser.browser.start:69: Starting the browser integration (127.0.0.1:8000)
          D: 18:46:37,787 ui.mainwindow.auto_update_check:1188: Skipping start-up check for program updates.  Today: 2019-09-17, Last check: 2019-09-16 (Check interval: 7 days), Update level: 0 (stable)
          D: 18:46:41,092 coverart.providers.cover_art_providers:96: CA Providers order: Cover Art Archive [x] > Whitelist [x] > CaaReleaseGroup [ ] > Local Files [ ]
          

          The last line of that log appears when I choose Help > About….

          I've attached my Picard.ini file which, thankfully, has no personal info in it from what I can tell.

          I don't really have any issue starting Picard, even after a crash. But just for testing, I tried launching it without the Picard.ini file, so it had to generate a new one, and the Help > About… dialog does appear this time. So there must be something wrong with either my .ini file or, more likely, there's an incompatibility with the Classical Extras plugin.

           

          @zas: Indeed, temporarily disabling plugins does allow the Options modal to appear. Again, it's probably an incompatibility with Classical Extras.

          Chris McGee added a comment - - edited Thank you all for your responses. Here is the information you requested. @outsidecontext: Here's the debug log: D: 18:46:36,924 tagger.__init__:208: Starting Picard from 'C:\\Program Files\\MusicBrainz Picard\\picard\\tagger.pyc' D: 18:46:36,925 tagger.__init__:210: Platform: Windows-10-10.0.18362-SP0 CPython 3.7.4 D: 18:46:36,926 tagger.__init__:211: Versions: Picard 2.2, Python 3.7.4, PyQt 5.13.0, Qt 5.13.0, Mutagen 1.42.0, Discid discid 1.1.1, libdiscid 0.6.2, astrcmp Python, SSL OpenSSL 1.1.1b 26 Feb 2019 D: 18:46:36,926 tagger.__init__:212: Configuration file path: 'C:/Users/sturm/AppData/Roaming/MusicBrainz/Picard.ini' D: 18:46:36,926 tagger.__init__:214: User directory: 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard' D: 18:46:36,943 i18n.setup_gettext:60: unsupported locale setting D: 18:46:36,944 i18n.setup_gettext:76: Using locale 'en_US.cp1252' D: 18:46:36,944 i18n.setup_gettext:78: Loading gettext translation, localedir='C:\\Program Files\\MusicBrainz Picard\\locale' D: 18:46:36,945 i18n.setup_gettext:82: Loading gettext translation (picard-countries), localedir='C:\\Program Files\\MusicBrainz Picard\\locale' D: 18:46:36,946 i18n.setup_gettext:89: [Errno 2] No translation file found for domain: 'picard-countries' D: 18:46:36,947 i18n.setup_gettext:108: _ = <function setup_gettext.<locals>.<lambda> at 0x000002341968D948> D: 18:46:36,947 i18n.setup_gettext:109: N_ = <function <lambda> at 0x000002341934EEE8> D: 18:46:36,947 i18n.setup_gettext:110: ngettext = <function setup_gettext.<locals>._ngettext at 0x00000234198B7A68> D: 18:46:36,947 i18n.setup_gettext:111: gettext_countries = <function setup_gettext.<locals>._gettext_countries at 0x00000234198B7168> D: 18:46:36,947 i18n.setup_gettext:112: gettext_attributes = <function setup_gettext.<locals>._gettext_attributes at 0x00000234198D80D8> D: 18:46:36,973 webservice.set_cache:297: NetworkDiskCache dir: 'C:/Users/sturm/AppData/Local/MusicBrainz/Picard/cache/picard/' size: 48027510 / 104857600 I: 18:46:36,974 pluginmanager.load_plugins_from_directory:198: Plugin directory 'C:\\Program Files\\MusicBrainz Picard\\plugins' doesn't exist D: 18:46:36,975 pluginmanager.load_plugins_from_directory:212: Looking for plugins in directory 'C:\\Users\\sturm\\AppData\\Local\\MusicBrainz\\Picard\\plugins', 2 names found D: 18:46:37,158 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method PartLevels.add_work_info of <picard.plugins.classical_extras.PartLevels object at 0x000002341B551E88>> D: 18:46:37,158 plugin.register:54: ExtensionPoint: track_metadata_processors register <- plugin='classical_extras' item=<bound method ExtraArtists.add_artist_info of <picard.plugins.classical_extras.ExtraArtists object at 0x000002341B551B08>> D: 18:46:37,160 plugin.register:54: ExtensionPoint: pages register <- plugin='classical_extras' item=<class 'picard.plugins.classical_extras.ClassicalExtrasOptionsPage'> D: 18:46:37,160 pluginmanager._load_plugin_from_directory:269: Loading plugin 'Classical Extras' version 2.0.4, compatible with API: 2.0 D: 18:46:37,164 plugin.register:54: ExtensionPoint: file_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000002341B5215E8> D: 18:46:37,164 plugin.register:54: ExtensionPoint: track_actions register <- plugin='viewvariables' item=<picard.plugins.viewvariables.ViewVariables object at 0x000002341B5215E8> D: 18:46:37,165 pluginmanager._load_plugin_from_directory:269: Loading plugin 'View script variables' version 0.7, compatible with API: 2.0 D: 18:46:37,166 ui.playertoolbar.__init__:83: Internal player: QtMultimedia available, initializing QMediaPlayer D: 18:46:37,304 ui.playertoolbar.__init__:90: Internal player: available, QMediaPlayer set up D: 18:46:37,718 tagger.main:910: Looking for Qt locale en_US in C:/Program Files/MusicBrainz Picard/PyQt5/Qt/translations D: 18:46:37,718 tagger.main:914: Qt locale en_US not available D: 18:46:37,721 browser.browser.start:69: Starting the browser integration (127.0.0.1:8000) D: 18:46:37,787 ui.mainwindow.auto_update_check:1188: Skipping start-up check for program updates. Today: 2019-09-17, Last check: 2019-09-16 (Check interval: 7 days), Update level: 0 (stable) D: 18:46:41,092 coverart.providers.cover_art_providers:96: CA Providers order: Cover Art Archive [x] > Whitelist [x] > CaaReleaseGroup [ ] > Local Files [ ] The last line of that log appears when I choose Help > About…. I've attached my  Picard.ini  file which, thankfully, has no personal info in it from what I can tell. I don't really have any issue  starting Picard, even after a crash. But just for testing, I tried launching it without the Picard.ini file, so it had to generate a new one, and the Help > About… dialog  does appear this time. So there must be something wrong with either my .ini file or, more likely, there's an incompatibility with the Classical Extras plugin.   @zas: Indeed, temporarily disabling plugins does allow the Options modal to appear. Again, it's probably an incompatibility with Classical Extras .

          Zas added a comment -

          Also, it might be caused by plugins, you can try to start Picard from command line adding the '-P' option, which will disable plugins.

          Zas added a comment - Also, it might be caused by plugins, you can try to start Picard from command line adding the '-P' option, which will disable plugins.

          Thanks a lot for the report and the details. This is most likely the cause of some specific option Picard fails to handle properly.

          To find out what is happening I need the debug output at the point where Picard crashes. Can you for this please:

          1. Open a Windows command prompt (just search for "cmd.exe" in the Windows start menu)
          2. Inside the command prompt type
          "C:\Program Files\MusicBrainz Picard\picard.exe" --debug and press enter (see screenshot below).

          3. Picard should start with all the debug output written to the command prompt window. Now make Picard crash.
          4. The command prompt window should show the crash reason at the very end. This is what I'm interested in. Copying text out of the command prompt window can be a bit fiddly, but you can also take a screenshot and post it here.

          Another thing that could help is your actual config file. This is located in C:\Users\sturm\AppData\Roaming\MusicBrainz\Picard.ini. Important: This file can contain login credentials. Before submitting this file, please make a copy of it and open that copy in Notepad (just right click -> Edit). Then search for lines starting with oauth_ and remove them, especially oauth_access_token and oauth_refresh_token. Also search for proxy_password and if set remove this also. Once cleaned submit this edited file here.

          Also as a workaround for you removing this Picard.ini should help you to start Picard again, but obviously you will loose your config. So please keep a copy of Picard.ini, once we have figured out what exactly is causing your crash we can fix the ini file again.

          Philipp Wolfer added a comment - Thanks a lot for the report and the details. This is most likely the cause of some specific option Picard fails to handle properly. To find out what is happening I need the debug output at the point where Picard crashes. Can you for this please: 1. Open a Windows command prompt (just search for "cmd.exe" in the Windows start menu) 2. Inside the command prompt type "C:\Program Files\MusicBrainz Picard\picard.exe" --debug and press enter (see screenshot below). 3. Picard should start with all the debug output written to the command prompt window. Now make Picard crash. 4. The command prompt window should show the crash reason at the very end. This is what I'm interested in. Copying text out of the command prompt window can be a bit fiddly, but you can also take a screenshot and post it here. Another thing that could help is your actual config file. This is located in C:\Users\sturm\AppData\Roaming\MusicBrainz\Picard.ini . Important : This file can contain login credentials. Before submitting this file, please make a copy of it and open that copy in Notepad (just right click -> Edit). Then search for lines starting with oauth_ and remove them, especially oauth_access_token and oauth_refresh_token . Also search for proxy_password and if set remove this also. Once cleaned submit this edited file here. Also as a workaround for you removing this Picard.ini should help you to start Picard again, but obviously you will loose your config. So please keep a copy of Picard.ini, once we have figured out what exactly is causing your crash we can fix the ini file again.

            outsidecontext Philipp Wolfer
            Sturm Chris McGee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.2.2