This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 414958 - [E4AP] NPE during loading of workbench.xmi
Summary: [E4AP] NPE during loading of workbench.xmi
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.3.1   Edit
Assignee: Paul Elder CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 389624
Blocks:
  Show dependency tree
 
Reported: 2013-08-13 08:01 EDT by Paul Elder CLA
Modified: 2013-08-28 10:07 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Elder CLA 2013-08-13 08:01:38 EDT
+++ This bug was initially created as a clone of Bug #389624 +++
Cloning for fix on 4.3.1

When the workbenach.xmi is loaded, an NPE is thrown. Debugging the code reveals, that the NPE is caused, because the element (the Part that is to be shown) does not have a parent (eContainer), so element.getParent() returns null.

This seems to be the case for all parts that are added through a fragment. I have created a simple testcase to confirm the issue. 

1) Start the application with the testapp.product in de.emsw.gosa.product.testapp.
2) Close the application
3) Start the application again and DO NOT clean the configuration, so workbench.xmi gets loaded

See: http://www.eclipse.org/forums/index.php/m/911441/#msg_911441

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-09-11 17:33:18.756
!MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.basic.impl.PartStackImpl@1a4c5b4 (elementId: testapp.stack.right, tags: [], contributorURI: platform:/plugin/de.emsw.gosa.product.testapp) (widget: CTabFolder {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer@1e2161d, toBeRendered: true, onTop: false, visible: true, containerData: 10000, accessibilityPhrase: null)
!STACK 0
java.lang.NullPointerException
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:156)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1024)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98)
...
Comment 1 Paul Elder CLA 2013-08-13 08:52:57 EDT
Pushed 4.3.1 push to Gerrit as:

https://git.eclipse.org/r/15416

Paul W. Can you have a look?
Comment 3 Paul Elder CLA 2013-08-26 15:20:31 EDT
Verified in build 4.3.0.M20130821-0800
Comment 4 Paul Elder CLA 2013-08-28 10:07:30 EDT
Per comment 3, state should be Verified.
Comment 5 Paul Elder CLA 2013-08-28 10:07:42 EDT
Verified per comment 3.