Bug in import image sequence

Hi all,

My Fiji throws an Exception window (as shown below) when I try to import a folder of images through either the drag & drop or the menu operation.

The image folder contains a text file, and this text file seems to be the problem. when I remove this text file and keep only images in the folder, Fiji works normal.

The older versions of Fiji have no such problem, and I also tried the original ImageJ, which also works normal.

Anyone has any solution to this issue?

Thanks in advance!


Did some digging. I tested some old versions of Fiji from Index of /fiji/archive (imagej.net). It seems that the problem starts from last August (Version 20200802-0255). Fiji updated a lot in last August (10 versions within a single month). Seems it greatly changed. I didn’t find any release note or changelog for Fiji. Does anyone know what happened in last August?

I am unable to reproduce this problem. Please post the text file that causes the error and the complete exception stack trace.

Hi Wayne,

Thanks for your response!

It’s an hdf5 file, not exactly a text file. Please see the attachment here. hdf5 file.rar (117.7 KB) (I modified the file due to the copyright, but it still reproduces the problem).

Here is the exception information in txt. Exception.txt (64.5 KB)

Besides, I tested some other non-image files, like .xls, .doc. Fiji is possible to import the images with these files in the image folder, but throws two windows of the same garbled text information. The following is the garbled text window when adding an empty xls file.

These problems only appear in the versions after August 2020.

Not sure if this helps,

The Image Sequence dialog was replaced by a new dialog (allowing drag-and-drop of filename) in ImageJ version 1.53d (August 2020) and this change introduced several problems. These problems were fixed during version 1.53e (September 2020) and 1.53f (October 2020). It has been working fine since version 1.53f8, at least for me. The new dialog (1.53f) has greatly improved functionality compared to the old one (1.53c). So the first thing you should try is to update the ImageJ version bundled with Fiji. You do this via menu “Help” → “Update ImageJ”.

The “garbled text” you see is apparently the contents of the “hdf5 file.rar”, which is shown as a separate window. Apparently, ImageJ does not recognize the file properly and shows it as a text window. I cannot reproduce your problem in getting an exception; probably it is the combination of file types in the folder that causes the problem. Try to reduce the folder to a minimum content that will still crash for you; zip that folder, and post it here to see if we can reproduce the problem. I think it is important to get sorted out all bugs related to image import as that is essential functionality.


This is a Fiji-specific bug that the ImageJ 1.53j26 daily build works around by adding “.rar” to the FolderOpener’s excludedTypes list.

excludedTypes = {".txt", ".lut", ".roi", ".pty", ".hdr", ".java", ".ijm", ".py", ".js", ".bsh", ".xml", ".rar"};

Hi Stein,

Many thanks to your comments.

Actually I have tested the ImageJ version of Fiji. As I mentioned, the latest normal version of Fiji (for my usage) is 20200721-1931, in which the ImageJ version is 1.52p. I updated it to 1.53i via Help > Update ImageJ, it worked fine. However, if I updated the whole software through Help > Update…, the problem appeared. So I think the problem may not lie in the ImageJ version.

As for the garbled text window, I agree with you that Fiji doesn’t recognize the file. However, if the non-image file is of .h5 type (This forum doesn’t accept .h5 files, so I put it in rar), no garbled text window will appear, instead, the software shows “Initializing base reader” for a while, and then throws nothing but the Exception window as I attached above.

The folder I used for testing is just a combination of two files, the h5 file and the screenshot file (png) of the exception window, which are both attached in my last reply. Here I zipped them.For test.rar (164.9 KB) I think the problem is not related to the image file.

Hi Wayne,

Thanks for your reply.

Sorry I don’t understand it.

The non-image file I used is an .h5 file (with an extension of h5, I zipped it in rar because the forum doesn’t accept .h5 file).

Hi Wayne,

Do you mean that the non-image file types should be added in the FolderOpener’s excludedTypes list to avoid this problem? Can I add them, e.g. “.h5”, by myself?

The ImageJ 1.53j27 daily build adds “.h5” to the excludedTypes list.

Hi Wayne,

Thanks a lot!

I updated ImageJ to the latest daily build version and it works now.

Is it possible to use a positive list? since the image types that ImageJ has supported are limited and known. The non-image types, which are not in the excludedtype list, can also cause problems. As I mentioned, the .xls, .doc files may generate unnecessary garbled text windows.

Anyway, that Fiji I’ve been using for years comes back. Many thanks!

Sorry, it reminds me of one more question.

Why does it work normal when using the original ImageJ while Fiji fails with the same ImageJ version? I updated the original ImageJ to 1.53i and it works fine. However, when I updated the ImageJ in Fiji to 1.53i, it has the problem. The ImageJ in Fiji is modified?

A positive list is not feasible because ImageJ and Bio-Formats support numerous file types and more can easily be added. The 1.53j27 daily build adds “.xls”, “.doc” to the excludedTypes list.

The ImageJ (ij.jar) included with Fiji is modified on startup by the imagej.patcher.LegacyInjector class.


Hi Wayne,

Thank you for your explanation.

Now I understand the logic, though I don’t catch the details inside because I know little about Java.