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 120451

Summary: NPE at org.netbeans.lib.lexer.EmbeddedTokenList.createLexerInputOperation()
Product: editor Reporter: Marek Fukala <mfukala>
Component: LexerAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: blocker CC: jsedek, mschovanek, pjiricka, ttran
Priority: P2 Keywords: RANDOM
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: The JSP file
The NPEs

Description Marek Fukala 2007-10-30 11:50:50 UTC
1) opened attached jsp file
=> the file was not colored at all, first NPE appeared
2) typed < at the end of line 24
=> the second attached NPE appeared.

I cannot reproduce it anymore.
Comment 1 Marek Fukala 2007-10-30 11:51:32 UTC
Created attachment 51984 [details]
The JSP file
Comment 2 Marek Fukala 2007-10-30 11:51:57 UTC
Created attachment 51985 [details]
The NPEs
Comment 3 Miloslav Metelka 2007-10-31 12:04:22 UTC
Looks like the token with embedding is detached from token hierarchy. I'll fix ASAP.
Comment 4 Miloslav Metelka 2007-10-31 17:19:45 UTC
I was only able to reproduce once when I restarted the IDE and typed '<' quickly into just opened jsp source (the one
attached). But now the same scenario does not produce any error anymore even when I attempted >10 times :( It's clear
that the issue is random so I suspect that there might be a RP thread accessing the token hierarchy without appropriate
locks but I need to verify that - the issue 120052 might help with it. In the meantime I've added some better diagnostics.

/cvs/lexer/src/org/netbeans/lib/lexer/EmbeddedTokenList.java,v  <--  EmbeddedTokenList.java
new revision: 1.20; previous revision: 1.19
Comment 5 Miloslav Metelka 2007-11-04 23:47:53 UTC
Well, I've attempted to also reproduce >5 times after fix of issue 120906 (its fix could eliminate this one too but I'm
not sure) but I still can't reproduce even with a fresh userdir. Marku could you please reproduce? Otherwise I would
believe that the 120906 had eliminated this one. Thanks.
Comment 6 Miloslav Metelka 2007-11-05 09:08:18 UTC
I have re-checked the things again - I have undone locally the last part of fix of #120906 (the one after I was able to
consistently reproduce the NPE that I've attached to #120906 e.g. in lexer's JoinSectionsTest etc.) and I was then able
to consistently reproduce this problem too.
So the fix of issue 120906 should eliminate this one too.
Comment 7 Miloslav Metelka 2007-11-05 21:21:09 UTC
*** Issue 118797 has been marked as a duplicate of this issue. ***
Comment 8 Miloslav Metelka 2007-11-05 21:23:58 UTC
*** Issue 119197 has been marked as a duplicate of this issue. ***