Skip to main content
Participant
November 26, 2008
Question

Which action can throws this COMException?

  • November 26, 2008
  • 3 replies
  • 2352 views
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...
This topic has been closed for replies.

3 replies

Known Participant
December 1, 2008
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
Participant
November 27, 2008
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?"
Known Participant
November 27, 2008
Hi Patrick,

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

ActiveDocument = InDesignApp.Open(theFilename)

Thanks,

Ole