Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICS: Fix NPE when image name is empty #4197

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

dgault
Copy link
Member

@dgault dgault commented Jun 14, 2024

Issue was raised on forum thread https://forum.image.sc/t/issues-with-ics-ids-files/97696

A sample file reproducing the issue with Bio-Formats 7.3.0 is available at https://zenodo.org/records/11637422

To test:
Without this PR, opening the file results in an NPE:

java.lang.NullPointerException
	at loci.formats.in.ICSReader.initFile(ICSReader.java:1481)
	at loci.formats.FormatReader.setId(FormatReader.java:1480)
	at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:498)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:141)
	at loci.plugins.in.Importer.showDialogs(Importer.java:156)
	at loci.plugins.in.Importer.run(Importer.java:77)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:244)
	at ij.IJ.runPlugIn(IJ.java:210)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at ij.IJ.run(IJ.java:326)
	at ij.IJ.run(IJ.java:337)
	at ij.macro.Functions.doRun(Functions.java:703)
	at ij.macro.Functions.doFunction(Functions.java:99)
	at ij.macro.Interpreter.doStatement(Interpreter.java:281)
	at ij.macro.Interpreter.doStatements(Interpreter.java:267)
	at ij.macro.Interpreter.run(Interpreter.java:163)
	at ij.macro.Interpreter.run(Interpreter.java:93)
	at ij.macro.MacroRunner.run(MacroRunner.java:146)
	at java.lang.Thread.run(Thread.java:750)

With the PR included, the file should open without an exception and the images display as expected

@dgault dgault added this to the 8.0.0 milestone Jun 14, 2024
@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/issues-with-ics-ids-files/97696/4

@dgault dgault requested a review from melissalinkert June 17, 2024 13:13
Copy link
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. I've added the dataset in https://github.com/openmicroscopy/data_repo_config/pull/613, so assuming builds pass in the morning I'd be OK with this getting merged.

@melissalinkert melissalinkert merged commit 7ca9980 into ome:develop Jun 18, 2024
18 checks passed
@dgault dgault modified the milestones: 8.0.0, 7.3.1 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants