Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 475857

Summary: ProgressCollector and UploaderWidget are lacking isDisposed() check
Product: [RT] RAP Reporter: Frank Jakop <frank.jakop>
Component: RWTAssignee: Project Inbox <rap.incubator-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Daniel.Ebert, mknauer
Version: 2.3   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/54658
https://git.eclipse.org/c/rap/org.eclipse.rap.git/commit/?id=ad0aa97d1d9f93013a76dcf607dda3988db5e9b8
Whiteboard:
Attachments:
Description Flags
Additional checks for isDisposed() none

Description Frank Jakop CLA 2015-08-26 01:36:48 EDT
In FileUpload we're encountering some strange "widget is disposed" exceptions.
We looked into the source and found some locations which are lacking the usual "if(!isDisposed()) ...".

org/eclipse/swt/internal/widgets/ProgressCollector:resetToolTip()
org/eclipse/swt/internal/widgets/UploaderWidget:dispose()

It's in streams/2.3 as well as in master.

We'd like to push this changes to gerrit, but the documentation how to register and get to it seems to be hidden very well.
Can you help me there?
Comment 1 Frank Jakop CLA 2015-08-26 02:20:57 EDT
Created attachment 256117 [details]
Additional checks for isDisposed()
Comment 2 Markus Knauer CLA 2015-08-26 08:37:18 EDT
(In reply to Frank Jakop from comment #0)
> We'd like to push this changes to gerrit, 

That's great!

> but the documentation how to register and get to it seems 
> to be hidden very well.

Okay, not so great :(

> Can you help me there?

Yes, we can certainly help here.

The 'Contributing via Git' documentation at [1] should be a good starting point. Most RAP related projects are available in Gerrit [2], the remaining RAP Incubator projects are in Git [3].

Hope that helps...

[1] https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#via_Gerrit
[2] https://git.eclipse.org/r/#/admin/projects/?filter=rap%252F
[3] http://git.eclipse.org/c/rap/
Comment 3 Eclipse Genie CLA 2015-08-27 03:52:32 EDT
New Gerrit change created: https://git.eclipse.org/r/54658
Comment 4 Frank Jakop CLA 2015-08-27 04:03:24 EDT
I submitted a gerrit changeset for master, but I was not able to get it into streams/2.3 git repo, because fileupload was still incubator in 2.3 and incubator is not controlled by Gerrit.
Comment 5 Markus Knauer CLA 2015-08-27 05:59:04 EDT
(In reply to Frank Jakop from comment #0)
> org/eclipse/swt/internal/widgets/UploaderWidget:dispose()

I had a quick look into the master branch; in UploaderWidget:dispose() we check !fileUpload.isDisposed() first which should be sufficient in my opinion.

What else could happen? Someone could call dispose() first, and submit() second. In that case the caller would get a widget-disposed-error which sounds correct, too. I wouldn't change anything in that class, and as far as I can see you didn't propose any changes to it in your Gerrit change, too. I just want to make sure that this is intentional.
Comment 6 Daniel Ebert CLA 2015-08-27 11:57:12 EDT
Frank(and i) made that change based on an old branch (0.6.0-SNAPSHOT) where the !fileUpload.isDisposed() hasnt been there.
Apparently UploaderWidget.dispose has already been fixed, so we dont see a diff to master.
Comment 8 Ivan Furnadjiev CLA 2015-09-01 03:55:13 EDT
Fixed.