Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflow in CommitTable.layout() with new experimental resolution scaling preference #69

Open
Bananeweizen opened this issue Dec 16, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Bananeweizen
Copy link
Contributor

Version

7.1.0

Operating System

Windows

Eclipse version

2024-12

Bug description

I have seen the following StackOverflow in 2 different instances by now. Both of them happened after logging in to a hibernated Windows session. Both instances have the new dynamic resolution scaling enabled: https://eclipse.dev/eclipse/news/4.34/platform.php#rescale-on-runtime-preference and happened while running on an external monitor connected to my laptop. The history view was not visible at the time of the errors (but rather stacked in a view stack).

Actual behavior

java.lang.StackOverflowError
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:457)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5726)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5680)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4822)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3222)
	at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1069)
	at org.eclipse.swt.widgets.Table.setBoundsInPixels(Table.java:4101)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3183)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3179)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:3174)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:238)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:257)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1343)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1328)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:707)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:659)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:615)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.layout(CommitGraphTable.java:703)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.lambda$6(CommitGraphTable.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1197)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1178)
	at org.eclipse.swt.widgets.Control.WM_SIZE(Control.java:5449)
	at org.eclipse.swt.widgets.Scrollable.WM_SIZE(Scrollable.java:386)
	at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
	at org.eclipse.swt.widgets.Table.WM_SIZE(Table.java:6228)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4809)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5680)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4822)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:457)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5726)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.SendMessage(Native Method)
	at org.eclipse.swt.widgets.TableColumn.setWidthInPixels(TableColumn.java:866)
	at org.eclipse.swt.widgets.TableColumn.setWidth(TableColumn.java:857)
	at org.eclipse.jface.layout.TableColumnLayout.setColumnWidths(TableColumnLayout.java:79)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:233)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:257)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1343)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1328)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:707)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:659)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:615)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.layout(CommitGraphTable.java:703)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.lambda$6(CommitGraphTable.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1197)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1178)
	at org.eclipse.swt.widgets.Control.WM_SIZE(Control.java:5449)
	at org.eclipse.swt.widgets.Scrollable.WM_SIZE(Scrollable.java:386)
	at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
	at org.eclipse.swt.widgets.Table.WM_SIZE(Table.java:6228)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4809)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5680)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4822)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:457)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5726)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:585)
	at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:451)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
	at org.eclipse.swt.widgets.Table.windowProc(Table.java:5812)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5177)
	at org.eclipse.swt.internal.win32.OS.SendMessage(Native Method)
	at org.eclipse.swt.widgets.TableColumn.setWidthInPixels(TableColumn.java:866)
	at org.eclipse.swt.widgets.TableColumn.setWidth(TableColumn.java:857)
	at org.eclipse.jface.layout.TableColumnLayout.setColumnWidths(TableColumnLayout.java:79)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:233)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:257)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1343)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1328)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:707)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:659)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:615)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.layout(CommitGraphTable.java:703)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.lambda$6(CommitGraphTable.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1197)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1178)
	at org.eclipse.swt.widgets.Table.setDeferResize(Table.java:4215)
	at org.eclipse.swt.widgets.Table.setBoundsInPixels(Table.java:4102)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3183)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3179)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:3174)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:238)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:257)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1343)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1328)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:707)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:659)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:615)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.layout(CommitGraphTable.java:703)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.lambda$6(CommitGraphTable.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1197)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1178)
	at org.eclipse.swt.widgets.Table.setDeferResize(Table.java:4215)
	at org.eclipse.swt.widgets.Table.setBoundsInPixels(Table.java:4102)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3183)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3179)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:3174)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:238)
	at org.eclipse.jface.layout.AbstractColumnLayout.layout(AbstractColumnLayout.java:257)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1343)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1328)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:707)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:659)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:615)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.layout(CommitGraphTable.java:703)
	at org.eclipse.egit.ui.internal.history.CommitGraphTable.lambda$6(CommitGraphTable.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1197)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1178)
	at org.eclipse.swt.widgets.Table.setDeferResize(Table.java:4215)
	at org.eclipse.swt.widgets.Table.setBoundsInPixels(Table.java:4102)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3183)
	at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3179)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:3174)
	at org.eclipse.jface.layout.AbstractColumnLayout.layoutTableTree(AbstractColumnLayout.java:238)

(shortened, the same 19 lines repeat over and over)

Expected behavior

Relevant log output

No response

Other information

No response

@Bananeweizen Bananeweizen added the bug Something isn't working label Dec 16, 2024
@Bananeweizen
Copy link
Contributor Author

eclipse-platform/eclipse.platform.ui#2461 is the resolution scaling change mentioned above.

@tomaswolf
Copy link
Contributor

I guess the problem is

rawTable.addListener(SWT.Resize, event -> layout(rawTable));

layout() is called when the table is resized, but re-layouting may cause the table size to change. Don't know why this is only a problem with this experimental auto-scaling. In any case I believe the minimal fix would be to attach the listener to the composite containing the table:

tableContainer.addListener(SWT.Resize, event -> layout(rawTable));

I'm not set up to run EGit against the latest platform, so I cannot verify myself.

@Bananeweizen Bananeweizen self-assigned this Dec 21, 2024
@Bananeweizen
Copy link
Contributor Author

Thanks @tomaswolf . I'll try to not forget this issue, since I can only test the change with the same setup in 2 weeks after the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants