3 Replies Latest reply on Dec 1, 2008 12:39 PM by (Olav_Kvern)

    Which action can throws this COMException?

      Hi there,

      sometimes and not really reproducible I get the following COMException:

      System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
      at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
      at InDesignServer._Application.get_Documents()
      at MyApplication.openDocument(String filename)
      at [...]

      As you can see, the exception is thrown anywhere behind my openDocument function. Since the error occurs only sometimes I want to know which action (method call, property access, whatever) makes use of InDesignServer._Application.get_Documents()?

      These are the accesses I do on the COM-application:
      InDesignApp.Open(theFilename)
      ActiveDocument = InDesignApp.Documents.FirstItem
      ActiveDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idMillimeters
      ActiveDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idMillimeters
      ActiveDocument.Converted
      ActiveDocument.Save(theFilename)
      InDesignApp.Documents.Count
      InDesignApp.Documents.LastItem.Close(InDesignServer.idSaveOptions.idNo)

      So which one is the suspect?
      I think this can only be answered by the Adobe crew...
        • 1. Re: Which action can throws this COMException?
          Level 1
          Hi Patrick,

          The following will return a reference to a document as you open it:

          ActiveDocument = InDesignApp.Open(theFilename)
          

          Thanks,

          Ole
          • 2. Re: Which action can throws this COMException?
            Level 1
            Thanks for the tip, but my question was which call has thrown the exception.

            Anywhere behind
            InDesignServer._Application.get_Documents()
            the code stucks.

            I would say any access to InDesignApp.Documents can throw this error.

            You know, sometimes (lets say after around 450 opened and closed documents) I get this error, but I don't know if this is a bug of IDS or whatever. Thats why (and for further analysis) I wanted to know which one of the calls above can produce this specific error, since I don't have access to the InDesignApp sources ;-)

            May be I should retype this thread's subject to something like "What went wrong when I got this COMException?" AND "What this exception wants to tell me?" AND "How can I handle this?" AND "What should I do now - automatically restart the IDS?"
            • 3. Re: Which action can throws this COMException?
              Level 1
              Hi Patrick,

              I guess I'm not understanding the question. The error message states that the error occurs in:

              at InDesignServer._Application.get_Documents()
              
              at MyApplication.openDocument(String filename)

              Which corresponds to your line:

              InDesignApp.Open(theFilename)
              

              A non-repeatable/random error here is most likely a problem with the file path.

              Thanks,

              Ole