Hi,
Acrobat Reader DC15 through the MFC ActiveX wrapper causing crash to our application while closing the opened PDF file. It’s happening when we try to close the last file if multiple PDF files are opened. This crash is specific to Adobe Reader DC15 and working fine with version XI. The program code hasn't changed and crash occurs while calling DestroyWindow(). The only difference is installing Adobe Reader DC15 (version X and XI worked fine for years).
Crash is still there even after disabling Protected mode. Cleanup of Adobe DC using Adobe cleaner tool is also not resolving the issue.
Reproduced in both Windows 7 Professional 64 bit and Windows2008R2 64bit OS.One thing I noticed is that the crash is occurring while we call DestroyWindow() on closing the pdf file. If multiple PDF files are opened then the crash occurs only when we close the last pdf file and all other PDF files were closed successfully. The same code is working fine in Adobe XI and earlier versions.
Code Snippets:-
class CAcroReader : public CWnd
class CAcroView {
CAcroReader m_acroReader;
};
....
m_acroReader.CreateControl(REFCLSID clsid,LPCTSTR pszWindowName, DWORD dwStyle, const RECT& rect,CWnd* pParentWnd,UINT nID,CFile* pPersist = NULL,
BOOL bStorage = FALSE,BSTR bstrLicKey = NULL); // To create an ActiveX control that will be represented in the MFC program by a CWnd object
...
...
m_acroReader.LoadFile()
{
// To open the PDF file
InvokeHelper(0x2, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, fileName);
}
...
...
CAcroView::~CAcroView() {
m_acroReader.DestroyWindow(); // While closing the file
}
stack dump:
0153d7bc 75132161 00020688 0000004a 00040580 user32!NtUserMessageCall+0x15
0153d7fc 7513617a 0198fdf0 00000000 5f83c127 user32!SendMessageWorker+0x5e9
0153d820 6edafb4e 00020688 0000004a 00040580 user32!SendMessageA+0x7f
0153d99c 6edafe11 00020688 0000004a 00040580 AcroPDF!DllGetClassObject+0xdf0c
0153d9b4 6edd6392 00020688 00040580 0153d9d4 AcroPDF!DllGetClassObject+0xe1cf
0153d9ec 6edd5280 2d0e6508 09545f68 0000001c AcroPDF!DllUnregisterServer+0x19568
0153da1c 6edd194c 0153da30 00000000 098078d0 AcroPDF!DllUnregisterServer+0x18456
0153da34 6edb604c 2c4ce260 47247446 00000000 AcroPDF!DllUnregisterServer+0x14b22
0153da68 6edb61da 21aa1330 0153dab0 6f9dba95 AcroPDF!DllGetClassObject+0x1440a
0153da74 6f9dba95 09807954 274198cc 21a7c780 AcroPDF!DllGetClassObject+0x14598
0153dab0 6f9db9e5 21aa1330 6f9d99e9 00000001 mfc80!COleControlSite::~COleControlSite+0x9b [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occsite.cpp @ 94]
0153dab8 6f9d99e9 00000001 6f9dc12e 00000000 mfc80!COleControlSite::`scalar deleting destructor'+0x8
0153dac0 6f9dc12e 00000000 21a8f0d8 00000000 mfc80!COleControlSiteOrWnd::~COleControlSiteOrWnd+0xe [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp @ 162]
0153dad0 6f971fd8 21a9d720 21a8f0d8 05293461 mfc80!COleControlSite::DestroyControl+0x61 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occsite.cpp @ 374]
0153dadc 05293461 47263521 21a9d720 21a8f0c8 mfc80!CWnd::DestroyWindow+0x56 [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp @ 995]