JDK-4851255 : PIT: Printing Error dialog is shown twice when no printer is installed (Win32)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2_02,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-04-21
  • Updated: 2004-06-09
  • Resolved: 2003-06-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_05 05Fixed
Description
A printing error dialog is shown asking the user to install a printer when the user tries to popup the print dialog without having a printer installed in the system. The error message tells the user to install the printer first before trying any print operation. In the PIT build, this dialog is shown twice when PrinterJob.printDialog() is called. I tested this with Tiger build 1.5.0-b04 and this dialog is shown only once when printDialog() method is called. I tested this on Windows 2000.  

Here is the version of the PIT build:
java version "Build:15-Apr-03@19:54.tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build Build:15-Apr-03@19:54.tiger)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b04, mixed mode)

How to reproduce:
I have attached a sample code which would popup a print dialog by calling PrinterJob.printDialog(). Execute it on a windows system which does not have a printer installed in it. I have also attached the screenshot of the dialog shown.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_05 generic tiger FIXED IN: 1.4.2_05 tiger INTEGRATED IN: 1.4.2_05 tiger tiger-b05 tiger-b08 VERIFIED IN: 1.4.2_05 tiger
2004-07-08

EVALUATION --------------------- Caused by calling InitPrintDialog which displays the error message and since this function has no return value, we were not able to bail out before reaching the next printDlg function. ###@###.### 2003-04-22 --------------------- Verified for 1.4.2_05 b02 on Win XP Pro Fix: Modified InitPrintDialog to return BOOL and checked this return value in places where it's called to determine whether to bail out or not. ###@###.### 2003-04-30 ------------------------------------ ###@###.### 2004-06-09
2003-04-30