Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I am getting the exact same error that only occurs in Reader 9. I have a WebBrowser component (not using Acrobat SDK at all) within a form that displays PDFs and my application crashes on exit. Since this problem has occurring for more then a year, I submitted a bug to Adobe. Hopefully it will be fixed soon.
Igor
Copy link to clipboard
Copied
Copy link to clipboard
Copied
(vmoreau) THANKS A LOT !! YOU SAFED ME 😉
I just had to swap the browser dispose call and the Frr Unusued Libraries call:
[System.Runtime.InteropServices.DllImport("ole32.dll")]
static extern void CoFreeUnusedLibraries();
protected override void OnFormClosed(FormClosedEventArgs e)
{
base.OnFormClosed(e);
// I set usedAcrobat to true if I open a PDF in my application
if (usedAcrobat)
{
webBrowser.Visible = false;
webBrowser.Navigate("about:blank");
while (webBrowser.IsBusy)
{
Application.DoEvents();
}
webBrowser.Dispose();
CoFreeUnusedLibraries();
}
}
This definitely works, I thought as well, that the reader somehow talks back after closing, but didn't know about CoFreeUnusedLibraries. Thousand thanks again
Copy link to clipboard
Copied
My colleague and I are both using Adobe Acrobat 8 Professional. This similar error was happening to my colleague while viewing a specific pdf on a Sharepoint site. I tried to reproduce the error on my machine and I couldn't--I did not get the error.
Today we were testing it on his machine to try to solve his problem and found the answer!
When a file name had the letter "I", a space, then the letter "S", we got the error.
For example:
I Summary.pdf gave the error. (due to the "I" [space] "S")
I_Summary.pdf did NOT give the error.
So in Sharepoint, we simply added an underscore to the filename and the error went away.
Weird...
Copy link to clipboard
Copied
Another thing to try is to run the Microsoft Office Diagnostics tool. That fixed another problem I was having with that error.
Go to Start, Programs, Microsoft Office, Microsoft Office Tools, Microsoft Office Tools Diagnostics.
Copy link to clipboard
Copied
The same error in my application since AdobeReader 9 is installed. The error occurs sometimes when the application is closed, and it happens only when a pdf with font(s) has been loaded, the error doesn't occur in AdobeReader 8. I make use of the AdobeReader activex (uses AcroPDFLib_TLB in Delphi 7). Try..Except..End in the destructor doesn't help.
Copy link to clipboard
Copied
Here is my experience with this issue:
In the Adobe Acrobat 8.1 and 9.1 SDKs, the BasicIacOCXCS project is meant to demonstrate, in C#, proper use of the AxAcroPDFLib.AxAcroPDF class, which makes the reader available as an activeX control.
If I open this project in either SDK, and in the project property pages, I mark the "Enable unmanaged code debugging" check box, often enough I can run the app, load a pdf, and crash on exit with:
Unhandled exception at 0x0700609c in BasicIacOCXCS.exe: 0xC0000005: Access violation reading location 0x00000014
The call stack looks like this:
>BIB.dll!0700609c()
[Frames below may be incorrect and/or missing, no symbols loaded for BIB.dll]
BIB.dll!07006184()
BIB.dll!070064db()
msvcr80.dll!78132bd9()
ole32.dll!775057b3()
ole32.dll!775057c8()
mscorwks.dll!79f9e0bd()
mscorwks.dll!79f9e024()
mscorwks.dll!79f4c7d9()
mscorwks.dll!79ef004e()
mscoree.dll!79007c24()
kernel32.dll!7c816d4f()
kernel32.dll!7c8399f3()
After this crash, the app is still running, and so visual studio can't rebuild this code until the IDE is closed, which causes the app to close, and then reopenned.
If I unmark the "Enable unmanaged code debugging" checkbox, the app does not crash (in my experience), which tells me that the unmanaged exception is ignored by visual studio, and all is "well".
What I get out of all this, is that Adobe's BIB.dll, where blocks of memory are allocated using a custom memory management system, is crashing occasionally when it is time to exit. It is doing this whether or not the IDE is paying attention (debugging unmanaged code or not).
The application to which I wanted to add the ActiveX control is written in managed C++. In that environment, the exception is never ignored like it is in the C# environment. There, the way to see the call stack is to set the "Debugger Type" in the Debugging section of the project properties on the startup project from "Auto" to "Mixed". But even when it is set to Auto, the exception makes itself known with a dialog box informing me of the access violation, and telling me to click ok to terminate the application.
This seems to be quite an old issue, though it is new to me.
I have tried using CoFreeUnusedLibraries, but have caused an occasional AccessViolation in the process, which is no better to me than an occasional unmanaged exception elsewhere.
Igor, did your request go anywhere with Adobe? Does anyone have an update on any advice Adobe has for this?
Copy link to clipboard
Copied
On my .Net application, I put this code to solve this problem on exiting the program:
Private Sub BatchOrganizerForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If Me.pdfViewFile IsNot Nothing Then
System.Threading.Thread.Sleep(2000)
Me.pdfViewFile.Dispose()
Application.DoEvents()
End If
End Sub
I think the problem is you must give time to dispose first the pdf control before the application.
This code worked for me. I hope this helps.