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

Crash on loading a release if $div(n,0) is used in a script

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.1
    • Component/s: Scripting
    • Labels:
      None

      Description

      If a script runs $div(n,0) Picard will crash due to a ZeroDivisionError.

      This is a bit difficult to get to, since adding e.g. a straight $div(1,0)  to a script won't work since the scripting UI catches this error. But if you use a variable instead you can make it work. E.g. have $div(1,%_null%) and in a separate script before you set $set(_null,0).

       

      Another way is to set $div(2,$if(%artist%,0,1)) . This will be fine in the scripting UI and can be saved, but when running this script on a release $if(%artist%,0,1) will usually eveluate to 0 and Picard will crash.

        Attachments

          Activity

            People

            • Assignee:
              zas Zas
              Reporter:
              outsidecontext Philipp Wolfer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2.3.1