You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "MKuettner (via GitHub)" <gi...@apache.org> on 2023/12/12 12:34:55 UTC
[I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
MKuettner opened a new issue, #6835:
URL: https://github.com/apache/netbeans/issues/6835
### Apache NetBeans version
Apache NetBeans 20 release candidate
### What happened
In my Netbeans Platform based application there is a special dialog to select some kind of modules and sub-modules.
This dialog uses an OutlineView with one column and a CheckRenderDataProvider to display/manage selection.
The dialog looks like this:

If there are "many" nodes contained and if used scrolles really "fast" a java.lang.StackOverflowError occurs:
```
java.lang.StackOverflowError
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.java:464)
at org.openide.explorer.view.OutlineView$OutlineViewOutline$OutlineViewOutlineColumn$OutlineViewOutlineHeaderRenderer.getTableCellRendererComponent(OutlineView.java:2258)
at org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer.getTableCellRendererComponent(ETableHeader.java:129)
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.java:464)
at org.openide.explorer.view.OutlineView$OutlineViewOutline$OutlineViewOutlineColumn$OutlineViewOutlineHeaderRenderer.getTableCellRendererComponent(OutlineView.java:2258)
at org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer.getTableCellRendererComponent(ETableHeader.java:129)
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.java:464)
at org.openide.explorer.view.OutlineView$OutlineViewOutline$OutlineViewOutlineColumn$OutlineViewOutlineHeaderRenderer.getTableCellRendererComponent(OutlineView.java:2258)
at org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer.getTableCellRendererComponent(ETableHeader.java:129)
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.java:464)
at org.openide.explorer.view.OutlineView$OutlineViewOutline$OutlineViewOutlineColumn$OutlineViewOutlineHeaderRenderer.getTableCellRendererComponent(OutlineView.java:2258)
at org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer.getTableCellRendererComponent(ETableHeader.java:129)
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.
```
It seems that this behavior has been introduced in Netbeans 18. All versions below do not show this error.
### How to reproduce
Currently i have no idea how to reproduce this issue outside of my application.
### Did this work correctly in an earlier version?
Apache NetBeans 17
### Operating System
Unix
### JDK
JDK 8, 17, 21
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "oyarzun (via GitHub)" <gi...@apache.org>.
oyarzun commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1887269491
@DevCharly do you have an ETA for when FlatLAF v3.3 will be released or maybe a v3.2.6 bug fix release? It would be nice to get this fix in NetBeans 21.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "MKuettner (via GitHub)" <gi...@apache.org>.
MKuettner commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1875457784
This seems to fix the problem.
I'm not able to reproducte the StackOverFlowError anymore using FlatLaf `3.3-SNAPSHOT`.
It would be great to have this version available with one of the next Netbeans releases.
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly closed issue #6835: java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application
URL: https://github.com/apache/netbeans/issues/6835
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1862409091
@hclerx interesting, thanks for posting your workaround!
cc @DevCharly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1867685425
I've reworked FlatLaf's `FlatTableHeaderUI`. (commit https://github.com/JFormDesigner/FlatLaf/commit/4df34b3f9d47539e48fde888f0b9b2a2dec9bc92)
It no longer temporary replaces cell renderer while painting header, which seems to cause the stack overflow in NB.
Please try latest FlatLaf `3.3-SNAPSHOT`: https://github.com/JFormDesigner/FlatLaf#snapshots
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "hclerx (via GitHub)" <gi...@apache.org>.
hclerx commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1862209489
We had the same problem and we found it is caused by FlatLaf. We fixed it by patching FlatTableHeaderUI as follows in the paint() method:
// temporary use own default renderer if necessary
FlatTableCellHeaderRenderer tempRenderer = null;
if ( !header.getDefaultRenderer().getClass().getName().equals("org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer") ) {
// temporary use own default renderer
tempRenderer = new FlatTableCellHeaderRenderer( header.getDefaultRenderer() );
header.setDefaultRenderer( tempRenderer );
}
// paint header
super.paint( g, c );
// restore default renderer
if( tempRenderer != null ) {
tempRenderer.reset();
header.setDefaultRenderer( tempRenderer.delegate );
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "MKuettner (via GitHub)" <gi...@apache.org>.
MKuettner commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1858783926
The dialog is invoked from a NodeAction by calling `DialogDisplayer.getDefault().notify(..descriptor..)` so this should automatically run on EDT. I also added some `SwingUtilities.isEventDispatchThread()` check that are all pass.
This problem is also hard to debug since all the involved methods are called so many times without any problem.
I will try to extract some kind of test case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] java.lang.StackOverflowError during "fast" scrolling in OutlineView of a Netbeans Platform application [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #6835:
URL: https://github.com/apache/netbeans/issues/6835#issuecomment-1853043995
> It seems that this behavior has been introduced in Netbeans 18. All versions below do not show this error.
hmm. The loop is actually quite tight:
```
at org.netbeans.swing.etable.ETableColumn$ETableColumnHeaderRendererDelegate.getTableCellRendererComponent(ETableColumn.java:464)
at org.openide.explorer.view.OutlineView$OutlineViewOutline$OutlineViewOutlineColumn$OutlineViewOutlineHeaderRenderer.getTableCellRendererComponent(OutlineView.java:2258)
at org.netbeans.swing.etable.ETableHeader$ETableHeaderRenderer.getTableCellRendererComponent(ETableHeader.java:129)
```
and there were no code changes in that area since quite a while.
my only explanation I can come up with right now is that:
https://github.com/apache/netbeans/blob/ac3936a4bdc7828721f45bba2feece190bc99a43/platform/openide.explorer/src/org/openide/explorer/view/OutlineView.java#L2196-L2200
is creating a cycle in some situations (fast scrolling?), when `createDefaultHeaderRenderer` is returning the wrong renderer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists