Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Question about "deferred events"
Question about "deferred events" [message #735943] Thu, 13 October 2011 07:27 Go to next message
H.ORTIZ  is currently offline H.ORTIZ Friend
Messages: 22
Registered: July 2009
Junior Member
Hi,

My SWT application (running on Suse 11) crashed because of a "widget is disposed" problem.

Looking at the code, I didn't see any reason why the widget could be disposed at this point.

Looking at the stack trace, I saw that the original event came from the method "runDeferredEvents" of the Display class.

Does that mean that the original event was "queued" for one or more reasons and when it got processed the attached widget was already disposed ?

If yes, does this mean also that I have to check that every widget "is not disposed" before using it ?

Thanks
Re: Question about "deferred events" [message #740513 is a reply to message #735943] Tue, 18 October 2011 15:38 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
> Does that mean that the original event was "queued" for one or more
> reasons and when it got processed the attached widget was already
> disposed ?

Yes, SWT sends some of its events like this in order to improve event
ordering consistency between its platforms. However even a queued event
will not be sent for a disposed widget. I assume that you're receiving
this event from a non-disposed widget, and are then trying to access
another widget that has just become disposed? What type of event are
you receiving? Widget.isDisposed() checks are sometimes needed, but it
should be clear to see why the widget you want to use is disposed (don't
just fall back on an added Widget.isDisposed()). If this varies between
platforms (does it?) then you could be seeing an swt platform inconsistency.

Grant
Previous Topic:OS X: launcher inside .app
Next Topic:'No more handles' SWT Exception
Goto Forum:
  


Current Time: Fri Apr 26 00:44:03 GMT 2024

Powered by FUDForum. Page generated in 0.03177 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top