3 Replies Latest reply on Mar 29, 2011 2:22 AM by max__

    Overflow in VBScript invoked via SOAP

    max__ Level 1

      We are using web services to invoke a Visual Basic Script in our server (V7).

       

      If we invoke the Script from Windows (by double clicking it) with the server running the script runs fine.

       

      However if we invoke it via web services we get the following error:

       

      Windows Scripting Erorr!

      Error Number: 6

      Error String: Overflow

       

      The error comes from a line that does some simple mathematic arithmetic. There is no division by 0 and as i mentioned this executes fine if invoked by Windows rather than IDS.

       

      Is there a memory limit when executing VBScript via SOAP or some other restriction that we are not aware of.

        • 1. Re: Overflow in VBScript invoked via SOAP
          max__ Level 1

          Have now narrowed this down to a problem in the a previous line that exports a page to JPG.

           

          document.Export 1246775072, c:\image.jpg

           

          The image file is created correctly, however if i do any sort of floating point arithmetic (x = 1 / 2 for example) after this call then i get the overflow error.

           

          If i comment this line i have no problems.

          • 2. Re: Overflow in VBScript invoked via SOAP
            max__ Level 1

            If anyone is willing to look at this problem this is a minimal script that reproduces it.

             

            Set InDesignApp = CreateObject("InDesignServer.Application")

            Set IndDoc = InDesignApp.Open("C:\overflow.indd")

            InDesignApp.JPEGExportPreferences.JPEGExportRange =  1785742674

            InDesignApp.JPEGExportPreferences.PageString = IndDoc.Spreads(1).Pages(1).Name

            x = 1 / 2

            IndDoc.Export 1246775072, "C:\overflow.jpg"

            x = 1 / 2

             

            You will need to create a document called overflow.indd in C. I can pass you mine if i could find a way to attach a file to this post.

             

            You should get the overflow error in the last line of code.

            • 3. Re: Overflow in VBScript invoked via SOAP
              max__ Level 1

              I've tried separating the Export funcionality into another script programmed in javascript rather than VBScript.

               

              To my surprise the error persists!

               

              After executing the javascript script any VBScript that uses floating point arithmetic generates the Overflow error.

               

              The only solution is to restart the server.