Bug 42520 - NPE in Picture.getPictureData()
Summary: NPE in Picture.getPictureData()
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.5-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL: http://www.dynamiclogic.com/Starcom_D...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-25 09:12 UTC by Ivan Todoroski
Modified: 2008-11-05 09:20 UTC (History)
1 user (show)



Attachments
copy of PPT file (267.00 KB, application/vnd.ms-powerpoint)
2007-05-25 19:50 UTC, Ivan Todoroski
Details
copy of PPT file in case URL disappears (267.00 KB, application/vnd.ms-powerpoint)
2007-05-25 19:50 UTC, Ivan Todoroski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Todoroski 2007-05-25 09:12:46 UTC
To reproduce:

SlideShow slideShow = new SlideShow(new 
HSLFSlideShow("Starcom_Dynamic_Logic_Decay.ppt"));
ShapeGroup shapeGroup = (ShapeGroup)slideShow.getSlides()[11].getShapes()[10];
Picture picture = (Picture)shapeGroup.getShapes()[0];
picture.getPictureData();
Comment 1 Ivan Todoroski 2007-05-25 19:50:12 UTC
Created attachment 20275 [details]
copy of PPT file
Comment 2 Ivan Todoroski 2007-05-25 19:50:44 UTC
Created attachment 20276 [details]
copy of PPT file in case URL disappears
Comment 3 Ivan Todoroski 2007-05-25 19:53:05 UTC
ignore the first attachment it was a wrong version that I modified
Comment 4 Yegor Kozlov 2007-05-26 00:31:03 UTC
Fixed

The shape group on slide 11 contains a Picture with no reference to the picture
data. I changed Picture.getPictureData() to return null instead of throwing NPE
in such cases.
 
Yegor
Comment 5 Yegor Kozlov 2008-11-05 09:20:05 UTC
Reopening a bug without description won't help us much to fix the problem.

Try the latest svn trunk. Daily builds are available at
http://encore.torchbox.com/poi-svn-build/

Yegor