Bug 565966 - [JFace] StackOverflowError with AbstractColumnLayout
Summary: [JFace] StackOverflowError with AbstractColumnLayout
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-10 13:25 EDT by Christoph Laeubrich CLA
Modified: 2020-08-10 13:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Laeubrich CLA 2020-08-10 13:25:55 EDT
I'm trying to use the TreeColumnLayout but encountering a stack overflow error.


	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:234)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:262)
	at org.eclipse.jface.layout.TreeColumnLayout.layout(TreeColumnLayout.java:92)
	at org.eclipse.jface.layout.TreeColumnLayout.updateColumnData(TreeColumnLayout.java:145)
	at org.eclipse.jface.layout.AbstractColumnLayout.lambda$0(AbstractColumnLayout.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5685)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1449)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1428)
	at org.eclipse.swt.widgets.TreeColumn.gtk_size_allocate(TreeColumn.java:414)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2268)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5919)
	at org.eclipse.swt.internal.gtk.OS.swt_fixed_resize(Native Method)
	at org.eclipse.swt.widgets.Scrollable.resizeHandle(Scrollable.java:523)
	at org.eclipse.swt.widgets.Composite.resizeHandle(Composite.java:1539)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1142)
	at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1597)
	at org.eclipse.swt.widgets.Tree.setBounds(Tree.java:3523)
	at org.eclipse.swt.widgets.Control.setSize(Control.java:1495)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:234)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:262)
	at org.eclipse.jface.layout.TreeColumnLayout.layout(TreeColumnLayout.java:92)
	at org.eclipse.jface.layout.TreeColumnLayout.updateColumnData(TreeColumnLayout.java:145)
	at org.eclipse.jface.layout.AbstractColumnLayout.lambda$0(AbstractColumnLayout.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5685)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1449)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1428)
	at org.eclipse.swt.widgets.TreeColumn.gtk_size_allocate(TreeColumn.java:414)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2268)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5919)
	at org.eclipse.swt.internal.gtk.OS.swt_fixed_resize(Native Method)
	at org.eclipse.swt.widgets.Scrollable.resizeHandle(Scrollable.java:529)
	at org.eclipse.swt.widgets.Composite.resizeHandle(Composite.java:1539)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1142)
	at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1597)
	at org.eclipse.swt.widgets.Tree.setBounds(Tree.java:3523)
	at org.eclipse.swt.widgets.Control.setSize(Control.java:1495)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:234)
... and so on ...
Comment 1 Christoph Laeubrich CLA 2020-08-10 13:29:27 EDT
It seems that 

layoutTableTree#L233 is the problem

if (increase) {
  scrollable.setSize(area.width, area.height);
}

that triggers this infinite loop, the code below is guarded by a boolean to not recall on resize, but I'm not sure if the guard could simply be moved up a little bit?