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.
Build: NetBeans IDE 6.0 Beta 2 (Build 200710212201) VM: Java HotSpot(TM) Client VM, 1.6.0-b105 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 52235 [details] stacktrace
Can you provide the steps the reproduce this bug?
It'll be good if you could attach the xml and the dtd file.
*** Issue 123780 has been marked as a duplicate of this issue. ***
Sonali, please add a check and mark it fixed. Unless the reporter gives more info, it'll be difficult to reproduce.
Build: NetBeans IDE Dev (Build 200801280931) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows XP, 5.1, x86 User Comments: Just typing inside a xml file
Created attachment 56830 [details] stacktrace
Build: NetBeans IDE 6.1 Beta (Build 200803050202) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Linux, 2.6.22-14-generic, i386 User Comments:
Created attachment 58183 [details] stacktrace
Try the code completion for the <panel> indicated, trying to use another element instead 'panel': <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE panel PUBLIC '-//Thinlets 1.0//EN' 'https://thinlet.dev.java.net/thinlet.dtd'> <panel weightx="1" weighty="1" columns="1" gap="5" top="5" left="5" bottom="5" right="5"> <panel weightx="1" weighty="1" columns="1" gap="5" top="5" left="5" bottom="5" right="5"> <panel weightx="1" weighty="1" columns="1" gap="5" top="5" left="5" bottom="5" right="5"> </panel> <panel/> <!--Try code completion for this panel--> <panel/> <panel/> </panel> </panel>
hmichel, I'm trying this with 6.1 and works fine. Do you want to try in 6.1beta and let us know?
Product Version: NetBeans IDE Dev (Build 200803251204) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb) I can reproduce with the code supplied. First invocation of CC where is stated is fine, but when starting a new tag the exception happens.
Invoking CC manually for existing tag in this case is fine, when CC automatically begins when creating new tag is when exception happens. java.lang.NullPointerException at org.netbeans.modules.xml.dtd.grammar.ContentModel$MultiplicityGroup.eat(ContentModel.java:409) at org.netbeans.modules.xml.dtd.grammar.ContentModel$Sequence.eat(ContentModel.java:300) at org.netbeans.modules.xml.dtd.grammar.ContentModel.whatCanFollow(ContentModel.java:171) at org.netbeans.modules.xml.dtd.grammar.DTDGrammar.queryElements(DTDGrammar.java:217) at org.netbeans.modules.xml.text.completion.XMLCompletionQuery.queryElements(XMLCompletionQuery.java:319) at org.netbeans.modules.xml.text.completion.XMLCompletionQuery.query(XMLCompletionQuery.java:139) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider.queryImpl(XMLCompletionProvider.java:135) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider.access$000(XMLCompletionProvider.java:67) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider$Query.doQuery(XMLCompletionProvider.java:105) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider$Query.query(XMLCompletionProvider.java:117) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Ok, I see; will fix it.
I can only reproduce with that specific DTD that the document is based on. Others from the built-in catalog work for this scenario. Basically if a tag is self terminating (ie <foo/>) then the next tag started will give NPE. Easy steps to reproduce: 1. Uncomment the tag noted here: <!DOCTYPE panel PUBLIC '-//Thinlets 1.0//EN' 'https://thinlet.dev.java.net/thinlet.dtd'> <panel> <!-- <popupmenu/> --> </panel> 2. attempt to add a new tag after it, you will see problem
Fix integrated: http://hg.netbeans.org/main/rev/1bebd339db6d.