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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.3.1
    • 2.3
    • Scripting
    • None

      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.

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

              Created:
              Updated:
              Resolved:

                Version Package
                2.3.1