A script with only three characters that crashes lightning:

A script with only three characters that crashes lightning:

/{/

It seems that regexp Pattern exceptions are not caught, and directly crashes lightning (the app log outputs the error)

But a more strange thing is that, if you create a shortcut to launch this script nothing happens(nor even in the log), but if you run it from an item/container/customMenu then it crash.

]]>
« (Previous Post)

3 Commentsto A script with only three characters that crashes lightning:

  1. Anonymous says:

    < ![CDATA[

    I guess the error is caught in onNewIntent(), but not if the call goes directly to wherever scripts are executed .

    ]]>

  2. Anonymous says:

    < ![CDATA[

    LOL, there is only one person who could find this bug. 😉 good catch TrianguloY

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Well, anybody with the necessity of replacing the ‘{‘ character of a string without remembering that it is a special character that needs escape could have discover it too 😉



    “{}”.replace(/{/g,”{\n”); //bad



    “{}”.replace(/\{/g,”{\n”); //good

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *