United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4851255 : PIT: Printing Error dialog is shown twice when no printer is installed (Win32)

Details
Type:
Bug
Submit Date:
2003-04-21
Status:
Closed
Updated Date:
2004-06-09
Project Name:
JDK
Resolved Date:
2003-06-02
Component:
client-libs
OS:
windows_2000
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2_02,5.0
Fixed Versions:
1.4.2_05 (05)

Related Reports
Backport:

Sub Tasks

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
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
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



Hardware and Software, Engineered to Work Together