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 238292 - NPE at TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:269)
Summary: NPE at TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java...
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 238317 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-13 09:25 UTC by Jiri Skrivanek
Modified: 2013-11-26 10:09 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace. (2.79 KB, text/plain)
2013-11-13 09:25 UTC, Jiri Skrivanek
Details
Workaround patch (818 bytes, patch)
2013-11-18 12:43 UTC, victork
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2013-11-13 09:25:40 UTC
Created attachment 142116 [details]
Stack trace.

Please, review NullPointerException which breaks automated tests since build 201311120002. It happens while deleting characters in editor programmatically. To reproduce:

 ant -f php.editor test -Dtest.config=uicommit

http://test4u.cz.oracle.com/job/CommitValidationUI-trunk/lastCompletedBuild/testReport

java.lang.NullPointerException
	at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:269)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:328)
Comment 1 Jiri Skrivanek 2013-11-13 09:43:33 UTC
Correction, since today's build 201311130002.
Comment 2 Miloslav Metelka 2013-11-18 12:40:29 UTC
*** Bug 238317 has been marked as a duplicate of this bug. ***
Comment 3 victork 2013-11-18 12:43:46 UTC
Created attachment 142316 [details]
Workaround patch

Attached my workaround patch for the problem.

Meantime works fine - No NPE's and no disappear/corruption of nearby symbols on add/delete quotes and other tasks which triggered the regression.

Can help ppl till Miloslav comes back and fixes it.
Comment 4 victork 2013-11-18 13:08:37 UTC
Workaround patch triggers Assertion errors under some cirsumstances().
Proves its only partly suitable as temporary workaround.
Comment 5 Miloslav Metelka 2013-11-18 13:28:37 UTC
Yes, I have the same fix :-) Thanks. It took me a while to verify that the php test is fixed since the test was failing on another exception (php.editor module rebuild was needed).

http://hg.netbeans.org/jet-main/rev/cac4ab86192e
Comment 6 victork 2013-11-18 14:12:44 UTC
Indeed the fixes are similar :) but i'm sure your one got into right module and will not have assertion failures in lexer making the document empty in IDE like my one did(Whats why my is workaround and you as expected is a real fix :) ).

Thanks.
Comment 7 Miloslav Metelka 2013-11-18 15:21:39 UTC
Since the problem in fact is a consequence of implementing issue 230125 which is already integrated in release74 I've also added this fix into release74:

In release74:
cac4ab86192e transplanted to f84244fd6d53
Comment 8 Quality Engineering 2013-11-18 18:40:35 UTC
Integrated into 'releases/release74', will be available in build *201311181624* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/f84244fd6d53
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #238292 - NPE at TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:269).
(transplanted from cac4ab86192e389c55f0b559a0c36861665f9dc7)
Comment 9 victork 2013-11-19 12:50:18 UTC
Can this patch be merged into main-silver?
Comment 10 Miloslav Metelka 2013-11-26 10:09:01 UTC
(In reply to victork from comment #9)
> Can this patch be merged into main-silver?

It's already there: http://hg.netbeans.org/main-silver/rev/cac4ab86192e