VPE-Preview crashes if a special printer is set as default

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

VPE-Preview crashes if a special printer is set as default

Postby Ralf » Tue Apr 18, 2017 2:14 pm

I have an odd behaviour: the program crashes, if I click on the "Print" button in the VPE-Preview Window. This behavior occurs only if a special printer is set as default (see below). If another printer (e.g. PDFCreator or Bullzip) ist set as default everything works fine.

VPE
  • My application is using VPE 6.10R1 (vpep3261.dll)
  • The trial version of VPE 7.10 (vpep3271.dll) crashes as well

Printer
  • Samsung Multifunction Xpress M267x 287x Series
  • Driver Version 3.13.12.05.23 (08.09.2016) - this seems to be the latest driver version

Operating System
  • Windows 7 Professional, 64 Bit, Service Pack 1
  • latest updates should be installed (last installed updates: 12.04.2017)

Is there something I can do to fix this problem? Is it an Issue of VPE or of the printer? And if it is a problem of the printer: are there any official documents about this behaviour (e.g. from Microsoft)?
Ralf
 
Posts: 3
Joined: Tue Apr 18, 2017 1:38 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby IDEAL Software Support » Wed Apr 19, 2017 1:37 pm

Of course it should not crash. It is a long time ago that we hear about such a problem. To make sure there are no side-effects with your application: If you run vpedemo.exe, which is shipped with VPE (also with the trial-version), does this work?

If it does not work, what Windows version and Service Pack are you using?
Is VPE used in the 32-bit version or the 64-bit version?
Did you check, if there is a newer version of the driver available?
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby Ralf » Thu Apr 20, 2017 9:47 am

The demo program seems to run fine.

So it is not a problem caused by VPE. I'm a bit helpless and I have no idea what can cause such a behaviour. There is no click event attached to that button. The application runs on a lot of different PCs without any problems.
I would appreciate any ideas.
Ralf
 
Posts: 3
Joined: Tue Apr 18, 2017 1:38 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby JudgeTerry » Thu Apr 20, 2017 1:58 pm

Ralf,

Do you have any files '*.PRS' in your runtime directory? If so, delete these files and try running your application again.

HTH,
Terry
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby IDEAL Software Support » Thu Apr 20, 2017 7:40 pm

Yes, the use of printer setup files (.prs), created by the method VPE.SetupPrinter() comes into mind.

This method stores printer driver specific private data. It is not necessarily portable between different printer driver versions / Windows versions (including 32-bit vs. 64-bit).
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby Ralf » Fri Apr 21, 2017 1:36 pm

Hello,

thanks for the hints.
I checked the application directory and couldn't find any .prs files. I also checked the source code and VpeSetupPrinter() isn't used anywhere.

I'm not able to narrow down the cause of the crash. There are some things happening before the VPE-Preview window is shown
1) the default device is set to an PDF-Printer via VpeSetDevice() (eg. "Bullzip PDF Printer")
2) VpePrintDoc() is called and the report is saved as an PDF (the PDF is successfully created)
3) VpePreviewDoc() (the report is shown and everything seems to be fine)
4) VpeSetDevice() is called again to reset the default printer to the old value before 1)

The crash seems to happen in VpePreviewDoc(). Pretty much the only information I get is an access violation in ntdll.dll.
Ralf
 
Posts: 3
Joined: Tue Apr 18, 2017 1:38 pm

Re: VPE-Preview crashes if a special printer is set as defau

Postby IDEAL Software Support » Fri Apr 21, 2017 2:05 pm

It is extremely unlikely that VPE crashes in VpePreviewDoc(), because this code is not attached in any way to a printer device. Make sure to use a debugger and locate the exact code position where it fails.

Second, change your code so that "Bullzip PDF Printer" is not used. The driver might be faulty (the name already sounds suspicious). For testing, use a different printer driver, best if you use one from HP. BTW: May I ask, why you are using a PDF printer driver, when VPE can itself export to PDF?
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 14 guests

cron