Skip to main content
ChristopheBl
Participant
Apr 1, 2021 1:25 PM UTC
Answered

Acrobat Pro DC crashes after my plugin open a document the second time

Here is my piece of code:

{
        ASFileSys fileSys = ASGetDefaultUnicodeFileSys();
        ASPathName pathName = ASFileSysCreatePathName(fileSys, ASAtomFromString("WinUnicodePath"), doc.filePath, NULL);
...
 
This code is called from an external program using menu item execution:
Set app = CreateObject(AcroExch.App)
app.menuItemExecute("ADBE:MyCommand")
 
My scenario is following:
  1. Launch the command: it opens the document in Acrobat
  2. Close Acrobat manually: Acrobat disappear but a process remains in the background
  3. Launch the command again: it opends the document and then crashes Acrobat outside of the plugin code

 

Additional information: the document contains some annotations. If annotations are not present, it seems to work.

 

Thank you in advance for your help

This topic is closed to new replies. Start a new post to keep the conversation going.
ChristopheBl
ChristopheBlCorrect answer
Participant
Apr 1, 2021 4:09 PM UTC

Thank you for your quick answer.

Looking at the handles, I've found that is came from the handles locked by the client. Once released, it works fine.

 

3 replies

Participant
Dec 6, 2022 3:23 PM UTC
  •  
Translate
BarlaeDC
Community Expert
Community Expert
Apr 1, 2021 3:20 PM UTC

Hi,

 

Have you registered for the WillClose ( I think that is the name) notification and make sure that you are releasing all handles to the document or windows the document may use?

Translate
ChristopheBl
ChristopheBlAuthorCorrect answer
Participant
Apr 1, 2021 4:09 PM UTC

Thank you for your quick answer.

Looking at the handles, I've found that is came from the handles locked by the client. Once released, it works fine.

 

Translate