A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
Go Back  Xtreme Visual Basic Talk > > > A loaded PDF in AxAcroPDF crashes when closing my application


Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2009, 12:50 AM
DarkAngel DarkAngel is offline
Freshman
 
Join Date: May 2003
Location: Netherlands
Posts: 33
Unhappy A loaded PDF in AxAcroPDF crashes when closing my application


Hello,

Ii have a small application (in VB.NET 2008) which gives the user the option to open a PDF document. This document is stored on a mapped network drive and is loaded in to the AxAcroPDF Control.

When closing my application I get the following message

The instruction at "0x0700609c" referenced memory at "0x00000014". The memory could not be read.

I've been google-ing this error message, but seen only a lot of problems, but no solutions.

I also tried using the WebBrowser Control, but this gives the same error.

Any ideas?
__________________
Yesterday is history, Today is a gift, Tomorrow is a mystery
Reply With Quote
  #2  
Old 01-14-2009, 11:46 AM
Roger_Wgnr's Avatar
Roger_Wgnr Roger_Wgnr is offline
CodeASaurus Hex

Forum Leader
* Expert *
 
Join Date: Jul 2006
Location: San Antonio TX
Posts: 2,427
Default

Not real sure on this one (have had the error with programs but none that I have code for)

Make sure you are closing and releasing the PDF Object and the control objects before you close your application. I think (but may be wrong here) that the issue stems from the AXAcroPDF control attempting to access a memory pointer that clears when your program closes.

I have this error from time to time with PDF files that I launch from Lotus notes at work but if I close the PDF before I navigate from the note page I launched the PDF from then no problem.

Hope this helps.
__________________
Code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ~Martin Golding
The user is a peripheral that types when you issue a read request. ~Peter Williams
MSDN Visual Basic .NET General FAQ
Reply With Quote
  #3  
Old 02-26-2010, 02:00 AM
jigarchhadwa jigarchhadwa is offline
Newcomer
 
Join Date: Feb 2010
Posts: 2
Default Solution for the AxAcroPDF crashing when closing application

I just found the solution at the following link:
http://stackoverflow.com/questions/1...sing-problem-c

It uses the following code:
Code:
    [System.Runtime.InteropServices.DllImport("ole32.dll")] 
    static extern void CoFreeUnusedLibraries(); 
 
    private void Form2_FormClosing(object sender, FormClosingEventArgs e) 
    { 
        if (axAcroPDF1 != null) 
        {                                 
            axAcroPDF1.Dispose();                 
            System.Windows.Forms.Application.DoEvents(); 
            CoFreeUnusedLibraries();  
        } 
    }
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
 
A loaded PDF in AxAcroPDF crashes when closing my application
A loaded PDF in AxAcroPDF crashes when closing my application
 
-->