Bug 553715 - New JFace ApplicationWindow causes NPE on layout change
Summary: New JFace ApplicationWindow causes NPE on layout change
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: WindowBuilder (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Laurent CARON CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 543308 561837 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-03 12:39 EST by Frank Benoit CLA
Modified: 2021-06-04 16:45 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Benoit CLA 2019-12-03 12:39:28 EST
Hi

In an Eclipse plugin project, i create a new JFace ApplicationWindow with the wizard, choose "toolbar".
Then in the composite "container" I change Layout to GridLayout.

java.lang.NullPointerException
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getIntervals(GridLayoutInfo.java:1223)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.createGridInfo(GridLayoutInfo.java:1083)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.access$9(GridLayoutInfo.java:1081)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo$5.run(GridLayoutInfo.java:1057)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:119)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getGridInfo(GridLayoutInfo.java:1055)
	at org.eclipse.wb.internal.swt.gef.policy.layout.grid.GridHelper.getGridInfo(GridHelper.java:41)
	at org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper.showGridFeedback(AbstractGridHelper.java:157)
	at org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridLayoutEditPolicy.refreshSelectionGrid(AbstractGridLayoutEditPolicy.java:103)
	at org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridLayoutEditPolicy.access$0(AbstractGridLayoutEditPolicy.java:96)
	at org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridLayoutEditPolicy$1.refreshed2(AbstractGridLayoutEditPolicy.java:62)
	at sun.reflect.GeneratedMethodAccessor346.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)

Frank
Comment 1 Wim Jongman CLA 2019-12-12 06:08:05 EST
I can reproduce this. Thanks for reporting. Are you able to supply a patch?
Comment 2 Frank Benoit CLA 2019-12-16 04:41:01 EST
Sorry, no
Comment 3 Wim Jongman CLA 2020-01-09 06:13:46 EST
NY, are you able yo take a look at this?
Comment 4 Laurent CARON CLA 2020-11-01 16:36:06 EST
*** Bug 561837 has been marked as a duplicate of this bug. ***
Comment 5 Laurent CARON CLA 2020-11-01 16:50:03 EST
Bug fixed in the next release of WB
Comment 6 Laurent CARON CLA 2020-11-02 09:25:54 EST
*** Bug 543308 has been marked as a duplicate of this bug. ***