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 246688

Summary: NullPointerException at org.netbeans.modules.cnd.simpleunit.utils.CodeGenerationUtils.generateCanonicalParameterTypeAndName
Product: cnd Reporter: Exceptions Reporter <exceptions_reporter>
Component: UnitTest SupportAssignee: danilasergeyev
Status: RESOLVED FIXED    
Severity: normal CC: alexvsimon
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 211404
Attachments: stacktrace

Description Exceptions Reporter 2014-08-25 19:59:10 UTC
This issue was reported manually by alexvsimon.
It already has 1 duplicates 


Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.11-b03, Java(TM) SE Runtime Environment, 1.8.0_11-b12
OS: Linux

User Comments:
GUEST: I was attempting to create a CUnit test from a C source file automatically via NetBeans.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.cnd.simpleunit.utils.CodeGenerationUtils.generateCanonicalParameterTypeAndName(CodeGenerationUtils.java:91)
   at org.netbeans.modules.cnd.simpleunit.utils.CodeGenerationUtils.generateParameterDeclaration(CodeGenerationUtils.java:80)
   at org.netbeans.modules.cnd.cncppunit.codegeneration.CUnitCodeGenerator.generateTemplateParamsForFunctions(CUnitCodeGenerator.java:111)
   at org.netbeans.modules.cnd.cncppunit.editor.filecreation.TestCUnitIterator.instantiate(TestCUnitIterator.java:121)
   at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605)
   at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:439)
Comment 1 Exceptions Reporter 2014-08-25 19:59:11 UTC
Created attachment 148893 [details]
stacktrace
Comment 2 henk89 2014-11-20 10:56:48 UTC
*** Bug 243533 has been marked as a duplicate of this bug. ***
Comment 3 henk89 2014-11-20 11:13:27 UTC
I was unable to reproduce it but org.netbeans.modules.cnd.simpleunit.utils.generateCanonicalParameterTypeAndName:91 could cause an NPE.
Comment 4 Alexander Simon 2015-07-03 08:03:41 UTC
Steps to reproduce:
- create C application
- add function:

void myprintf(const char *fmt, ...) {
}

- on "main.c" invoke pop-up menu and select "Create Test"->"New C Simple Test"
- select "myprintf" in vizard
- see exception on finising wizard
Comment 5 danilasergeyev 2015-07-22 15:47:17 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/343b2fed692f
Comment 6 Quality Engineering 2015-07-23 01:14:20 UTC
Integrated into 'main-silver', will be available in build *201507230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/343b2fed692f
User: Danila Sergeyev <danilasergeyev@netbeans.org>
Log: fix bug #246688 NullPointerException at org.netbeans.modules.cnd.simpleunit.utils.CodeGenerationUtils.generateCanonicalParameterTypeAndName
Comment 7 ilia 2015-09-28 09:49:58 UTC
*** Bug 255585 has been marked as a duplicate of this bug. ***