Community
Participate
Working Groups
BuildId: e4 M4 candidate (I20101209-1653, SDK I20101209-1744) With my e4 app, I get an assertion error raised with a pure e4 app. The assertion stems from the BindingPersistence.readActiveScheme() trying to fetch the PlatformUI pref store (PlatformUI.getPreferenceStore()). This call delegates to o.e.ui.i.PrefUtil which fails as its uiCallback has not been set -- it is only set by org.eclipse.ui's UIPlugin. I think this *may* be relatively benign. At least, execution mostly seems to work. But the exception is actually caught and reported by the injector, so much of the BindingToModelProcessor code isn't run. Workaround: for now I've created a simple bundle that mimics UIPlugin's actions, and set it to auto-start at level 1. Daemon Thread [Thread-0] (Suspended (exception AssertionFailedException)) Assert.isNotNull(Object, String) line: 85 Assert.isNotNull(Object) line: 73 PrefUtil.getAPIPreferenceStore() line: 64 PlatformUI.getPreferenceStore() line: 187 BindingPersistence.readActiveScheme(IConfigurationElement[], int, IMemento, BindingManager) line: 378 BindingPersistence.reRead() line: 1380 BindingPersistence.read() line: 1284 BindingToModelProcessor.process(MApplication) line: 60 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 MethodRequestor.execute() line: 52 InjectorImpl.invokeUsingClass(Object, Class<?>, Class<Annotation>, Object, PrimaryObjectSupplier, PrimaryObjectSupplier, boolean) line: 226 InjectorImpl.invoke(Object, Class<Annotation>, PrimaryObjectSupplier) line: 196 ContextInjectionFactory.invoke(Object, Class<Annotation>, IEclipseContext) line: 86 ModelAssembler.runProcessor(IConfigurationElement) line: 219 ModelAssembler.processModel() line: 87 ResourceHandler.loadMostRecentModel() line: 233 E4Application.loadApplicationModel(IApplicationContext, IEclipseContext) line: 323 E4Application.createE4Workbench(IApplicationContext, Display) line: 191 E4Application.start(IApplicationContext) line: 116 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 369 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386
BindingPersistence should only be running in a compat layer app. BindingToModelProcessor is the compat extension point to model translator. That's being contributed from org.eclipse.ui.workbench (compat), is that included in your e4 app (or simply in your launch config)? PW
(In reply to comment #1) > BindingPersistence should only be running in a compat layer app. > BindingToModelProcessor is the compat extension point to model translator. > That's being contributed from org.eclipse.ui.workbench (compat), is that > included in your e4 app (or simply in your launch config)? I am including org.eclipse.ui.workbench to pull in some useful classes. But now that I look through the code, it seems it was just to pull in org.eclipse.ui.services.IDisposable (which I realize is used by old code that predates @PreDestroy), and org.eclipse.ui.preferences.ScopedPreferenceStore. I've dropped all refs to o.e.ui.workbench and made a copy of ScopedPreferenceStore, and all is now well.
*** Bug 332352 has been marked as a duplicate of this bug. ***
You can only include o.e.ui.workbench if you are running the compatibility layer, as the extensions it contributes will be processed as soon as it is included. PW