Application crash when using ActiveX control (C++ and C#/.net projects)

New Here ,
Aug 01, 2017

Copy link to clipboard

Copied

I've been debugging a crash in an application which appears to stem from the Acrobat Reader ActiveX components, when Acrobat Reader DC 2017 is installed on the computer. The application is a native Windows application written in C++, but I cannot easily create a sample project for it (inherited code base, not my forte), but I'm getting the same error (Structured Exception) from a simple test/repro project made in C#.

In this specific crash instance, it appears that the key step is performing any key press operation, within the control, after loading a document. This brings up the special tools in the right-hand side of the viewer's control area.

The sample C# repro project can be downloaded here: Dropbox - AcrobatReaderCrash.zip , and the steps to reproduce from it are as follows:

  1. Start the application, with or without debugging enabled
  2. Click on either of the "Load" buttons, at least once, up to however many you'd like
  3. Click within the viewer
  4. Press the "Esc" key
  5. Click the load buttons again, if you'd like. This part doesn't make a different
  6. Click the "Exit" button (or "X" in the Windows bar, Alt+F4, System menu + "Close", etc)
  7. Exception is raised and application crashes.

To the best of my diagnosing abilities, but don't take my word as the final authority on it, what appears to be happening is that a component created or referenced within the ActiveX control is getting double-freed, thus causing the "NullReferenceException" in the .net code, and the "ACCESS_VIOLATION" SEH from "native" code.

Is there any call which should be made prior to closing or disposing of the control? Or perhaps some property that can be set to prevent the command bar from being displayed (it can also be activated by clicking the "Acrobat" triangle logo which appears in the floating bar with page numbers, etc, in the viewer).

TOPICS
Acrobat SDK and JavaScript

Views

470

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Application crash when using ActiveX control (C++ and C#/.net projects)

New Here ,
Aug 01, 2017

Copy link to clipboard

Copied

I've been debugging a crash in an application which appears to stem from the Acrobat Reader ActiveX components, when Acrobat Reader DC 2017 is installed on the computer. The application is a native Windows application written in C++, but I cannot easily create a sample project for it (inherited code base, not my forte), but I'm getting the same error (Structured Exception) from a simple test/repro project made in C#.

In this specific crash instance, it appears that the key step is performing any key press operation, within the control, after loading a document. This brings up the special tools in the right-hand side of the viewer's control area.

The sample C# repro project can be downloaded here: Dropbox - AcrobatReaderCrash.zip , and the steps to reproduce from it are as follows:

  1. Start the application, with or without debugging enabled
  2. Click on either of the "Load" buttons, at least once, up to however many you'd like
  3. Click within the viewer
  4. Press the "Esc" key
  5. Click the load buttons again, if you'd like. This part doesn't make a different
  6. Click the "Exit" button (or "X" in the Windows bar, Alt+F4, System menu + "Close", etc)
  7. Exception is raised and application crashes.

To the best of my diagnosing abilities, but don't take my word as the final authority on it, what appears to be happening is that a component created or referenced within the ActiveX control is getting double-freed, thus causing the "NullReferenceException" in the .net code, and the "ACCESS_VIOLATION" SEH from "native" code.

Is there any call which should be made prior to closing or disposing of the control? Or perhaps some property that can be set to prevent the command bar from being displayed (it can also be activated by clicking the "Acrobat" triangle logo which appears in the floating bar with page numbers, etc, in the viewer).

TOPICS
Acrobat SDK and JavaScript

Views

471

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 01, 2017 0
hugodahl LATEST
New Here ,
Aug 01, 2017

Copy link to clipboard

Copied

One thing to add is, when debugging into the native/C++ application, the crashing thread is named "AcroPDFImpl.dll thread", and the call stack's pointer is in the "OLEACC.dll" module.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 01, 2017 0