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 253815

Summary: NullPointerException at org.netbeans.modules.web.inspect.webkit.ui.MatchedPropertyNode.<init>
Product: web Reporter: Vladimir Riha <vriha>
Component: InspectionAssignee: Jan Stola <jstola>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 218771
Attachments: stacktrace

Description Vladimir Riha 2015-07-26 18:50:53 UTC
Build: NetBeans IDE 8.1 Beta (Build 201507231027)
VM: Java HotSpot(TM) Client VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-ea-b25
OS: Linux

User Comments:
vriha: What I did:
 - used project from http://services.netbeans.org/synergy/server/api/attachment.php?id=140
 - run it in CHrome with NB integration on fullHD monitor
 - resized browser window to take 50% of monitor's width
 - started NetBeans inspection
 - select heading "NetBeans Testing App"
 - in NetBeans, press the Edit CSS Rules button in CSS Styles
 - in opened dialog, specified some ID and pointed it to skeleton.css (min-width 480px and max-width:768px)
 - confirmed the dialog




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedPropertyNode.<init>(MatchedPropertyNode.java:99)
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedPropertiesNode.addChildrenFor(MatchedPropertiesNode.java:145)
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedPropertiesNode.initChildren(MatchedPropertiesNode.java:107)
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedPropertiesNode.<init>(MatchedPropertiesNode.java:88)
   at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel.updateMatchedRules(CSSStylesSelectionPanel.java:644)
   at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel$9.run(CSSStylesSelectionPanel.java:628)
Comment 1 Vladimir Riha 2015-07-26 18:50:55 UTC
Created attachment 154911 [details]
stacktrace
Comment 2 Jan Stola 2015-07-27 14:45:40 UTC
When ID selector is used then both the CSS file and HTML files are modified. These modifications result in a race condition where matched rules may reference a stylesheet that is removed before it is linked with the matched rule.

Modified files: https://hg.netbeans.org/web-main/rev/fd94f14922a2
Comment 3 Quality Engineering 2015-07-28 01:20:52 UTC
Integrated into 'main-silver', will be available in build *201507280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fd94f14922a2
User: Jan Stola <jstola@netbeans.org>
Log: #253815: Avoiding a potential NPE.