Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 137591 - java.lang.IllegalArgumentException: (endOffset=3249 - startOffset=3255) < (startGuardedLength=73 + endGuardedLength=50)
java.lang.IllegalArgumentException: (endOffset=3249 - startOffset=3255) < (st...
Product: editor
Classification: Unclassified
Component: Code folding
All All
: P1 (vote)
: 6.x
Assigned To: Vitezslav Stejskal
Depends on: 128705
  Show dependency treegraph
Reported: 2008-06-18 16:07 UTC by Karol Harezlak
Modified: 2008-09-10 19:52 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT

stack trace (6.04 KB, text/plain)
2008-06-18 16:08 UTC, Karol Harezlak

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Harezlak 2008-06-18 16:07:33 UTC
Product Version: NetBeans IDE Dev (Build 080617)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.3 running on i386; MacRoman; en_US (nb)
Userdir: /Volumes/work/hgtrunk2/main/nbbuild/testuserdir

To reproduce:
- create new Java ME mobility project with HelloMidlet.
- in the HelloMidlet switch to the Flow View
- add WaitScreen component from the compoents palette
- switch to the Source view

Very often Netbeans throws during code generation java.lang.IllegalArgumentException: (endOffset=... - startOffset=...)
< (startGuardedLength=... + endGuardedLength=...) 
more info in the stack.txt
Comment 1 Karol Harezlak 2008-06-18 16:08:24 UTC
Created attachment 63009 [details]
stack trace
Comment 2 Karol Harezlak 2008-06-18 16:12:59 UTC
Most likely this issue is connected with this one 128705
Comment 3 Karol Harezlak 2008-06-19 10:36:24 UTC
I was testing this issue and it turned out it is big stopper for us we wont be able to release Mobility 6.5 M1 with this
issue because code generation of Visual Designer is seriously broken. Changing to P1.
Comment 4 Vitezslav Stejskal 2008-06-19 10:46:14 UTC
Well, if issue #128705 causes overlapping guarded sections, it is likely to be the cause of this problem as well. So,
I'd suggest you first fix #128705 and we will then see if something needs to be fixed in CustomFoldManager.
Comment 5 Karol Harezlak 2008-06-19 11:15:52 UTC
Right know I'm not able to reproduce issue #12870 because code generation fails almost every time. It's most important
for us to make Visual Designer usable again and fix this issue. Also it's just my speculation that those two issues are
Comment 6 Vitezslav Stejskal 2008-06-19 11:25:56 UTC
How do I install J2ME compatible platform? The Mobile Application project wizard is asking for one...

The IAE is caused by CustomFoldManager trying to insert bad folds. The folds added by CustomFoldManager are those for
guarded sections. So your speculation seems correct. Anyway, if you tell me where to get J2ME platform I'll try the
steps and see if we can somehow make CFM more resilient. Thanks
Comment 7 Petr Suchomel 2008-06-19 11:32:43 UTC
If you have NetBeans installed, you have one under mobility8/WTK2.5.2, otherwise get the one at
Comment 8 Vitezslav Stejskal 2008-06-19 13:09:09 UTC
Thanks, I can reproduce it now.
Comment 9 Vitezslav Stejskal 2008-06-23 11:31:48 UTC
Comment 10 Quality Engineering 2008-06-23 16:11:56 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #277 build
User: Vita Stejskal <>
Log: #137591 (fixed): correct fold size computation; remove all marks in the modified area
Comment 11 Andrei Chistiakov 2008-06-24 14:42:58 UTC
Verified with NetBeans IDE Dev (Build 200806240008).
Comment 12 rbalada 2008-07-18 16:06:18 UTC

during investigation of this issue was discovered, that porting fix for this issue may require also porting of a
changeset for issue 133350 "CustomFoldManager requires old Syntax/SyntaxSupport". This would switch editor.lib module
from use of Syntax/SyntaxSupport to use of lexer.

I would like to ask QE to estimate&confirm this change is safe for NB 6.1 Patch3, because it could cause further issues
with NB 6.1 release.

Comment 13 rbalada 2008-07-21 14:30:59 UTC

Could you please justify nomination for 61fixes3-candidate?

Some background info:
#1 During my discussion with vstejskal it turned out that this issue may not be present in NB 6.1 source base. Vita said
it was likely introduced in a code which was significantly changed in trunk (6.5) due to implementation the issue
133350, changeset .

#2 The initial report says "Product Version: NetBeans IDE Dev (Build 080617)", which is very likely trunk (6.5) source base.
#3 I am unable to reproduce it on NetBeans 6.1 Patch 2 (using the "Visual Designer Custom Components" sample)

Comment 14 rbalada 2008-07-29 16:21:23 UTC
I've ported this bugfix into release61_fixes repository as
Comment 15 biodunolrj 2008-09-10 18:01:54 UTC
pls help find solution to this bug: section overlap as it is causing a lot of setback
Comment 16 rbalada 2008-09-10 19:52:17 UTC

would you please re-phrase your request? This issue is marked as VERIFIED FIXED. The same applies to issue 128705
"sections overlap". Both issues are in such a state that no one is going to work on them, unless you find regression or
reproducible case.

Did you find regression and/or reproducible case. Would you please shed some light on your request? Would you please
provide some details about your issue? Consider following issue reporting guideline available at .

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo