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 182504 - IllegalStateException: startOffset=524, length=0, highlight: <524,525>, newlineOffset=525
Summary: IllegalStateException: startOffset=524, length=0, highlight: <524,525>, newli...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: issues@editor
URL:
Keywords:
: 182671 182771 182981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-22 15:24 UTC by David Strupl
Modified: 2010-04-07 13:07 UTC (History)
19 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166785


Attachments
stacktrace (2.98 KB, text/plain)
2010-03-22 15:24 UTC, David Strupl
Details
stacktrace (2.98 KB, text/plain)
2010-03-24 09:40 UTC, Jaromir Uhrik
Details
stacktrace (2.98 KB, text/plain)
2010-03-24 10:20 UTC, Jaromir Uhrik
Details
stacktrace (2.98 KB, text/plain)
2010-03-24 13:14 UTC, Tomas Mysik
Details
stacktrace (4.07 KB, text/plain)
2010-03-25 00:26 UTC, Jesse Glick
Details
stacktrace (4.11 KB, text/plain)
2010-03-25 10:35 UTC, schkovich
Details
stacktrace (2.98 KB, text/plain)
2010-03-25 10:40 UTC, schkovich
Details
stacktrace (4.05 KB, text/plain)
2010-03-25 11:38 UTC, Ondrej Vrabec
Details
stacktrace (5.07 KB, text/plain)
2010-03-25 13:29 UTC, Alexandr Scherbatiy
Details
stacktrace (2.98 KB, text/plain)
2010-03-25 16:05 UTC, Jesse Glick
Details
stacktrace (2.98 KB, text/plain)
2010-03-25 16:44 UTC, Jesse Glick
Details
stacktrace (2.98 KB, text/plain)
2010-03-26 09:48 UTC, kawazu428
Details
stacktrace (2.98 KB, text/plain)
2010-03-26 09:52 UTC, kawazu428
Details
stacktrace (2.98 KB, text/plain)
2010-03-26 22:39 UTC, franci
Details
stacktrace (2.98 KB, text/plain)
2010-03-26 22:43 UTC, franci
Details
stacktrace (2.98 KB, text/plain)
2010-03-26 22:50 UTC, franci
Details
stacktrace (3.53 KB, text/plain)
2010-03-28 18:41 UTC, host
Details
stacktrace (9.26 KB, text/plain)
2010-04-02 13:15 UTC, Egor Ushakov
Details
stacktrace (5.23 KB, text/plain)
2010-04-06 09:42 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2010-03-22 15:24:49 UTC
Build: NetBeans IDE Dev (Build 100322-d21f93e873b9)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.3-b01-101, Java(TM) SE Runtime Environment, 1.6.0_17-b04-248-9M3125
OS: Mac OS X

User Comments:
dstrupl: Deleted the whole line by Ctrl-X




Stacktrace: 
java.lang.IllegalStateException: startOffset=524, length=0, highlight: <524,525>, newlineOffset=525
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.createHighlightsView(HighlightsViewFactory.java:143)
   at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.createView(HighlightsViewFactory.java:137)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:261)
   at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:215)
   at org.netbeans.modules.editor.lib2.view.ViewUpdates.checkRebuild(ViewUpdates.java:417)
   at org.netbeans.modules.editor.lib2.view.ViewUpdates$FactoriesListener.viewFactoryChanged(ViewUpdates.java:446)
Comment 1 David Strupl 2010-03-22 15:24:53 UTC
Created attachment 95545 [details]
stacktrace
Comment 2 Jaromir Uhrik 2010-03-24 09:40:24 UTC
Created attachment 95648 [details]
stacktrace

typing in editor and the exception appeared...
Comment 3 David Strupl 2010-03-24 09:42:22 UTC
I have changed the category of the report. Might become P2 if people see it frequently.
Comment 4 Jaromir Uhrik 2010-03-24 10:20:20 UTC
Created attachment 95658 [details]
stacktrace

deleted block of code and the exceptiona appeared...
Comment 5 Tomas Mysik 2010-03-24 13:14:25 UTC
Created attachment 95673 [details]
stacktrace

- have a PHP file
- select several words
- delete them

-> exception
Comment 6 David Strupl 2010-03-24 16:35:03 UTC
*** Bug 182671 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2010-03-25 00:26:39 UTC
Created attachment 95737 [details]
stacktrace
Comment 8 err 2010-03-25 00:49:16 UTC
This is related to the new view hierarchy. If you start up with     -J-Dorg.netbeans.editor.linewrap.disable=true
you won't see this (at least it worked for me).
Comment 9 Exceptions Reporter 2010-03-25 10:25:00 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166785
Comment 10 Exceptions Reporter 2010-03-25 10:25:55 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166785
Comment 11 schkovich 2010-03-25 10:35:53 UTC
Created attachment 95771 [details]
stacktrace

IllegalStateException: startOffset=1521, length=0, highlight: <1521,1522>, newlineOffset=1522

After typing dollar sign on the new line exeption was thrown. I did not trigger code completition but I guess that it's triggerd automatically.
Comment 12 schkovich 2010-03-25 10:40:44 UTC
Created attachment 95774 [details]
stacktrace

IllegalStateException: startOffset=1481, length=0, highlight: <1481,1489>, newlineOffset=1490

Cutting the line (ctrl+x) is thowing above exceptions. It is not related to file type. Applies for php, js, html and ini files.
Comment 13 schkovich 2010-03-25 10:52:01 UTC
Adding -J-Dorg.netbeans.editor.linewrap.disable=true did stop throwing error when cutting line (ctrl+x) but I guess this is just a temporary solution. :)
Comment 14 Ondrej Vrabec 2010-03-25 11:38:54 UTC
Created attachment 95785 [details]
stacktrace
Comment 15 Alexandr Scherbatiy 2010-03-25 13:29:40 UTC
Created attachment 95804 [details]
stacktrace
Comment 16 Miloslav Metelka 2010-03-25 13:44:01 UTC
http://hg.netbeans.org/jet-main/rev/3a1924028683
Comment 17 Miloslav Metelka 2010-03-25 13:56:56 UTC
*** Bug 182771 has been marked as a duplicate of this bug. ***
Comment 18 Jesse Glick 2010-03-25 16:05:31 UTC
Created attachment 95837 [details]
stacktrace
Comment 19 Jesse Glick 2010-03-25 16:44:00 UTC
Created attachment 95843 [details]
stacktrace
Comment 20 kawazu428 2010-03-26 09:48:16 UTC
Created attachment 95904 [details]
stacktrace
Comment 21 kawazu428 2010-03-26 09:52:15 UTC
Created attachment 95905 [details]
stacktrace
Comment 22 esmithbss 2010-03-26 20:00:38 UTC
I have just experienced this bug a number of times in the editor; however, unlike the previous exceptions which indicate this occurs during the cut or delete operation, I am receiving this during paste operations, both with and without overwriting existing code blocks.
Comment 23 franci 2010-03-26 22:39:30 UTC
Created attachment 96033 [details]
stacktrace

select 2 lines, press delete an it throws an exception
Comment 24 franci 2010-03-26 22:43:31 UTC
Created attachment 96035 [details]
stacktrace

just typing in the java editor
Comment 25 franci 2010-03-26 22:50:29 UTC
Created attachment 96036 [details]
stacktrace

just saving while editing a java file
Comment 26 David Strupl 2010-03-26 22:57:12 UTC
Eric, did you check whether your build contains the fix before reopenning?
Comment 27 Quality Engineering 2010-03-27 06:11:46 UTC
Integrated into 'main-golden', will be available in build *201003270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3a1924028683
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #182504 - IllegalStateException: startOffset=524, length=0, highlight: <524,525>, newlineOffset=525 - ignored empty highlight.
Comment 28 host 2010-03-28 18:41:11 UTC
Created attachment 96108 [details]
stacktrace
Comment 29 David Strupl 2010-03-29 13:46:16 UTC
Closing as fixed by Mila. Please reopen only if seen in build that contains Mila's changes.
Comment 30 Alexandr Scherbatiy 2010-03-31 12:29:00 UTC
The issue is still reproduced in build NetBeans IDE Dev (Build 201003290201)
Comment 31 Miloslav Metelka 2010-03-31 12:41:27 UTC
Alexandr, could you please specify how the issue can be reproduced in current build? Thanks.
Comment 32 Alexandr Scherbatiy 2010-03-31 12:56:11 UTC
- Install NetBeans with JavaFX plugin on Windows XP.
   Build NetBeans-JavaFX-Soma: #203
- Create a JavaFX application
- Copy the code to the editor:
----------------------------------------------------
package javafxapplication16;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.ScrollView;

Stage {
    title: "MyApp"
    onClose: function () {
    }
    scene: Scene {
        width: 200
        height: 200
        content: [
ScrollView {}
            
            
            ]
    }
}
----------------------------------------------------


- Format the code

The exception pops up.

See the exception report: 
http://statistics.netbeans.org/analytics/exception.do?id=363513
Comment 33 Alexandr Scherbatiy 2010-04-01 09:01:24 UTC
See the exception report for NetBeans IDE Dev (Build 201003290201)
http://statistics.netbeans.org/analytics/exception.do?id=364231
Comment 34 Egor Ushakov 2010-04-02 13:15:42 UTC
Created attachment 96595 [details]
stacktrace
Comment 35 Tomas Mysik 2010-04-06 09:42:11 UTC
Created attachment 96744 [details]
stacktrace
Comment 36 Miloslav Metelka 2010-04-06 10:31:02 UTC
I have rewritten ViewBuilder considerably and I hope that it should no longer fail (random tests for 20000 iterations showed no failures). Please reopen if there would be any more problems. Thanks.
http://hg.netbeans.org/jet-main/rev/b7e78d3bbaa7
Comment 37 Quality Engineering 2010-04-07 04:39:57 UTC
Integrated into 'main-golden', will be available in build *201004070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b7e78d3bbaa7
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #182504 - IllegalStateException: startOffset=524, length=0, highlight: <524,525>, newlineOffset=525.
Comment 38 Miloslav Metelka 2010-04-07 13:07:50 UTC
*** Bug 182981 has been marked as a duplicate of this bug. ***