fappel / xiliary

Auxiliary libraries for Eclipse, JUnit and Java development in general.
http://fappel.github.io/xiliary
Eclipse Public License 1.0
61 stars 13 forks source link

exception in ScrollableAdapterContribution.validateSpecialCases, because data == null #82

Closed anb0s closed 4 years ago

anb0s commented 7 years ago

Code Affine Theme 0.6.0.20170706-1138 com.codeaffine.eclipse.ui.swt.theme.feature.feature.group CODE AFFINE

... Thread [main] (Suspended (exception NullPointerException))
ScrollableAdapterContribution.validateSpecialCases(Scrollable) line: 117
ScrollableAdapterContribution.applyCSSProperty(Object, String, CSSValue, String, CSSEngine) line: 91
CSSSWTEngineImpl(AbstractCSSEngine).applyCSSProperty(Object, String, CSSValue, String) line: 766
CSSSWTEngineImpl(AbstractCSSEngine).applyStyleDeclaration(Object, CSSStyleDeclaration, String) line: 552
CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean, boolean) line: 426 CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean) line: 367
CSSSWTApplyStylesListener$1.handleEvent(Event) line: 32 EventTable.sendEvent(Event) line: 86
Display.sendEvent(EventTable, Event) line: 4428 Display.sendEvent(int, Event) line: 4420
Display.runSkin() line: 4321
Tree(Composite).updateLayout(boolean, boolean) line: 1361
Tree(Composite).updateLayout(boolean) line: 1348
Tree(Composite).layout(boolean, boolean) line: 702
Tree(Composite).layout(boolean) line: 653
ProblemsView(ExtendedMarkersView).createColumns(TreeColumn[], int[]) line: 345
ProblemsView(ExtendedMarkersView).createViewer(Composite) line: 255 ProblemsView(ExtendedMarkersView).createPartControl(Composite) line: 415
CompatibilityView(CompatibilityPart).createPartControl(IWorkbenchPart, Composite) line: 151 CompatibilityView.createPartControl(IWorkbenchPart, Composite) line: 147
CompatibilityView(CompatibilityPart).create() line: 355 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
MethodRequestor.execute() line: 55
InjectorImpl.processAnnotated(Class, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 990 InjectorImpl.processAnnotated(Class, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 955 InjectorImpl.inject(Object, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 124 InjectorImpl.internalMake(Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 399 InjectorImpl.make(Class, PrimaryObjectSupplier) line: 318
ContextInjectionFactory.make(Class, IEclipseContext) line: 162
ReflectionContributionFactory.createFromBundle(Bundle, IEclipseContext, IEclipseContext, URI) line: 105 ReflectionContributionFactory.doCreate(String, IEclipseContext, IEclipseContext) line: 74
ReflectionContributionFactory.create(String, IEclipseContext) line: 56
ContributedPartRenderer.createWidget(MUIElement, Object) line: 129
PartRenderingEngine.createWidget(MUIElement, Object) line: 997
PartRenderingEngine.safeCreateGui(MUIElement, Object, IEclipseContext) line: 666
PartRenderingEngine$1.run() line: 551
SafeRunner.run(ISafeRunnable) line: 42
PartRenderingEngine.createGui(MUIElement, Object, IEclipseContext) line: 535
ElementReferenceRenderer.createWidget(MUIElement, Object) line: 70
PartRenderingEngine.createWidget(MUIElement, Object) line: 997
PartRenderingEngine.safeCreateGui(MUIElement, Object, IEclipseContext) line: 666
PartRenderingEngine.safeCreateGui(MUIElement) line: 772 PartRenderingEngine.access$0(PartRenderingEngine, MUIElement) line: 743 PartRenderingEngine$2.run() line: 737
SafeRunner.run(ISafeRunnable) line: 42
PartRenderingEngine.createGui(MUIElement) line: 721 StackRenderer.showTab(MUIElement) line: 1289
StackRenderer(LazyStackRenderer).lambda$0(Event) line: 68
946114022.handleEvent(Event) line: not available
UIEventHandler$1.run() line: 40 UISynchronizer(Synchronizer).syncExec(Runnable) line: 233
UISynchronizer.syncExec(Runnable) line: 144 Display.syncExec(Runnable) line: 4889
E4Application$1.syncExec(Runnable) line: 212
UIEventHandler.handleEvent(Event) line: 36
EventHandlerWrapper.handleEvent(Event, Permission) line: 201
EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197
EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1
EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230
ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148 EventAdminImpl.dispatchEvent(Event, boolean) line: 135
EventAdminImpl.sendEvent(Event) line: 78
EventComponent.sendEvent(Event) line: 39
EventBroker.send(String, Object) line: 52
UIEventPublisher.notifyChanged(Notification) line: 60
PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 374
PartStackImpl(ElementContainerImpl).setSelectedElement(T) line: 173
StackRenderer$3.widgetSelected(SelectionEvent) line: 1053
TypedListener.handleEvent(Event) line: 249
EventTable.sendEvent(Event) line: 86
Display.sendEvent(EventTable, Event) line: 4428 CTabFolder(Widget).sendEvent(Event) line: 1079
CTabFolder(Widget).sendEvent(int, Event, boolean) line: 1103
CTabFolder(Widget).sendEvent(int, Event) line: 1088 CTabFolder(Widget).notifyListeners(int, Event) line: 802
CTabFolder.setSelection(int, boolean) line: 3187
CTabFolder.onMouse(Event) line: 1870
CTabFolder.lambda$0(Event) line: 328
1954754112.handleEvent(Event) line: not available
EventTable.sendEvent(Event) line: 86
Display.sendEvent(EventTable, Event) line: 4428 CTabFolder(Widget).sendEvent(Event) line: 1079
Display.runDeferredEvents() line: 4238
Display.readAndDispatch() line: 3817
PartRenderingEngine$5.run() line: 1155
Realm.runWithDefault(Realm, Runnable) line: 336 PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1044
E4Workbench.createAndRunUI(MApplicationElement) line: 153
Workbench.lambda$3(Display, WorkbenchAdvisor, int[]) line: 680
613100385.run() line: not available Realm.runWithDefault(Realm, Runnable) line: 336 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 594
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 148
IDEApplication.start(IApplicationContext) line: 151 EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 134 EclipseAppLauncher.start(Object) line: 104
EclipseStarter.run(Object) line: 388
EclipseStarter.run(String[], Runnable) line: 243
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 653 Main.basicRun(String[]) line: 590
Main.run(String[]) line: 1499
Main.main(String[]) line: 1472

anb0s commented 7 years ago

It happens allways also during debugging an eclipse application (Oxygen) and selecting views like History etc.

anb0s commented 7 years ago

or opening new editors etc.

fappel commented 7 years ago

Thanks for reporting this issue, I will have a look at it ASAP.

fappel commented 4 years ago

Hi, it took me a while, sorry. But I'm not sure I can do anything about it. ScrollableAdapterContribution.validateSpecialCases(Scrollable) line: 117 seems not to be a code line from this repository. The code in this repository at that line in the class given above is "colorApplicator.apply( element, value, property, ADAPTER_BACKGROUND_SETTER );" which IMHO never can cause a NPE. This is because colorApplicator is set during construction time to a final field. There is also no method called "validateSpecialCases". Last changes to the class were made - according to git - over four years ago. I have been known to be mistaken, however...

Nevertheless, the stacktrace exists. So how can this happen? There are forks of the repository around and I am aware of a quite popular Eclipse theme that allegedly uses Code Affine FlatScrollBars under the hood. From what I've heard the codebase has been changed a bit. Hence, it might be possible that the bug was introduced by such changes. If the latter would be the case, there's no chance for Code Affine to fix something.

Because of this considerations, I will close this issue for now. Feel free to reopen if there is evidence that I've overlooked something and that explains how the mysterious line number can happen. Would be interesting to know for sure. Thank's again for reporting and sorry that I don't have a solution to provide.