Bug 513614 - Remove invalid e4 handlers to avoid unnecessary exceptions in the log
Summary: Remove invalid e4 handlers to avoid unnecessary exceptions in the log
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.16 M1   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 560417 561602 (view as bug list)
Depends on: 544871
Blocks: 561814 560385
  Show dependency tree
 
Reported: 2017-03-14 04:37 EDT by Gunnar Wagenknecht CLA
Modified: 2020-04-06 08:03 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2017-03-14 04:37:30 EDT
I have about 7 errors like this in my error log upon *every* start:

----
eclipse.buildId=4.7.0.I20170308-2000
java.version=1.8.0_102

org.eclipse.e4.ui.workbench
Error
Tue Mar 14 09:29:59 CET 2017
Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.preference.spy/org.eclipse.e4.tools.preference.spy.handler.RemoveAllHandler
----


I suspect that this might be related to the application model referencing old stuff I removed/deinstalled.


There are a few issues with this:

- What is the error? 
I have to suspect what's broken. It's not clear from the message.

- Why is it an error? 
Assuming I uninstalled/removed something - the workbench should be confused about this. It might warrant a warning that something could not be found and this warning should be logged at most once. After that it should be ignored or the model cleaned up.


Please remove the error and replace it with a warning that's only logged once. If my suspicion is true, is there a bug already for cleaning up the model after deinstalling/removing things?
Comment 1 Thomas Schindl CLA 2017-03-14 04:45:41 EDT
It's a deliberate choice that we don't remove stuff like Perspectives, ... if you uninstall a plugin - dateing even back to the 3.x days!

The error you present although looks like a MHandler who indeed could be cleaned up, the problem is that I think spies are contributed to the IDE through pure e4 technology so the only possible solution would be that the spy removes it's contribution on shutdown.

We once also thought about a way for contributions to be marked as volatile so that we don't persist those but we never implemented this
Comment 2 Gunnar Wagenknecht CLA 2017-03-14 05:34:53 EDT
Thanks for helping identifying the error. Are there bugs/feature requests open for those? I'd propose to keep this one focused on error handling - which is confusing for users.
Comment 3 Ed Willink CLA 2017-09-08 05:20:59 EDT
I also get 7 when I start a nested EClipse, but none of them look optional like "spy"

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.354
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateElementIdsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateLabelsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateAttributesHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.RepairDuplicateItemsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.UnmarkItemsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.AutosizeColumnsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-09-08 10:19:08.356
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.ResetToDefaultHandler
Comment 4 Lars Vogel CLA 2018-06-15 03:11:18 EDT
Simon, please extend your cleanup add-on to remove also invalid model-addons and handlers.
Comment 5 Lars Vogel CLA 2018-06-15 03:22:54 EDT
(In reply to Lars Vogel from comment #4)
> Simon, please extend your cleanup add-on to remove also invalid model-addons
> and handlers.

As discussed please move the parsing of the model for valid data into a thread (CompletableFuture comes to mind) to avoid the startup costs for the check. Only if removals are necessary we should trigger that in the main thread, preferrable via a job.
Comment 6 Eclipse Genie CLA 2018-06-18 06:48:49 EDT
New Gerrit change created: https://git.eclipse.org/r/124667
Comment 7 Lars Vogel CLA 2019-02-19 03:32:35 EST
Mass change, please reset target if you still planning to fix this for 4.11.
Comment 8 Lars Vogel CLA 2019-08-09 12:38:26 EDT
e4 add-ons and handlers will not be persisted anymore at shutdown. Please reopen if you still can reproduce with tomorrows I-Build and a NEW workspace. Rolf, is currently working on additional cleanups but new workspaces with the new build should not have this problem anymore.
Comment 9 Alexander Veit CLA 2019-12-19 02:36:05 EST
The errors persist in Eclipse 2019-12. 7 after each start.

!SESSION 2019-12-19 08:32:49.680 -----------------------------------------------
eclipse.buildId=4.14.0.I20191210-0610
java.version=1.8.0_202
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data D:\prj\fb-03\workspace

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.507
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateElementIdsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.509
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateLabelsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.MarkDuplicateAttributesHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.RepairDuplicateItemsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.UnmarkItemsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.511
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.AutosizeColumnsHandler

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.511
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.ResetToDefaultHandler
Comment 10 Lars Vogel CLA 2019-12-19 05:55:36 EST
(In reply to Alexander Veit from comment #9)
> The errors persist in Eclipse 2019-12. 7 after each start.
> 
> !SESSION 2019-12-19 08:32:49.680
> -----------------------------------------------
> eclipse.buildId=4.14.0.I20191210-0610
> java.version=1.8.0_202
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
> Framework arguments:  -product org.eclipse.epp.package.jee.product
> Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product
> org.eclipse.epp.package.jee.product -data D:\prj\fb-03\workspace
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.507
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.MarkDuplicateElementIdsHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.509
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.MarkDuplicateLabelsHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.MarkDuplicateAttributesHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.RepairDuplicateItemsHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.510
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.UnmarkItemsHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.511
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.AutosizeColumnsHandler
> 
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2019-12-19 08:32:52.511
> !MESSAGE Unable to retrieve the bundle from the URI:
> bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.
> internal.handlers.ResetToDefaultHandler

We currently do not fix "older" e4 tools installation. New e4 tools installation will not persist anymore. If you are OK with loosing your latest UI changes, you could start Eclipse with the -clearPersistedState flag. If you afterwards install latest e4 tools and uninstall them you should not see these errors.

Removing old broken addons and handlers is planned to be done via Bug 513614. If you need this, please comment in this bug. I started to work on this yesterday and it is not a lot of work to finish this.
Comment 11 Lars Vogel CLA 2020-01-06 07:19:44 EST
Will work on this based on Simons patch and Bug 558410.
Comment 12 Rolf Theunissen CLA 2020-02-21 07:10:35 EST
Lars can you update the Target Milestone on this one?
Comment 13 Lars Vogel CLA 2020-02-25 06:31:06 EST
*** Bug 560417 has been marked as a duplicate of this bug. ***
Comment 14 Lars Vogel CLA 2020-03-31 04:49:36 EDT
*** Bug 561602 has been marked as a duplicate of this bug. ***
Comment 15 Eclipse Genie CLA 2020-03-31 05:04:31 EDT
New Gerrit change created: https://git.eclipse.org/r/160228
Comment 17 Lars Vogel CLA 2020-04-06 08:03:11 EDT
Invalid handlers are now removed from the application model. You should see errors only once at startup, the removal is done asynchrone after startup to avoid blocking startup. The same logic should also be done for add-ons, I moved that out of this bug to Bug 561814.