Community
Participate
Working Groups
It looks like both suppliers are sending events although the context holding them is disposed additional the UIEventObjectSupplier does not check at all of the receiver is valid
Pushed JUnit-Tests to reproduce the problem at https://git.eclipse.org/r/23163 - no idea for a fix yet
Initial findings is that IRequestors for objects defined using extended object suppliers are not disposed because only weaklisteners are informed about the disposal. Generally speaking this must not be a problem but if the object only makes use of ExtendedObjectSuppliers the injector might never get informed about the context disposal. In case one appropriately adds activeComputations & activeRATs in the list of informed objects and we explitly clear the object ref in the Requestor we don't rely on GC to clean up the weak reference. I've pushed an updated gerrit patch - please note that the DI System is a very sensible so I'd like your input on this!
Something is seriously broken in the current code base, when using extended-object-supplier and NO other *tracked* value (field/method) is injected @PreDestroy is not called. The patch fixes this situation as well - I've updated the test suite to show the problem in action. This more and more turns out to be a really serious problem in our DI-Container which needs to be fixed to avoid leaks. I'm ugrading this to blocker - the only thing I'm uncertain yet is if it is a good idea to objectRef.clear() call in the Requestor another solution would be to still rely on GC and: a) add isDisposed() API to PrimaryObjectSupplier check and make ContextObjectSupplier return false when to context is disposed b) modify the isValid() check to take the primarySupplier state into account
There's a 2nd gerrit review involved for platform-ui to check the if the requestor is still valid and unsubscribe otherwise https://git.eclipse.org/r/23174
moveing to runtime - although there are changes to UIEventTopicSupplier as well!
Maybe we can review these at EclipseCon and get them in. PW
This is the same fix that's already in the (non-UI) EventObjectSupplier. Thanks Tom — I had hit this before but couldn't remember the circumstances.
(In reply to Brian de Alwis from comment #7) > This is the same fix that's already in the (non-UI) EventObjectSupplier. > Thanks Tom — I had hit this before but couldn't remember the circumstances. the real problem is https://git.eclipse.org/r/23163
The UIEventSupplier change is merged to master - with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=509410df493541d532bceda70924b17e83f47fb4 Still the real problem is in https://git.eclipse.org/r/23163 and the ContextSupplier / Requestor - run the JUnit-Tests to see it in action ;-)
(In reply to Thomas Schindl from comment #8) > > the real problem is https://git.eclipse.org/r/23163 Released as http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=7882f2ee45c9b84df939928d4c0d13bceb0e0701 Thanks Tom PW
(In reply to Paul Webster from comment #10) > (In reply to Thomas Schindl from comment #8) > > > > the real problem is https://git.eclipse.org/r/23163 > > Released as > http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/ > ?id=7882f2ee45c9b84df939928d4c0d13bceb0e0701 > > Thanks Tom > > PW This caused 2 compile warnings in the official builds. Fixed with http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=3c1a170e38995cd19bcc7d1a64f92c0c281adec8 and also added the missing copyright notice.
In 4.4.0.I20140428-2000 PW