Access Violation xcpro35.dll

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

Access Violation xcpro35.dll

Post by luctussier » Thu May 04, 2006 8:58 am

I’ve got a bug that’s reminiscent of a memory leak. I keep getting the following error from xcpro35.dll : "Unhandled exception in proj.exe: 0xC0000005: Access Violation"

As I debug, the error usually happens around these lines, but I can’t say if this is a complete list. xcpro35.dll
10010F43 mov ecx,dword ptr [esi+8]
10011E56 mov edx,dword ptr [eax+4]
1001885E mov eax,dword ptr [ecx] ;; very often it’s this one
10028D76 cmp dword ptr [esi+14h],ebx

The attached file is the actual function call that causes the mentioned "Access Violation" error.

Please help if you have an idea.
Attachments
app_group.zip
fuction causing error
(917 Bytes) Downloaded 137 times

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu May 04, 2006 3:10 pm

Hi,

Whilst it is unlikely this is a memory leak - it is a concern that this issue has arisen.

Please provide a sample app which reproduces this problem (with source code and compiled - and all zipped) and a minimal set of the required data files.

Or, if this is not possible, a fully detailed step-by-step instruction of how to reproduce the problem - the problem could be in your code, in our code, in a broken pdf etc etc so we do need clear info on how to reproduce.

many thanks.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

still buggy

Post by luctussier » Wed May 10, 2006 5:54 pm

Unhandled exception in pdfbcomr.exe (dscrt30.dll): 0xC0000005: Access Violation.
>>00323FEC mov edx,dword ptr [esi]
>>('App.cpp'; line-52)PXCp_ReadDocumentW(*p_PDF_Doc, wfName, 0);


OK, I've got the code to constantly give me "Access Violation". I'm trying to loop through the pages. Could the error come from mixing PXC(3.0) and PXCp(3.5) API calls. Then again it could come from a pointer misuse. I've simplified the program down, so you can replicate the Error.

Should I be using (PXC_NewDocument and PXC_ReleaseDocument) or (PXCp_Init and PXCp_Delete) ?
What about SetFileName, has it been replaced with PXCp_ReadDocumentW ?

If it helps you to debug the code I’m working with MS Visual C v6.0. Win XP (pro SP2...). If you need any other info, let me know.

thanks
Attachments
bug.zip
simplified code for error replication.
(2.46 MiB) Downloaded 137 times

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu May 11, 2006 11:30 am

Hi,

a quick check of your application does indeed show that the issue is code related - specifically you are using handles of one library (i.e.the pxclib30 library) within another (i.e. the xcpro35 library) - this is not allowed.

In broad terms pxclib30 is used for the creation of new pages/files and xcpro35 is used to modify/merge files - you cannot mix in this fashion.

If you have any specific questions - please do come back.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

bitter enimies: pxclib30, xcpro35

Post by luctussier » Thu May 11, 2006 2:09 pm

I would like to modify the pages of a document. That sounds like I should use xcpro35. However, the function to add an image to a page is in the pxclib30 set (PXC_AddImage, PXC_PlaceImage)

If the pxclib30 set will let me modify an existing file, how do I get a document handle that’s associated to my pre-existing file? It seems that SetFileName() used to be the correct method. Should I be using the PDFXCp(3.0) set?

Should I save all images to a temporary pdf file, and then copy them from one document to another? (This idea seems to be quite convoluted.)

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu May 11, 2006 4:46 pm

Are you trying to add this image to an existing page or a new page in an existing file ?

If the former - your must use the xcpro35 watermark function (PXCp_AddWatermark) to add the image to speicfic co-ordinates on the page (there is anothe rway using low level API - but you would have know the PDF format like a 'guru' to so so).

If you are creating a new page :

use pxclib30 to create any additional content (except digital signatures and watermarks) and then combine with the existing pdf using the xcpro35 library.

This is the only valid method to add new pages to an existing pdf.

Also one tip - better to create one pdf with all required content and then combine it - to the existing PDF using one or two function call's (yes, more complex arguments) this will produce a much smaller pdf than adding new content in several steps

We will ad the ability to do this in Memory when Version 4 is progressed later this year.

HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

string search and replace

Post by luctussier » Fri May 12, 2006 1:29 pm

Tracker Support wrote:Are you trying to add this image to an existing page or a new page in an existing file ?
I intend to add the images to pages from an existing file. I’m far from being a pdf guru. If there’s a site (or even book) for beginners that you can recommend, let me know. I believe that would help me understand better some of these APIs. Also can you point me to the API(s) that would allow me to find and replace a string?

About the APIs, I have some questions regarding the help files and apparently undocumented APIs. In ..\CExamples\TestPro35, I’ve seen some APIs that aren’t in the help file (XCPro35Help.chm). They include functions like IMG_PageDestroy, PXCp_AddTextAnnotationA, PXCp_ET_Finish, PXCp_ET_GetCurrentComposeParams, PXCp_ET_GetPageContentAsTextW, PXCp_ET_Prepare, and PXP_TETextComposeOptions. Is there some resource that could help me understand these APIs? Should I start a new thread to ask about them?

Many thanks
Jim

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri May 12, 2006 2:28 pm

Hi,

Firstly - apologies - seems the SDK was uploaded recently with the older XCPRO35.CHM - rather than the latest - you can download the correct and updated one detailing the required functions, with the exception of those beginning IMG... - these are detailed in our Image-XChange SDK - as it resides in that SDK - but may be called by XCPRO35 - if specified in the XCPRO35.CHM specifically

Latest Help
http://www.tracker-software.com/XCPro35Help.zip

With regards text replacement - I am afraid this really does require a very high degree of familiarity and competence with the PDF format and the use of the Low level API's detailed in XCPRO35 - and requires a PDF-XChange PRO SDK license (all low level API's and digital Signature use do) - further. regrettably we cannot not provide assistance in the use of the Low Level API as the use of is far too complex and this is stated liberally within the help files.

A far simpler means of replacing text is to apply a watermark containing text over the co-ordinates of the text you wish to replace -as we do in the example for re-numbering pages.

You can read more about the PDF format as a start - using Adobe's PDF reference manuals available free from the Adobe site

http://partners.adobe.com/public/develo ... rence.html
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply