Skip to main content
ChristopheBl
Participant
April 1, 2021
Answered

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

  • April 1, 2021
  • 2 replies
  • 1252 views

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 has been closed for replies.
Correct answer ChristopheBl

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.

 

2 replies

Participant
December 6, 2022
  •  
BarlaeDC
Community Expert
Community Expert
April 1, 2021

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?

ChristopheBl
ChristopheBlAuthorCorrect answer
Participant
April 1, 2021

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.