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 240803

Summary: IllegalArgumentException: Copying to 2963 is greater then its size (2958).
Product: java Reporter: Jiri Prox <jiriprox>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: RESOLVED WORKSFORME    
Severity: normal CC: choces, claudio.rosati, exceptions_reporter, gtzabari, khamberg, markiewb, SirIntellegence, stefan79
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 203687
Attachments: stacktrace
stacktrace
stacktrace

Description Jiri Prox 2014-01-22 07:37:07 UTC
Build: NetBeans IDE Dev (Build 20140121-66acce1f24d6)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b65, Java(TM) SE Runtime Environment, 1.8.0-ea-b123
OS: Windows 7

User Comments:
gtzabari: Selected text in editor, then hit DELETE button.

jiriprox: IAE when deleting line




Stacktrace: 
java.lang.IllegalArgumentException: Copying to 2963 is greater then its size (2958).
   at org.netbeans.modules.java.source.pretty.VeryPretty.copyToIndented(VeryPretty.java:552)
   at org.netbeans.modules.java.source.pretty.VeryPretty.doPrintOriginalTree(VeryPretty.java:534)
   at org.netbeans.modules.java.source.pretty.VeryPretty.handlePossibleOldTrees(VeryPretty.java:488)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:4446)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:4403)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:4391)
Comment 1 Jiri Prox 2014-01-22 07:37:09 UTC
Created attachment 144232 [details]
stacktrace
Comment 2 Jaroslav Havlin 2014-01-22 09:21:10 UTC
> java.lang.IllegalArgumentException: Copying to 2963 is greater then its size (2958).
>     at org.netbeans.modules.java.source.pretty.VeryPretty.copyToIndented(VeryPretty.java:552)
Reassigning to java/Source, please evaluate it. Thank you.
Comment 3 markiewb 2014-05-21 13:39:35 UTC
Created attachment 147364 [details]
stacktrace

Action: delete text in java editor which leads to an syntax error
Comment 4 Svata Dedic 2014-06-06 12:01:38 UTC
*** Bug 244627 has been marked as a duplicate of this bug. ***
Comment 5 Svata Dedic 2014-06-06 12:02:07 UTC
Could be some 'race' between organize members and user changing the code while the analysis is running ?
Comment 6 _ gtzabari 2014-06-06 14:44:46 UTC
Svata,

Maybe :)

PS: What's the difference between this bug and #217498?
Comment 7 Svata Dedic 2014-06-06 15:34:51 UTC
(In reply to _ gtzabari from comment #6)
> 
> PS: What's the difference between this bug and #217498?

Stacktraces in this defect contain `handlePossibleOldTrees' and subsequently   'doPrintOriginalTree', which takes a range for the whole tree from the original source text directly to the result. Issue #217498 still diffs individual tree nodes and prints the output piece by piece, does not copy range for the whole subtree.
Comment 8 Exceptions Reporter 2014-08-02 22:43:46 UTC
Created attachment 148487 [details]
stacktrace

Coding with gradle + libgdx
Comment 9 Svata Dedic 2014-08-15 13:46:49 UTC
Sorry I could not reproduce the defect with 8.0 or dev version. I've tried to work with sources printed to the attached message.logs but still no error occured. Should the error happen again, could you please attach your formatting settings as well ? Thanks.
Comment 10 Jaroslav Havlin 2014-09-12 12:04:45 UTC
*** Bug 247053 has been marked as a duplicate of this bug. ***
Comment 11 Jaroslav Havlin 2014-09-19 04:36:58 UTC
*** Bug 247213 has been marked as a duplicate of this bug. ***
Comment 12 Jaroslav Havlin 2014-09-29 12:34:32 UTC
*** Bug 247361 has been marked as a duplicate of this bug. ***
Comment 13 Jaroslav Havlin 2014-10-13 08:36:48 UTC
*** Bug 247774 has been marked as a duplicate of this bug. ***
Comment 14 Jaroslav Havlin 2014-10-31 11:20:52 UTC
*** Bug 247929 has been marked as a duplicate of this bug. ***
Comment 15 Jaroslav Havlin 2014-11-14 08:31:39 UTC
*** Bug 248614 has been marked as a duplicate of this bug. ***
Comment 16 Jaroslav Havlin 2014-11-21 14:00:46 UTC
*** Bug 248693 has been marked as a duplicate of this bug. ***
Comment 17 Jaroslav Havlin 2014-11-21 14:01:43 UTC
*** Bug 248648 has been marked as a duplicate of this bug. ***
Comment 18 Jaroslav Havlin 2014-11-24 08:00:17 UTC
*** Bug 248839 has been marked as a duplicate of this bug. ***
Comment 19 Jaroslav Havlin 2014-11-28 13:28:41 UTC
*** Bug 248924 has been marked as a duplicate of this bug. ***
Comment 20 _ gtzabari 2014-11-28 14:07:55 UTC
Svata,

Is it possible for you to have Netbeans' Error Reporter automatically attach the formatting rules the next time someone runs into this issue? Clearly it is still a problem because reports keep on coming in.
Comment 21 Jaroslav Havlin 2014-12-05 17:50:49 UTC
*** Bug 249048 has been marked as a duplicate of this bug. ***
Comment 22 Jaroslav Havlin 2014-12-12 14:57:51 UTC
*** Bug 249317 has been marked as a duplicate of this bug. ***
Comment 23 Jaroslav Havlin 2015-01-13 15:36:27 UTC
*** Bug 249503 has been marked as a duplicate of this bug. ***
Comment 24 Jaroslav Havlin 2015-01-20 13:21:03 UTC
*** Bug 249811 has been marked as a duplicate of this bug. ***
Comment 25 Jaroslav Havlin 2015-01-23 07:40:17 UTC
*** Bug 249948 has been marked as a duplicate of this bug. ***
Comment 26 Jaroslav Havlin 2015-02-02 09:31:38 UTC
*** Bug 250010 has been marked as a duplicate of this bug. ***
Comment 27 Jaroslav Havlin 2015-08-14 13:59:18 UTC
*** Bug 251114 has been marked as a duplicate of this bug. ***
Comment 28 Jaroslav Havlin 2015-09-09 08:56:15 UTC
*** Bug 255103 has been marked as a duplicate of this bug. ***
Comment 29 Jaroslav Havlin 2015-09-14 07:30:59 UTC
*** Bug 255253 has been marked as a duplicate of this bug. ***
Comment 30 Jaroslav Havlin 2015-09-22 11:02:05 UTC
*** Bug 255473 has been marked as a duplicate of this bug. ***
Comment 31 Jaroslav Havlin 2016-02-04 12:49:16 UTC
*** Bug 257716 has been marked as a duplicate of this bug. ***