Bug 150865 - Opening/Closing of the WS wizard leaks 2 color objects
Summary: Opening/Closing of the WS wizard leaks 2 color objects
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.ws (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.1 M151   Edit
Assignee: Seng Phung Lu CLA
QA Contact: Chris Brealey CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 150867
  Show dependency tree
 
Reported: 2006-07-17 16:19 EDT by Jeffrey Liu CLA
Modified: 2006-09-14 15:43 EDT (History)
1 user (show)

See Also:


Attachments
jst.ws.consumption.ui and jst.ws.creation.ui plugin patch (4.80 KB, patch)
2006-07-26 11:01 EDT, Seng Phung Lu CLA
no flags Details | Diff
consumption.ui and creation.ui plugin patch (5.95 KB, patch)
2006-07-26 11:27 EDT, Seng Phung Lu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Liu CLA 2006-07-17 16:19:50 EDT
Build: Callisto 3.2

To produce:

1. Install Sleak (http://studiodev.torolab.ibm.com/cgi-bin/viewcvs.cgi/~checkout~/main-home/information/sleak/sleak.html)

2. Open/Cancel the WS wizard

3. Take a snapshot using Sleak

4. Open/Cancel the WS wizard

5. Diff with Sleak

6. Two Color resource shows up, they are:

java.lang.Error
	at org.eclipse.swt.graphics.Device.new_Object(Device.java:753)
	at org.eclipse.swt.graphics.Color.<init>(Color.java:80)
	at org.eclipse.jst.ws.internal.creation.ui.widgets.ServerWizardWidget.addControls(ServerWizardWidget.java:430)
	at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.createControl(SimpleWizardPage.java:50)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1046)
	at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1038)

and

java.lang.Error
	at org.eclipse.swt.graphics.Device.new_Object(Device.java:753)
	at org.eclipse.swt.graphics.Color.<init>(Color.java:80)
	at org.eclipse.jst.ws.internal.consumption.ui.widgets.WebServiceClientTypeWidget.addControls(WebServiceClientTypeWidget.java:298)
	at org.eclipse.jst.ws.internal.creation.ui.widgets.ServerWizardWidget.addControls(ServerWizardWidget.java:519)
	at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.createControl(SimpleWizardPage.java:50)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1046)
Comment 1 Jeffrey Liu CLA 2006-07-17 16:20:14 EDT
Should be easy enough to fix in 1.5.1
Comment 2 Chris Brealey CLA 2006-07-17 22:51:24 EDT
Seng, would you please handle this? Thanks - CB.
Comment 3 Jeffrey Liu CLA 2006-07-18 12:22:52 EDT
Same for the preference page.
Comment 4 Seng Phung Lu CLA 2006-07-26 10:20:31 EDT
I don't see any Color objects being used in the Preferences pages of the Web service plugins. Could you provide more information for this?

Thanks.
Comment 5 Jeffrey Liu CLA 2006-07-26 10:53:16 EDT
There's one WS preference page that looks exactly like the first page of the WS creation wizard. Fixing the leak in the wizard may also fix the leak in the preference page if they use the same widget.
Comment 6 Seng Phung Lu CLA 2006-07-26 11:01:34 EDT
Created attachment 46818 [details]
jst.ws.consumption.ui and jst.ws.creation.ui plugin patch

Uses the system colors rather than new Color objects which have to be disposed.
Comment 7 Seng Phung Lu CLA 2006-07-26 11:04:20 EDT
This bug is ready to be picked up.  

By CC: Peter, if you'd like to review the bug and commit it, that'd be appreciated since you provided me with the solution idea.  And you're a committer now!  =)

Thanks!
Comment 8 Seng Phung Lu CLA 2006-07-26 11:27:13 EDT
Created attachment 46821 [details]
consumption.ui and creation.ui plugin patch

Added the header information with bug# etc.
Comment 9 Peter Moogk CLA 2006-07-26 13:53:17 EDT
This patch has been reviewed and committed.
Comment 10 Kathy Chan CLA 2006-07-26 20:57:51 EDT
Released to HEAD and R1_5_maintenance as v200607270039.  This will be in the
07/28 WTP 1.5.1 M-build.
Comment 11 Jeffrey Liu CLA 2006-09-14 15:43:48 EDT
Verified.
Comment 12 Jeffrey Liu CLA 2006-09-14 15:43:58 EDT
Close.