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 - NPE at org.netbeans.lib.lexer.EmbeddedTokenList.createLexerInputOperation()
Summary: NPE at org.netbeans.lib.lexer.EmbeddedTokenList.createLexerInputOperation()
Status: RESOLVED FIXED
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: RANDOM
: 118797 119197 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-30 11:50 UTC by Marek Fukala
Modified: 2007-11-05 21:23 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The JSP file (472 bytes, text/plain)
2007-10-30 11:51 UTC, Marek Fukala
Details
The NPEs (9.10 KB, text/plain)
2007-10-30 11:51 UTC, Marek Fukala
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***