3 Replies Latest reply on Jan 10, 2011 6:23 AM by thomas rollins

    calling a function with eval causing CS5 to crash

    thomas rollins Level 1

      I'm calling a function depending on user input from a dialog and the resulting call is something like:

       

      eval(fromFormat + "To" + toFormat + "(selection, data)");

       

      where selection is the app.selection.

       

      The correct function is called, and I can trace through it all the way through to the end of the called function, and control has returned to the next line after the eval... and this is where it crashes. Even something simple like: var a = 1; causes CS5 to exit.

       

      When it exits, CS5 closes, with an OK dialog box coming up stating: "An unhandled win32 exception occurred in InDesign.exe [6036]. ..."

       

      Not pretty huh?

       

      So I'm wondering what could be the cause? The called function does some shifting, and moving around of things, but nothing that I'd have thought would cause an exception.