Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - DLL Error while trying to generate an image
  FAQ FAQ  Forum Search   Register Register  Login Login

DLL Error while trying to generate an image

 Post Reply Post Reply
Author
Message
wjbons View Drop Down
Beginner
Beginner


Joined: 17 Jun 10
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote wjbons Quote  Post ReplyReply Direct Link To This Post Topic: DLL Error while trying to generate an image
    Posted: 12 Oct 11 at 9:10AM
Sometimes I get an error while trying to generate a image from a loaded pdf document
 
ERROR:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 
Error occures at the line which is bold.
I use the 8.11 version (.Net)
 
Anybody an idea what could be wrong with this??
 
    Public Function RenderPageToString(ByVal DPI As Integer, ByVal Page As Integer, _
        ByVal Options As Integer) As Byte()
      If (dll Is Nothing) Then
        Return New Byte(-1) {}
      Else
        Dim data As IntPtr = dll.QuickPDFRenderPageToString(instanceID, DPI, Page, Options)
        Dim size As Integer = dll.QuickPDFAnsiStringResultLength(instanceID)
        Dim result As Byte() = New Byte(size - 1) {}
        Marshal.Copy(data, result, 0, size)
        Return result
      End If
    End Function


Edited by wjbons - 12 Oct 11 at 9:11AM
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 11 at 2:27PM
This is most likely related to the particular PDF file you are trying to render.  Can you please open a support case via http://www.quickpdflibrary.com/support/support-query.php and send us the PDF file in question.
Back to Top
wjbons View Drop Down
Beginner
Beginner


Joined: 17 Jun 10
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote wjbons Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 11 at 3:40PM
It occured twice until now in 3 days while working (developing and testing).
It is possible that there would be 2 asynchrone processes reading a pdf file.
 
Is there a possibility that when loading the dll twice in different threads that they can cause problems?
For example when they both are reading the pdf doc at the same time (async)....
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 11 at 7:19PM
Hi!

I've read here in the forum more than once that QuickPDF isn't threadsafe.
Don't know if this is still valid for the current version?
I think it's not possible for two instances of QuickPDF calling/opening the same pdf-document.

Cheers, Ingo
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store