Acrobat X & XI Crash on Quit Bug

by Mark Gavin

We have tracked down the Acrobat 10.1.3 and above crash which affects all third party plug-ins which support an annotation handler.  We have been able to reproduce and verify the issue using the Stamper example plug-in supplied with the Acrobat SDK.

The mechanics of the Acrobat 10.1.3 and above crash bug are as follows:

1. User selects Quit from the Acrobat menu.

2. Acrobat calls the third party Plug-Ins UnloadPlugin callback.

3. After the third party Plug-In is unloaded; Acrobat then calls the plug-ins annotation GetType callback; which, no longer exists because the plug-in has already been unloaded by Acrobat.

4. Shortly after the call to the already unloaded plugin; Acrobat crashes.

Acrobat 10.1.2 unloads plug-ins without crashing.  Given the sequence of events; this is clearly a bug in the Acrobat 10.1.3 and above plug-in unload logic.

This change to the Acrobat plug-in unload logic affects all plug-ins which register an annotation handler.  The work around is to call AVAppUnregisterAnnotHandler.  However, AVAppUnregisterAnnotHandler is a new function call which did not exist before Acrobat X; and, is only available in the the Acrobat X SDK.

This workaround requires recompiling all plug-ins, which use an annotation handler, with the Acrobat X SDK.  However, Acrobat plugins compiled using the Acrobat X SDK fail under Acrobat 7 and Acrobat 8.

We have been compiling Redax under the Acrobat 8 SDK to maintain compatibility across Acrobat 7, 8, 9 and X.  We are now having to build two separate plug-ins; one to support older versions of Acrobat and another to support Acrobat X and above.

It is possible to add AVAppUnregisterAnnotHandler the Acrobat 8 SDK; but, this is not something I would recomend.

Note: Adobe has not informed Acrobat plug-in developers of the need to use AVAppUnregisterAnnotHandler under Acrobat 10.3 and above.  Adobe themselves does not even use AVAppUnregisterAnnotHandler in their Stamper sample plug-in which is part of the Acrobat X SDK.