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 176216

Summary: NPE can happen while editing XSD with big content.
Product: xml Reporter: Nikita Krjukov <supernikita>
Component: XAMAssignee: Nikita Krjukov <supernikita>
Status: VERIFIED FIXED    
Severity: normal CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: The project
NPE stack trace

Description Nikita Krjukov 2009-11-09 05:52:17 UTC
Step to reproduce: 
-- Open the attached Java project 
-- Open the files: newXmlSchema.xsd and newWSDL.wsdl
-- The schema file contains element newElement at the top. Delete the name attribute. It makes the schema incorrect but it shouldn't cause an exception. 
-- Switch to the wsdl and call its validation. The NPE happens. See the attachment.
Comment 1 Nikita Krjukov 2009-11-09 05:55:08 UTC
Created attachment 90597 [details]
The project
Comment 2 Nikita Krjukov 2009-11-09 05:55:43 UTC
Created attachment 90598 [details]
NPE stack trace
Comment 3 Nikita Krjukov 2009-11-09 06:21:08 UTC
The exception happens as a result of having a global schema component without name attribute. It is illegal case because all global components should have a name. But it can happen at least temporary because of editing xml sources manually. 
I put P2 priority because the NPE doesn't cause any extra problems. It only affects index building and system goes on working without index.
Comment 4 Nikita Krjukov 2009-11-09 09:56:01 UTC
The problem has initially appeared in gfesbv22 branch's automatic tests. Although it doesn't cause serious errors, it can scare customers. So it's necessary to think if we going to consider it as a candidate to 67patch.
Comment 5 Nikita Krjukov 2009-11-09 11:48:08 UTC
Fixed in trunk http://hg.netbeans.org/main/rev/2dca0f29bace
Comment 6 Nikita Krjukov 2009-11-26 09:27:13 UTC
Verified in trunk with build 26.11.2009
Comment 7 Nikita Krjukov 2009-11-26 09:28:08 UTC
It's necessary to migrate the changes to NetBeans 6.7.1 branch
Comment 8 pgebauer 2009-11-26 15:29:38 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/682b46e0bbc6
Comment 9 Nikita Krjukov 2009-11-30 07:45:08 UTC
I've verified the fix in NetBeans 6.7 after downloading updated modules from the update center.