Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342331 - npe when running repo2runnable apitooling.analysis_reportconversion task in SDK build
Summary: npe when running repo2runnable apitooling.analysis_reportconversion task in S...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 16:24 EDT by Kim Moir CLA
Modified: 2011-04-24 20:39 EDT (History)
3 users (show)

See Also:


Attachments
xml report (13.71 KB, application/xml)
2011-04-11 16:25 EDT, Kim Moir CLA
no flags Details
Proposed fix (3.02 KB, patch)
2011-04-13 12:08 EDT, Olivier Thomann CLA
no flags Details | Diff
api verify xml files (52.72 KB, application/octet-stream)
2011-04-13 16:47 EDT, Kim Moir CLA
no flags Details
Proposed fix (1.23 KB, patch)
2011-04-14 10:38 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix (3.24 KB, patch)
2011-04-14 10:52 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Moir CLA 2011-04-08 16:24:53 EDT
[apitooling.analysis_reportconversion] problem message : org.eclipse.ltk.internal.ui.refactoring.util.ViewerPane illegally extends org.eclipse.swt.custom.ViewForm
[apitooling.analysis_reportconversion] problem severity : 1
[apitooling.analysis_reportconversion] problem message : org.eclipse.ltk.ui.refactoring.TextEditChangeNode extends non-API type org.eclipse.ltk.internal.ui.refactoring.InternalTextEditChangeNode
[apitooling.analysis_reportconversion] problem severity : 1
[apitooling.analysis_reportconversion] problem message : org.eclipse.ltk.ui.refactoring.TextEditChangeNode.ChildNode extends non-API type org.eclipse.ltk.internal.ui.refactoring.PreviewNode
[apitooling.analysis_reportconversion] problem severity : 1
[apitooling.analysis_reportconversion] problem message : Constructor for org.eclipse.ltk.ui.refactoring.TextEditChangeNode.ChildNode with non-API parameter type org.eclipse.ltk.internal.ui.refactoring.PreviewNode
[apitooling.analysis_reportconversion] problem severity : 1
[apitooling.analysis_reportconversion] category : bundleVersion
  [antcall] Exiting /builds/N201104081307/org.eclipse.releng.eclipsebuilder/buildAll.xml.

BUILD FAILED
/builds/N201104081307/org.eclipse.releng.eclipsebuilder/buildAll.xml:83: The following error occurred while executing this line:
I just switched the build to use I20110406-1223 bundles. I get an NPE when running the apitooling.analysis_reportconversion task.

<apitooling.analysis_reportconversion xmlfiles="${report_directory_location}" debug="true" htmlfiles="${html_directory_location}" />


/builds/N201104081307/org.eclipse.releng.eclipsebuilder/buildAll.xml:464: java.lang.NullPointerException
        at org.eclipse.pde.api.tools.internal.tasks.AnalysisReportConversionTask.dumpReport(AnalysisReportConversionTask.java:367)
        at org.eclipse.pde.api.tools.internal.tasks.AnalysisReportConversionTask.execute(AnalysisReportConversionTask.java:456)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(Eclipse
Comment 1 Curtis Windatt CLA 2011-04-11 11:39:15 EDT
We should add a better debug statement in the handler.
Comment 2 Michael Rennie CLA 2011-04-11 14:40:49 EDT
(In reply to comment #1)
> We should add a better debug statement in the handler.

Looking at the code it appears the XML report might be bogus and the report converter is blowing up because it expected to find the XML element 'report' to create a new report object handle - which does not happen, leading to the NPE in dumpReport(..).
Comment 3 Kim Moir CLA 2011-04-11 16:25:44 EDT
Created attachment 192978 [details]
xml report
Comment 4 Olivier Thomann CLA 2011-04-11 16:59:03 EDT
I'll take a look.
Comment 5 Olivier Thomann CLA 2011-04-13 12:04:29 EDT
The attached xml report is simply not the right one.
I wonder if the right task has been called before the conversion task. The xml report attached to this bug report should be the one created for deprecation or api freeze tasks.
Can I see where this is invoked ?
Comment 6 Olivier Thomann CLA 2011-04-13 12:08:58 EDT
Created attachment 193168 [details]
Proposed fix

The api analysis task is supposed to create a bunch of reports, not just one.
Comment 7 Olivier Thomann CLA 2011-04-13 12:57:22 EDT
I don't think that the report attached is the one from the call in the buildAll.xml file.
Would it be possible to get all reports in:
${report}/apitoolsverifications/xml
?
Comment 8 Kim Moir CLA 2011-04-13 13:20:52 EDT
Olivier, I have to run the build again to recreate those files.  The build is from a few days ago, and the build output was automatically deleted.  I'll provide the files once they are available later today.
Comment 9 Kim Moir CLA 2011-04-13 16:47:57 EDT
Created attachment 193195 [details]
api verify xml files
Comment 10 Olivier Thomann CLA 2011-04-14 10:38:24 EDT
Created attachment 193260 [details]
Proposed fix

Better fix. The problem came from the counts.xml file which doesn't contain a <report> element.
The converter now ignores such files and print a debug statement if debug is enabled to log what file was skipped.
Comment 11 Olivier Thomann CLA 2011-04-14 10:52:14 EDT
Created attachment 193261 [details]
Proposed fix
Comment 12 Olivier Thomann CLA 2011-04-14 10:55:16 EDT
Released for 3.7M7.
The conversion task now logs unknown elements in debug mode.

[apitooling.analysis_reportconversion] unknown element : reportedcount
[apitooling.analysis_reportconversion] Skipped file : c:\tests_api\analysis\xml\counts.xml
Comment 13 Kim Moir CLA 2011-04-24 20:39:33 EDT
Thanks Olivier. Verified that this was fixed in 3.7M7 by running a test build with the bundles from I20110421-1800.