Ticket #1870 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

SCIFIO barfs on this PNG file

Reported by: bdezonia Owned by: hinerm
Priority: major Milestone: imagej2-b7-ndim-data
Component: SCIFIO Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1563


I'm on the scifiocells branches. The attached PNG, which opens fine in IJ1, causes an exception to be thrown in IJ2

java.lang.ArrayIndexOutOfBoundsException: 258

at ome.scifio.formats.APNGFormat$Parser.typedParse(APNGFormat.java:481)
at ome.scifio.formats.APNGFormat$Parser.typedParse(APNGFormat.java:1)
at ome.scifio.AbstractParser.parse(AbstractParser.java:371)
at ome.scifio.AbstractParser.parse(AbstractParser.java:115)
at ome.scifio.AbstractParser.parse(AbstractParser.java:1)
at ome.scifio.AbstractReader.setSource(AbstractReader.java:251)
at ome.scifio.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:98)
at ome.scifio.io.img.ImgOpener.createReader(ImgOpener.java:450)
at ome.scifio.io.img.ImgOpener.initializeReader(ImgOpener.java:515)
at ome.scifio.io.img.ImgOpener.openImg(ImgOpener.java:288)
at ome.scifio.io.img.ImgOpener.openImg(ImgOpener.java:240)
at imagej.io.DefaultIOService.loadDataset(DefaultIOService.java:166)
at imagej.io.DefaultIOService.load(DefaultIOService.java:124)
at imagej.core.commands.io.OpenFile.run(OpenFile.java:87)
at imagej.command.CommandModule.run(CommandModule.java:163)
at imagej.module.ModuleRunner.run(ModuleRunner.java:169)
at imagej.module.ModuleRunner.call(ModuleRunner.java:126)
at imagej.module.ModuleRunner.call(ModuleRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)


EL_ImageToProcess2.png Download (312.6 KB) - added by bdezonia 7 years ago.

Change History

Changed 7 years ago by bdezonia

comment:1 Changed 7 years ago by hinerm

The PLTE parsing wasn't dividing array indices.. so if the PLTE length was 768, it would try to populate 3x size 256 arrays at indices 0, 3, 6.. up to 768.

Fixed now to populate indices 0, 1, 2... up to the actual lut length and not the combined lut length.

Works locally on latest scifiocells branch.

comment:2 Changed 7 years ago by bdezonia

  • Blocking 1563 added; 1457 removed
  • Milestone changed from imagej2-b8-analysis to imagej2-b7-ndim-data

comment:3 Changed 7 years ago by bdezonia

Verified the fix works on the upstream branch of scfio-cells. When merged to master this ticket can close.

comment:4 Changed 7 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

Merged. Closing.

Note: See TracTickets for help on using tickets.