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 128705

Summary: IllegalArgumentException: Sections overlap
Product: javame Reporter: Marian Mirilovic <mmirilovic>
Component: Visual DesignerAssignee: Karol Harezlak <kharezlak>
Status: VERIFIED FIXED    
Severity: blocker CC: ca-nb, ivansidorkin, jpokorsky, kirillsh, lhasik, sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=12692
Issue Type: DEFECT Exception Reporter: 12692
Bug Depends on:    
Bug Blocks: 137591    

Description Marian Mirilovic 2008-02-28 14:27:24 UTC
49 duplicates so far ...

Build: NetBeans IDE 6.0 RC2 (Build 200711201000)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105
OS: Windows XP, 5.1, x86
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalArgumentException: Sections overlap
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.checkOverlap(GuardedSectionsImpl.java:310)
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.checkNewSection(GuardedSectionsImpl.java:299)
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.createSimpleSection(GuardedSectionsImpl.java:160)
        at org.netbeans.api.editor.guards.GuardedSectionManager.createSimpleSection(GuardedSectionManager.java:107)
        at org.netbeans.modules.vmd.codegen.CodeUtils.createSimpleSectionAfter(CodeUtils.java:100)
        at org.netbeans.modules.vmd.api.codegen.MultiGuardedSection.switchToEditable(MultiGuardedSection.java:123)
        at
org.netbeans.modules.vmd.midp.components.sources.EventSourceCD$2.generateMultiGuardedSectionCode(EventSourceCD.java:140)
        at
org.netbeans.modules.vmd.api.codegen.CodeMultiGuardedLevelPresenter.generateMultiGuardedSectionCode(CodeMultiGuardedLevelPresenter.java:61)
        at
org.netbeans.modules.vmd.midp.components.listeners.EventListenerCode$CodeCommandListenerPresenter.resolveSecondLevel(EventListenerCode.java:279)
        at
org.netbeans.modules.vmd.midp.components.listeners.EventListenerCode$CodeCommandListenerPresenter.resolveFirstLevel(EventListenerCode.java:255)
Comment 1 Vitezslav Stejskal 2008-02-29 07:25:14 UTC
I'm not sure, but it looks like mobility is trying to create overlapping guarded sections...
Comment 2 Karol Harezlak 2008-02-29 08:33:44 UTC
Any idea how to reproduce it?
Comment 3 Lukas Hasik 2008-02-29 08:45:07 UTC
look at the URL=http://statistics.netbeans.org/exceptions/detail.do?id=12692
there are some steps/descriptions + the UI gestures report (read XML ;) )
Comment 4 Exceptions Reporter 2008-02-29 13:59:39 UTC
This issue has already 50 duplicates 
Comment 5 Karol Harezlak 2008-03-28 10:50:25 UTC
It looks like a serious issue but I can not reproduce it. If anyone can provide way to reproduce it would be great.
Comment 6 Karol Harezlak 2008-03-30 19:52:04 UTC
Still don't know how to reproduce it an what could be a problem I'm gonna leave this bug open and I hope we fix it for 6.1.
Comment 7 Exceptions Reporter 2008-04-16 14:05:33 UTC
This issue has already 100 duplicates 
Comment 8 Lukas Hasik 2008-04-29 12:45:44 UTC
marking as candidate for patch 2 of 6.1 as we are not able to make it to patch 1.
Comment 9 Marian Mirilovic 2008-05-05 09:14:41 UTC
*** Issue 134230 has been marked as a duplicate of this issue. ***
Comment 10 Karol Harezlak 2008-05-12 08:35:24 UTC
I believe I found what could be a problem or at least how to reproduce it. 
Create new Mobility Project with HelloMidlet. Open HelloMidlet, switch to Screen Designer and D&D some image from
project files then switch to sources. It throws exception about broken source code. Please try to reproduce it on
different machines and OS. I'm going to start working on it asap but I need confirmation that it is not just a random
event on my machine but it's reproducible somewhere else.
Comment 11 kate 2008-05-12 11:09:24 UTC
I tried to reproduce it on Win XP (many times) but everything seems to work well.

Product Version: NetBeans IDE Dev (Build 200805120001)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 12 Karol Harezlak 2008-05-12 13:58:43 UTC
It looks like this issue is only reproducible on Mac OS X with current sources in this case most likely it is something
else and not related to this issue but completely new problem.  
Comment 13 Lukas Hasik 2008-05-13 17:34:50 UTC
karol, I cannot reproduce on WinXP with your steps. I've seen it many times when I was adding custom component from
palette into the Flow Designer but I'm not able to reproduce now :(
Comment 14 Karol Harezlak 2008-05-13 17:38:21 UTC
for some reason it is only reproducible on Mac OS X and only on my local build. I'm going to clone repository once again
and see if it's still reproducible.  
Comment 15 jinb 2008-06-02 14:42:18 UTC
Gentlemen, any plans to fix/verify this issue by 09-Jun-2008, so it can be part of NB 6.1 patch 2?
thanks a lot.
Comment 16 Karol Harezlak 2008-06-02 15:04:39 UTC
Most likely it wont be a part of NB 6.1 patch 2, but it can change if we find what cause this problem.
Comment 17 pgebauer 2008-06-13 10:23:36 UTC
The issue didn't meet nomination criteria for 61patch2 till nomination cut-off
date. It has been moved to the next patch.
Comment 18 Ivan Sidorkin 2008-06-16 11:16:21 UTC
- create new MIDP application
- switch to Flow view in HelloMIDlet
- drop command to form
- click Save All button
- got exception  Issue 129672
- drop one more command to form
- click Save All button

java.lang.IllegalArgumentException: Sections overlap
Comment 19 Petr Suchomel 2008-06-16 12:01:44 UTC
I am not getting section overlap, but definitely getting http://www.netbeans.org/issues/show_bug.cgi?id=129672 all the
time. Thanks.
Comment 20 Ivan Sidorkin 2008-06-16 12:14:19 UTC
I reproduced it on 3 windows machines
Comment 21 Andrei Chistiakov 2008-06-16 13:22:55 UTC
Reproduced with  NetBeans IDE Dev (Build 200806160002)

Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

- create a MIDP Application (call wizard, press Next, press Finish);
- in HelloMIDLet.java, switch to Flow view;
- drop Alert from the palette on the view;
- drop OK Command on the Alert;
- push Save All button on main toolbar;
- close Exception dialog (Issue 129672);
- drop Cancel Command on the Alert;
- push Save All button once again.

java.lang.IllegalArgumentException: Sections overlap
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.checkOverlap(GuardedSectionsImpl.java:310)
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.checkNewSection(GuardedSectionsImpl.java:299)
        at org.netbeans.modules.editor.guards.GuardedSectionsImpl.createSimpleSection(GuardedSectionsImpl.java:160)
        at org.netbeans.api.editor.guards.GuardedSectionManager.createSimpleSection(GuardedSectionManager.java:107)
        at org.netbeans.modules.vmd.codegen.CodeUtils.createSimpleSectionAfter(CodeUtils.java:100)
        at org.netbeans.modules.vmd.api.codegen.MultiGuardedSection.switchToEditable(MultiGuardedSection.java:123)
        at
org.netbeans.modules.vmd.midp.components.sources.EventSourceCD$2.generateMultiGuardedSectionCode(EventSourceCD.java:150)
        at
org.netbeans.modules.vmd.api.codegen.CodeMultiGuardedLevelPresenter.generateMultiGuardedSectionCode(CodeMultiGuardedLevelPresenter.java:61)
...
Comment 22 Andrei Chistiakov 2008-06-16 14:41:48 UTC
Not reproducible for me with Java 1.5.0_12, 1.5.0_09. Only 1st exception is thrown all the time.
100% reproducible with Java 1.6.0_02, 1.6.0_04 by following steps above.
Сould you please try with Java 1.6? 
Comment 23 Karol Harezlak 2008-06-16 15:17:52 UTC
Interesting so I'll try to reproduce it on 1.6. Do you have access to the Mac OS with Java 1.5 or 1.6? If yes please try
to reproduce it on Mac because seems to me it happens very often on this OS. Thanks
Comment 24 Ivan Sidorkin 2008-06-17 12:30:12 UTC
Mac OS is not a target platform (so we will not waste time on it now)
this issue 100% reproducible with WinXP and Linux
Comment 25 Karol Harezlak 2008-06-17 14:46:04 UTC
*** Issue 137423 has been marked as a duplicate of this issue. ***
Comment 26 Karol Harezlak 2008-06-24 14:51:04 UTC
Issue #137591 has been fixed. Could you check if this issue is still reproducible with some recent build? Thanks.
Comment 27 Andrei Chistiakov 2008-06-24 15:03:47 UTC
Can't reproduce with NetBeans IDE Dev (Build 200806240008).
Comment 28 Karol Harezlak 2008-06-24 15:09:01 UTC
Ok it's definitely good sign but lets wait until end of the M1 bug fixing period before we close it.
Comment 29 Karol Harezlak 2008-07-07 09:37:23 UTC
I think we can close this issue since. It looks like it is resolved.
Comment 30 Andrei Chistiakov 2008-07-07 10:56:01 UTC
Verified with NetBeans IDE Dev (Build 200807070101) M1.
Comment 31 Lukas Hasik 2008-07-07 13:06:25 UTC
Karol, this is patch3 candidate, can you identify what changeset has fixed this issue? It will allow to sustaining to
backport this issue into 6.1. Is it fixable in 6.1?
Comment 32 Karol Harezlak 2008-07-07 13:14:07 UTC
This fix was not on our side. Look at this issue:

http://www.netbeans.org/issues/show_bug.cgi?id=137591
Comment 33 rbalada 2008-07-30 09:53:13 UTC
Mariane,

according to discussion within this issue it seems to be fixed fixed by a fix for issue 137591. Would you please
reconsider nomination for 61fixes3-cadidate? These two issues does not seem to be duplicates, just having the same root
cause.

BTW: fix for issue 137591 has been ported yesterday
Comment 34 Marian Mirilovic 2008-07-30 10:33:14 UTC
Rudo, I think the issue can stay in the list of candidates as well as the list of fixed issues into patch, especially
because "....These two issues does not seem to be duplicates, just having the same root cause...." . At least it would
lead to verifying both issues once patch3 is tested.
Comment 35 rbalada 2008-08-04 13:39:01 UTC
OK, marking as 61fixes3-fixed. The real fix has been done in issue 137591.
Comment 36 Ivan Sidorkin 2008-08-08 12:30:54 UTC
Product Version: NetBeans IDE Dev (Build 200808080201)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

created game designer
added tiled layer
undo
switch to source
delete rest of added code that was not removed by undo
switch to design view
add new tiled layer
switch to source

reproduced sporadically 
Comment 37 Karol Harezlak 2008-08-08 16:23:57 UTC
bloody hell, my nightmare is back :( Is it reproducible with Visual Designer? 
Comment 38 Karol Harezlak 2008-09-01 13:50:13 UTC
Ivan could you provide me stack trace from this exception? Thanks
Comment 39 Andrei Chistiakov 2008-09-08 10:45:44 UTC
I can't reproduce this with build 200809061401 as IDE doesn't allow to remove guarded blocks of code anymore.
Comment 40 rbalada 2008-09-08 12:05:10 UTC
Andrei,

when you resolve reopened issue, please make sure to put it into previous state, especially when you're considering
"WORKSFORME". An issue marked "WORKSFORME" is not eligible to be put into patch and a fix for this issue has been
released as part of a patch. 

Reopening to get it VERIFIED FIXED again.
Comment 41 rbalada 2008-09-08 12:05:45 UTC
Marking RESOLVED FIXED
Comment 42 rbalada 2008-09-08 12:06:40 UTC
Marking VERIFIED
Comment 43 Andrei Chistiakov 2008-09-08 12:11:25 UTC
Thanks for the correction, Rudolf. I'll bear it in mind.