Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325143 - IllegalStateException unhandled by org.osgi.framework.BundleContext.ungetService(ServiceReference)
Summary: IllegalStateException unhandled by org.osgi.framework.BundleContext.ungetServ...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 13:53 EDT by Kirk Beitz CLA
Modified: 2020-09-04 15:27 EDT (History)
1 user (show)

See Also:
kirk.beitz: review?


Attachments
catch IllegalStateException thrown by BundleContext.ungetService() (1006 bytes, patch)
2010-09-13 13:53 EDT, Kirk Beitz CLA
kirk.beitz: review?
Details | Diff
log containing numerous IllegalStateException tracebacks from single run (25.48 KB, text/plain)
2010-09-14 00:36 EDT, Kirk Beitz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirk Beitz CLA 2010-09-13 13:53:13 EDT
Created attachment 178765 [details]
catch IllegalStateException thrown by BundleContext.ungetService()

recently, one time, upon quitting a debug-session, the error log collected a several "IllegalStateException" exceptions unhandled.  the log is will be attached.

in org.osgi.framework.BundleContext, the javadoc for ungetService() has two @throws tags, but the interface itself doesn't actually include the throws clauses.  i've submitted a suggestion to the osgi-dev mailing list to rectify this.

in the meantime, the attached patch catches the exception.

in org.eclipse.cdt.dsf.service.DsfServicesTracker, fListener is a service Listener that has a "catch" block in it's handler to deal with "RejectedExecutionException", and there's a comment that catching the throw is the same as not getting an exception for this unregister event.

the catch in the attachment is based upon the catch block in the cited instance.
Comment 1 Pawel Piech CLA 2010-09-14 00:13:23 EDT
Hi Kirk,
Could you still attach the full exception trace?
Thanks!
Comment 2 Kirk Beitz CLA 2010-09-14 00:36:47 EDT
Created attachment 178784 [details]
log containing numerous IllegalStateException tracebacks from single run