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 114980 - NPE from EmbeddedTokenList.createLexerInputOperation while editing RHTML file
Summary: NPE from EmbeddedTokenList.createLexerInputOperation while editing RHTML file
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-07 09:40 UTC by Jiri Skrivanek
Modified: 2007-09-10 08:04 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Entire stack trace. (3.63 KB, text/plain)
2007-09-07 09:41 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2007-09-07 09:40:30 UTC
NullPointerException is thrown when you editing RHTML file. I can reproduce it beta1 200709070000 and because it breaks
editing when it appears I recommend to fix it in beta branch. To reproduce:

- create Ruby Application
- open new file wizard
- choose Ruby|RHTML file
- go to the end of the file
- type <%= l
- type backspace until you remove entire previously typed text
- type <%= l

java.lang.NullPointerException
	at org.netbeans.lib.lexer.EmbeddedTokenList.createLexerInputOperation(EmbeddedTokenList.java:311)
	at org.netbeans.lib.lexer.inc.TokenListUpdater.update(TokenListUpdater.java:353)


Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709070000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 1 Jiri Skrivanek 2007-09-07 09:41:08 UTC
Created attachment 48361 [details]
Entire stack trace.
Comment 2 Marian Mirilovic 2007-09-07 10:36:06 UTC
Mila,
isn't this connected with fix of issue 114613 ?
Comment 3 Miloslav Metelka 2007-09-07 12:18:19 UTC
I have finally reproduced the problem in the release60_beta1 branch. I had one debug turned on that caused the problem
to not appear.
The problem does not appear in the trunk likely because there is already a different version of HTMLLexer and JSPLexer
in the trunk.
It's in fact caused by issue 114613 but this one should be easy to fix compared to the whole scope of the 114613.
Comment 4 Miloslav Metelka 2007-09-07 14:26:40 UTC
I have a fix, I'm just checking editing of various types. I will commit within 15 minutes.
Comment 5 Miloslav Metelka 2007-09-07 14:44:01 UTC
Checking in TokenHierarchyUpdate.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java,v  <--  TokenHierarchyUpdate.java
new revision: 1.4; previous revision: 1.3
done
Checking in TokenListList.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenListList.java,v  <--  TokenListList.java
new revision: 1.8; previous revision: 1.7
Comment 6 Miloslav Metelka 2007-09-07 22:04:06 UTC
Checking in src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java,v  <--  TokenHierarchyUpdate.java
new revision: 1.3.2.2; previous revision: 1.3.2.1
done
Checking in src/org/netbeans/lib/lexer/TokenListList.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenListList.java,v  <--  TokenListList.java
new revision: 1.4.2.2; previous revision: 1.4.2.1
Comment 7 Jiri Skrivanek 2007-09-10 08:04:21 UTC
Verified in NB IDE 6.0 Beta 1 (Build 200709100000).