PXC_NewDocument crashes

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
jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

PXC_NewDocument crashes

Post by jklein » Mon Apr 25, 2005 6:50 am

Hello,

we use the PDF-SDK in our own printing component to produce PDF output. Our printing component is used in several of our applications. With version 2.5 of the PDF-SDK everything was OK. Now we have upgraded to version 3.40.0077 of the SDK and now our printing component crashes in one of our applications, all other apps that are using it are working fine.
I have tracked down the problem to the point that execution of PXC_NewDocument is the reason for the later crash. It seems to me that some memory in our app is overwritten and then it crashes later. The PDF is created correctly and then it runs on the corrupt memory and crashes. Do you have changed your memory allocation in the new version or what could it be? I have no idea and no other hints for you (Sorry!). OS is Win XP and Serial No is PCS31-XXXXXXXXXXXXXXXXXX.

Greetings Juergen

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 » Mon Apr 25, 2005 7:40 am

Hi Jeurgen,

Please could you post the relevant code snippet from your project in as full a detail as you feel useful (if uploading a file - please zip first)

Also please explain what content you are converting to PDF and how large the file is - if possible please post an example of the pre-PDF content.

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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Mon Apr 25, 2005 8:44 am

Hi John,

here is a code snippet. You can see the init of the PDF-Library. The crash occures independent of the content of the PDF. It crashes if the only lines of code will be PXC_NewDocument and PXC_ReleaseDocument. The call of PXC_NewDocument is enough to crash the app later.

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 » Mon Apr 25, 2005 8:52 am

Thanks - will look into - but please could make sure all serial and licensing info is removed from your posts and code ?

Thanks - we dont want to give away licenses to the unprincipled do we ! :)
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

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 » Mon Apr 25, 2005 9:21 am

Hi

Could you please advise the 'stack' size using during compilation for this application ?

Has this been left at the 'default' in VS (reccomended)

Please see attached screeenshot :
Attachments
stack.zip
Stack setting
(30.95 KiB) Downloaded 99 times
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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Mon Apr 25, 2005 3:26 pm

Hi,

here a screenshot with my settings in VC6.
Attachments
Settings.zip
(16.36 KiB) Downloaded 112 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 » Tue Apr 26, 2005 9:34 am

Hi,

can you please compile again without any entry in the Base Address and see if that helps or provides more of clue - very strange problem this.
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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Tue Apr 26, 2005 9:49 am

Sorry, doesn't work. The only thing to get it to work ist to start the main app from the debug environment of VisualStudio 6 with the F5 key. This works with all apps compiled in release mode yet.

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 » Tue Apr 26, 2005 10:04 am

Hi Jeurgen, ,

Ok - then I am afraid we will need an example project source and the compiled exe (and any other dll's) from you to investigate - with any other supporting files.

Please zip and post (please make sure your licensing info is removed from all source files)

Can I ask if you can compile and use our examples ok ?

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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Tue Apr 26, 2005 11:52 am

Hi John,

you will need our whole ERP-Application to get it to work. We can ship you a Setup-CD or you can download it via FTP. But we need remote access to the computer you will install it so that we can show it to you, because the user interface of our application is all in German and it would be difficult for you to get it to work.

I can try your example code, but I'm not very optimistic to reproduce the bug, because it happens only in conjunction with this damned app.

Otherwise, is it possible to get some sourcecode from you to debug into it? We can sign a NDA.

Juergen

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 » Tue Apr 26, 2005 1:12 pm

Can I suggest you at least try our examples first to see if you can replicate there - if no go we will work out where to go from there.

The other option is to do as outlined in this FAQ message and post the files created - hopefully this may provide more insight.

http://www.tracker-software.com/forum/v ... .php?t=800

If still no go, please download debugview from the link below and start before starting your application - then run your app.

Once the error occurs - copy/paste or save the debug window info to a file and please post here.

DebugView (free)
http://www.sysinternals.com/ntw2k/utilities.shtml

Hopefully one of the above will provide some useful info to isolate the issue.

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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Wed Apr 27, 2005 8:00 am

Hi John,

Heureka, I've got it! As you remember in the code I have sent, we use the PDF-DLLs with LoadLibrary and call the PDF-Functions with a pointer to the function initialized with GetProcAdress. And that was the problem! If I call the functions directly and use the lib-files, it works.

Any idea what this could be?

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 » Wed Apr 27, 2005 10:39 am

Hi Juergen,

to be honest none at all - it should work in the original manner - but then without investigating all your code - it would be very hard to say for sure.
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

jklein
User
Posts: 9
Joined: Wed Feb 02, 2005 1:41 pm

Post by jklein » Wed Apr 27, 2005 3:09 pm

Now it is OK for us. Thank you for your efforts.

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 » Wed Apr 27, 2005 3:28 pm

Pleasure ;)
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