This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 31822 - Neverending loop (StackOverflow) in ToolbarConstraints
Summary: Neverending loop (StackOverflow) in ToolbarConstraints
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: issues@platform
URL:
Keywords: GTK
Depends on:
Blocks:
 
Reported: 2003-03-10 13:40 UTC by David Strupl
Modified: 2009-07-19 13:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch, appears to work - would someone closer to the code review? (866 bytes, patch)
2003-03-10 14:35 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2003-03-10 13:40:56 UTC
trunk as of 20030310

Disabled and enabled all java modules (form, java,
...)


	at
org.netbeans.core.windows.toolbars.ToolbarConstraints.updateNextBars(ToolbarConstraints.java:382)
	at
org.netbeans.core.windows.toolbars.ToolbarConstraints.updatePosition(ToolbarConstraints.java:347)
Comment 1 _ tboudreau 2003-03-10 13:59:23 UTC
Adding Marek to cc.

Looks like it could be fixed with a simple boolean flag somewhere,
but I don't know this code.
Comment 2 _ tboudreau 2003-03-10 14:13:57 UTC
Changing line 383 of ToolbarConstraints to test if it is calling
this method on itself seems to work:

if (tc != this) tc.updatePosition();
^^^^^^^^^^^^^^^

I have no idea yet if it breaks something else.
Disabling all of the java modules produced such an incredible
number of exceptions it is difficult to tell.
Comment 3 _ tboudreau 2003-03-10 14:35:01 UTC
Created attachment 9329 [details]
Patch, appears to work - would someone closer to the code review?
Comment 4 mslama 2003-03-10 15:16:31 UTC
I checked and fix seems ok. But I do not know this code either. It is
not clear to me how nextBars can contain reference to itself.
Comment 5 _ tboudreau 2003-03-10 18:59:45 UTC
David, now I can't reproduce this on my machine.  The code definitely
looks like it could get into an endless loop if it found itself in
the set of toolbars it's iterating (that would be the real bug).

Could you try the patch and see if it fixes it on your machine?
Comment 6 _ tboudreau 2003-03-11 14:58:31 UTC
Committing this fix to the trunk & release35 branch - it 
can do no harm, and it definitely makes it physically 
impossible for an instance of ToolbarConstraints to 
produce this particular loop.

David is still working on the other exceptions when you disable
all Java modules, and will monitor if the problem recurs.
Comment 7 Marian Mirilovic 2003-04-08 16:17:04 UTC
verified in [nb3.5](200304072350)
Comment 8 lkishalmi 2009-03-31 15:41:12 UTC
Seems this patch worked well so far. However from time to time it can be reproduced with GTK Look and Feel with some
themes. I've just tested it with Ubuntu 9.04 Beta and New Wave LAF. I'm going to fix this and sand a patch.
Till then I reopen this on P5.
Comment 9 _ tboudreau 2009-07-18 20:47:07 UTC
Reassigning this, as I haven't worked on the winsys in years.

Most likely, with the 6.7 toolbar rewrite, the code in question no longer exists.
Comment 10 lkishalmi 2009-07-19 13:12:03 UTC
I can't reproduce it in NetBeans 6.7.