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 98841 - AssertionError when modifying token with empty embedding
Summary: AssertionError when modifying token with empty embedding
Status: RESOLVED DUPLICATE of bug 98861
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 98947 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-23 19:17 UTC by Marek Fukala
Modified: 2007-03-26 15:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The HTML file to reproduce (24 bytes, text/plain)
2007-03-23 19:17 UTC, Marek Fukala
Details
The AssertionError (4.59 KB, text/plain)
2007-03-23 19:18 UTC, Marek Fukala
Details
Stack trace - editing java file in build 20070326-0540. (3.05 KB, text/plain)
2007-03-26 08:47 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2007-03-23 19:17:04 UTC
When I create an emedding for a token in a way that the starSkipLength +
endSkipLength = length of the token and then modify the MutableInputSource in
the position where the start and end skip sections are connected, the
AssertionError is thrown. It is probably my fault that I create such strange
embedding, but I would at least expect the error message to be more
self-explanatory.

I am attaching an example HTML file to reproduce the problem. To reproduce:
1) build html/editor from embedding_60 branch
2) build Schliemann's engine,javascript and css
3) open the file
4) set the caret to 1:21 position 
5) press any key :-)
=> AssertionError happens.

You can watch the console output to see the what embedding is created. The [ ]
characters in the text of the token determines the part which is not 'skip area'.
Comment 1 Marek Fukala 2007-03-23 19:17:48 UTC
Created attachment 39887 [details]
The HTML file to reproduce
Comment 2 Marek Fukala 2007-03-23 19:18:43 UTC
Created attachment 39888 [details]
The AssertionError
Comment 3 Miloslav Metelka 2007-03-23 21:15:38 UTC
Sorry, I'm unable to reproduce. After typing right after ":" I only get some
logging on the console:

parse /usr/local/home/mmetelka/NetBeansProjects/A/src/testbugs/js_in_html.html 1 0

I've checked out html/editor today about 5 pm. Do I need to update?
Comment 4 Jiri Skrivanek 2007-03-26 08:46:15 UTC
The same error appears in java file. To reproduce:

- create a new java project
- goto main method and type:

        "aaaa".equals("aaa");
        "b"

As soon as you type 'b' it starts to throwing AssertionError until you type
something behind closing qutotation mark.

Build 20070326-0540, JDK1.5.0_10, WindowsXP.
Comment 5 Jiri Skrivanek 2007-03-26 08:47:23 UTC
Created attachment 39927 [details]
Stack trace - editing java file in build 20070326-0540.
Comment 6 Marek Fukala 2007-03-26 10:47:19 UTC
I cannot reproduce the problem now. I do not remember I have changed something
related to the problem, just updated ide today. OTOH Jirka Skrivanek can
reproduce now on another place...
Comment 7 Miloslav Metelka 2007-03-26 12:27:03 UTC
I was able to reproduce and I'm working on a fix.
Comment 8 Marek Fukala 2007-03-26 13:02:02 UTC
*** Issue 98947 has been marked as a duplicate of this issue. ***
Comment 9 Miloslav Metelka 2007-03-26 15:51:01 UTC
Marking this a dup of 98861. Although this one was entered sooner the other one
was entered against the trunk directly.

*** This issue has been marked as a duplicate of 98861 ***