United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6659113 Resources(Mem usage, Handles and GDI) is increasing with many printjob
6659113 : Resources(Mem usage, Handles and GDI) is increasing with many printjob

Details
Type:
Bug
Submit Date:
2008-02-05
Status:
Closed
Updated Date:
2010-12-03
Project Name:
JDK
Resolved Date:
2009-02-17
Component:
client-libs
OS:
windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Not an Issue
Affected Versions:
7
Fixed Versions:
1.3-pool

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
When a user tries to invoke printjob, resources(Mem usage, Handles and GDI) is increasing.

CONGIGURATION : 
 OS : WindowsXP(SP2, Japanese/English)
 JRE : 1.4.2_16/5.0u14/6.0u4/7b24

REPRODUCE : 
1. Open "task manager" and add the rows, "Mem usage", "Handle count" and "GDI objects"
2. Compile the attached test program, PT3.java
3. Invoke "java PT3"
4. Please watch the resources in Task Manager

NOTE:
 The attached program tries to invoke printJobs 10,000 times.
 The output of printer should be set to a fixed file.
 1. Open "printers and faxes"  in Control panel
 2. Click the existing printer and opne the properties
 3. Click "ports" tab
 3. Click "Add port.." button
 4. Select(high-light) "Local Port" in Printer Ports window and 
    click "New Port.." button
 5. Enter a file name (with full path name to the file) as port name.
   ex. D:\resource-leak-problem\dummy

                                    

Comments
WORK AROUND

attrib.setDialog(JobAttributes.DialogType.NATIVE);

in place of:

attrib.setDialog(JobAttributes.DialogType.NONE);
                                     
2008-03-12
EVALUATION

Customer is I guess using 
attrib.setDialog(JobAttributes.DialogType.NONE);
because of some background process and this is where GDI leak is. I have tried it with 
attrib.setDialog(JobAttributes.DialogType.NATIVE); it looks fine.

*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2008-03-12



Hardware and Software, Engineered to Work Together