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.
Summary: | NullPointerException at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.isWhiteSpaceToken | ||
---|---|---|---|
Product: | web | Reporter: | Vladimir Riha <vriha> |
Component: | CSS Visual Tools | Assignee: | David Konecny <dkonecny> |
Status: | VERIFIED WORKSFORME | ||
Severity: | normal | CC: | mfukala, mmirilovic, vriha |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 176959 |
Bug Depends on: | 195855 | ||
Bug Blocks: | |||
Attachments: |
stacktrace
stacktrace |
Description
Vladimir Riha
2011-02-23 13:21:39 UTC
Created attachment 106333 [details]
stacktrace
Created attachment 106335 [details]
stacktrace
What caused it:
1. Create new php web page
2. Right mouse click in the editor window and select Format
I reproduced it several times
Info:
Product Version: NetBeans IDE Dev (Build 201102230001)
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
I tried to reproduce on the same JDK 7 build but without success. I'm running on Ubuntu though. The error does not make much sense to me - token().text() must return null which is allowed according to its Javadoc but I wonder what triggers it. I would prefer to understand the cause then just blindly prevent the NPE. Keeping open for now and let's see whether more duplicate will be reported. For now marking as incomplete. Incomplete? Davide, common ... If you miss some information you can write which one and mark as incomplete, but it really doesn't fit into this situation. Vladimir can also run it with some logging if you want, as it looks like he is able to reproduce it (Lada are you able to reproduce it?) I miss how to reproduce it. I had a look at the code and tried all I could imagine to reproduce it but without any success. The change is in indentation code which has very good unit test coverage and this is first time I've seen this problem. Despite that the indentation code is abnormally complex and I do not want to change anything there unless I understand the cause. I could add some logging but right now my approach is to wait for more exception report duplicates to see that it really happens to more than one user. I wonder if JDK7 could be blamed for this. Based on that I chose INCOMPLETE - I need more info on how to reproduce, if it happens on JDK6, how often it happens, etc. But it can be WORSFORME as well. :-) A minute ago I reported it again, the log should be here shortly. Anyway, I noticed, that it happens probably only when issue #195855 occurs (at least for the last few attempts). So if I try to format php file, that is missing syntax highlighting, this error occurs. Btw, I managed to reproduce it on Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 (In reply to comment #6) > I noticed, that it happens probably only when issue #195855 occurs Some problem deep in editor lexing infrastructure would explain this issue. Let's wait for issue 195855 to get resolved and then see if this can be still reproduced. Verified... Product Version: NetBeans IDE 7.0.1 Dev (Build 201106072116) Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b15 |