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 229517 - AssertionError at org.netbeans.modules.css.model.api.ModelUtils.findMatchingRule
Summary: AssertionError at org.netbeans.modules.css.model.api.ModelUtils.findMatchingRule
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-08 22:44 UTC by herent
Modified: 2013-05-27 14:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 200516


Attachments
stacktrace (2.16 KB, text/plain)
2013-05-08 22:44 UTC, herent
Details
stacktrace (2.16 KB, text/plain)
2013-05-09 06:04 UTC, Vladimir Riha
Details
stacktrace (2.16 KB, text/plain)
2013-05-26 09:40 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description herent 2013-05-08 22:44:01 UTC
This bug was originally marked as duplicate of bug 219862, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201304292301)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Linux

User Comments:
herent: Just editing a CSS file. Nearly every keystroke was throwing up this error. I was at the bottom of the file (18 lines long, not much there at all, no complicated selectors or nested brackets or anything) trying to type .sem-field-container 

It seems like these CSS errors show up when you are editing a line of css that is incorrect at that particular moment, so if you are missing a comma or have rules with commas but no brackets, then the error will show up.

Honestly, if these errors are in the production release, I will have to find a different IDE. Most of what I do involves CSS.




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.css.model.api.ModelUtils.findMatchingRule(ModelUtils.java:135)
   at org.netbeans.modules.css.visual.RuleEditorPanel$6.run(RuleEditorPanel.java:519)
   at org.netbeans.modules.css.model.api.Model$1.run(Model.java:273)
   at org.openide.util.Mutex.readAccess(Mutex.java:367)
   at org.netbeans.modules.css.model.api.Model.runReadTask(Model.java:270)
   at org.netbeans.modules.css.visual.RuleEditorPanel.setModel(RuleEditorPanel.java:515)
Comment 1 herent 2013-05-08 22:44:02 UTC
Created attachment 134238 [details]
stacktrace
Comment 2 Vladimir Riha 2013-05-09 06:03:32 UTC
reproducible, see 
http://statistics.netbeans.org/exceptions/exception.do?id=670995
Comment 3 Vladimir Riha 2013-05-09 06:04:49 UTC
Created attachment 134241 [details]
stacktrace

I had this css file:


root { 
    display: block;
}

.eas-asda{

}

.nic


And I typed {} after ".nic"
Comment 4 Marek Fukala 2013-05-09 06:32:06 UTC
>Honestly, if these errors are in the production release, I will have to find a
>different IDE. Most of what I do involves CSS.

This issue is caused by updating between dev builds which is not supported scenario. Will definitively not happen in production.
Comment 5 Marek Fukala 2013-05-09 06:33:12 UTC
> This issue is caused by updating between dev builds which is not supported
> scenario. Will definitively not happen in production.
Oops, pls disregard this.
Comment 6 Marek Fukala 2013-05-09 06:41:09 UTC
100% reproducible on Vlada's sample: 
1) type the {} after the last rule, 
2) and then delete it.
Comment 7 Martin Fousek 2013-05-26 09:40:14 UTC
Created attachment 134907 [details]
stacktrace

paste into css editor with error
Comment 8 Marek Fukala 2013-05-27 14:09:53 UTC
looks like fixed by  web-main#00cca0ce8915 (issue 227751)