#musicbrainz-picard-development

/

      • outsidecontext[m
        zas, Bob Swift: any idea on how https://tickets.metabrainz.org/browse/PICARD-2989 can happen?
      • Looking at the recursive stack trace this would happen if a SettingsOverride is used which has SettingsOverride.orig_settings set to itself. But looking through the code I can't find out how this could actually happen. Even less so how a SettingsOverride would actually be used during saving. To my understanding this only gets used in the script editor dialog for temporary view of changed settings.
      • zas[m]
        Hard to tell as is. And checking code it seems only used for examples.
      • outsidecontext[m
        That's true, that looks wrong. This should likely use SettingsOverride(config.setting, override). This definitely can lead to recursion, we should fix that
      • zas[m]
        https://github.com/metabrainz/picard/blob/36b0c... -> maybe we should copy the orig settings, instead using a ref
      • outsidecontext[m
        I still can't reproduce or see how this settingsoverride then escapes and causes issues during save
      • zas[m]
        Nor I, even when saving while Options > Filenaming is open and using command line to save the current selected album
      • outsidecontext[m
        But I can reproduce. Once you have the editor opened the override is in use. And it recurses more and more everytime the examples updates, which happens when adding files.
      • I'll debug further, I think there is more than one thing going wrong. The override is even called when the dialog gots closed again
      • zas[m]
        Interesting
      • outsidecontext[m
        got it: because the script editor is a persistent singleton dialog it stays active and updates the examples. due to the recursion bug if you have it opened and perform enough actions that trigger example updates you can get into a situation where the recursion limit is reached. also this recursion of course impacts performance
      • in addition the script editor triggers example update quite often. this might be a performance issue on certain actions. I'll look into optmizing this as well. at least if the dialog is hidden we should be able to avoid those updates.
      • YowieMonkey[m] joined the channel
      • YowieMonkey[m]
        <outsidecontext[m> "YowieMonkey: in this case you..." <- Yup. That's the answer. Thank you.