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 98807 - NPE when calling org.netbeans.lib.lexer.token.AbstractToken.toString(AbstractToken.java:206)
Summary: NPE when calling org.netbeans.lib.lexer.token.AbstractToken.toString(Abstract...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 98952 100079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-23 15:14 UTC by Marek Fukala
Modified: 2007-04-11 12:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The NPE (1.52 KB, text/plain)
2007-03-23 15:15 UTC, Marek Fukala
Details
The HTML file to reproduce (1004 bytes, text/plain)
2007-03-23 15:18 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-03-23 15:14:28 UTC
I am getting a NPE when AbstractToken.toString() is called. See the attached
stacktrace.

To reproduce:
1) build html/editor from 'embedding_60' branch
2) build languages/engine, scripting/javascript, languages/css and web/css
3) run NB
4) open attached file
5) type sg. into javascript embedded section for example line 15
=> after a while Schliemann parser runs and the NPE appears.
Comment 1 Marek Fukala 2007-03-23 15:15:27 UTC
Created attachment 39873 [details]
The NPE
Comment 2 Marek Fukala 2007-03-23 15:18:53 UTC
Created attachment 39874 [details]
The HTML file to reproduce
Comment 3 Marek Fukala 2007-03-23 15:23:47 UTC
The NPE appear after each  change in the document -> quite annoing -> P1. 

I am not sure, but maybe the same problem can happen somewhere else in a part of
the IDE which is a part of the build so would be good to fix in M8.

Adding Martin Schovanek and Jindra Sedek to CC so they are aware of the
potential M8 problem.

Anyway, thanks Milo for fixing the embedding problem, now it works perfectly,
just the NPE ... :-)
Comment 4 Miloslav Metelka 2007-03-26 16:10:41 UTC
I was able to reproduce. I'm currently checking whether the parser isn't using
an obsolete token that was already removed from the token hierarchy but anyway
it should not fail with NPE.
Comment 5 Marek Fukala 2007-04-03 12:57:29 UTC
I forgot to increase the priority. The bug is extremely annoying since it shows
up  after each change in the document - when Schliemann parser runs. Please fix
it ASAP.
Comment 6 Miloslav Metelka 2007-04-03 16:52:51 UTC
I'm working on the fix; I'm adding an extra logging that will help to find
identity of the removed tokens and check whether they are being still used or
not. The logging should also help with resolving of the issue 93644.
Comment 7 Marek Fukala 2007-04-05 11:48:06 UTC
*** Issue 100079 has been marked as a duplicate of this issue. ***
Comment 8 Miloslav Metelka 2007-04-05 14:41:39 UTC
This problem was caused by not updating reference to the root token at the more
nested embedding levels (string literal in javascript in html) that later caused
the NPE.
As part of the fix of issue 93644 this problem should also be eliminated.
Comment 9 Marek Fukala 2007-04-11 12:51:15 UTC
*** Issue 98952 has been marked as a duplicate of this issue. ***