Can't open stacks in AIJ any longer - StackOverflowError

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't open stacks in AIJ any longer - StackOverflowError

cduston
This post was updated on .
So I am getting some new behavior from AIJ - I can no longer open stacks of images. I noticed this on my Pop_OS system (which I think is based on Ubuntu 22.04) last week, but I've checked again on my Slackware system:

$ uname -a
Linux Zonadar.home.org 6.2.11-cld #1 SMP PREEMPT_DYNAMIC Mon Apr 17 11:04:26 EDT 2023 x86_64 12th Gen Intel(R) Core(TM) i7-12700K GenuineIntel GNU/Linux
$ cat /etc/slackware-version
Slackware 15.0

The behavior is that 1) I open a single file from the main window, which works fine. 2) On the new window (with the image), I select File -> Open Image Sequence in New Window, 3) Doesn't open, instead I get a long error message starting with PatternSyntaxException (attached here).

This is at least reproducible in other directories on my machine, and appear to be true for both distros I've tried this one (Pop_OS and Slackware).

Oh, and I'm running 5.3.2.00, and checked update status by trying to force update to daily build. Also tried a simple reinstall of AIJ, no dice.

I have played with the memory settings a little bit, but mostly shooting in the dark, just turning down the memory and threads settings, but behavior still occurs.

Any further advice?

AIJ 5.3.2.00; ImageJ 1.54h2; Java 18.0.1 [64-bit]; Linux 6.2.11-cld; 291MB of 23
936MB (1%)
 
java.lang.StackOverflowError
	at java.desktop/sun.awt.X11GraphicsDevice.pGetBounds(Native Method)
	at java.desktop/sun.awt.X11GraphicsDevice.getBounds(Unknown Source)
	at java.desktop/sun.awt.X11GraphicsConfig.getBounds(Unknown Source)
	at java.desktop/java.awt.Window.init(Unknown Source)
	at java.desktop/java.awt.Window.<init>(Unknown Source)
	at java.desktop/java.awt.Window.<init>(Unknown Source)
	at java.desktop/java.awt.Dialog.<init>(Unknown Source)
	at java.desktop/java.awt.Dialog.<init>(Unknown Source)
	at ij.gui.GenericDialog.<init>(GenericDialog.java:127)
	at ij.gui.GenericDialog.<init>(GenericDialog.java:118)
	at ij.plugin.FolderOpener.showDialog(FolderOpener.java:628)
	at ij.io.Opener.openZip(Opener.java:1066)
	at ij.io.Opener.openImage(Opener.java:391)
	at ij.plugin.FolderOpener.getFileCount(FolderOpener.java:956)
	at ij.plugin.FolderOpener.showDialog(FolderOpener.java:673)

(and then it repeats the last 5 lines over and over)

PS: Actually, when I switch to a different directory I get a *slightly* different error message - but error occurs in the same place:

AIJ 5.3.2.00; ImageJ 1.54h2; Java 21.0.1 [64-bit]; Linux 6.2.11-cld; 279MB of 16
000MB (1%)
 
java.util.regex.PatternSyntaxException: Stack overflow during pattern compilatio
n
\.zip
	at java.base/java.util.regex.Pattern.error(Unknown Source)
	at java.base/java.util.regex.Pattern.<init>(Unknown Source)
	at java.base/java.util.regex.Pattern.compile(Unknown Source)
	at java.base/java.lang.String.split(Unknown Source)
	at java.base/java.lang.String.split(Unknown Source)
	at ij.astro.util.ZipOpenerUtil.getFilesInZipImpl(ZipOpenerUtil.java:45)
	at ij.astro.util.ZipOpenerUtil.getFilesInZip(ZipOpenerUtil.java:37)
	at ij.io.Opener.openZip(Opener.java:1063)
	at ij.io.Opener.openImage(Opener.java:391)
	at ij.plugin.FolderOpener.getFileCount(FolderOpener.java:956)
	at ij.plugin.FolderOpener.showDialog(FolderOpener.java:673)

EDIT: Tried resetting via this thread, didn't work: http://astroimagej.170.s1.nabble.com/Java-exception-when-trying-to-import-image-sequence-td1944.html

MORE EDIT: I rewound to version 5.0.0, and that seems to work (on Slackware at least). I'll stick with the old versions for the moment.


Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
Ah! That actually fixed the problem entirely. I updated from 5.0 to 5.1 to 5.2 to 5.3 to daily, and full functionality has been restored.

At least on Slackware, so it's clearly some kind of strange local settings issue.

Hope no one else read this thread and did anything :-)
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

karenacollins
Administrator
Thanks for documenting your problem and fix. I'm not sure what is going on here, but we'll investigate to see if we can duplicate and correct.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

karenacollins
Administrator
We have not been able to duplicate this problem, and can't see how it occurs in code. There must be something we are missing though. If anyone sees this happen again, please capture as much about the exceptions as you  can (like above) and try to document as much detail about the steps you took to see the problem (again, as was done above), as well as specific files or folders that cause the problem.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
I appreciate following up here, but I have also been unable to reproduce the error. Which is disturbing, since I experienced it on two different machines. I guess that makes me feel it's related to the cloud storage I use (Google Drive via Insync) - maybe possible that AIJ / ImageJ had trouble looking through files in folders with strange modification dates. I tried to test that by opening some files in AIJ, deleting them on the drive, and then reopening, but I got expected results ("cannot find file", rather then this StackOverflow error).

Anyway, yes, if anyone else sees this please post! (And I will do the same). Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
ok, getting the exception again. I'll attach a screenshot and also the log of the exception. Just from the screenshot, you can see that AIJ is trying to do something with a bunch of file formats (.odt) it doesn't understand, but I assume it has to do stuff like that as a matter of course. I will again try to fix it by updating, or restarting, or something (closing and reopening AIJ does not seem to help). And this is before selecting any files, just trying to open an image stack, before getting that dialog box.

Exception-AIJ.txt
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

karenacollins
Administrator
Some questions:
-Is the /media/cduston/MCARG/AnalyzedSources/SN2023hrk folder mapped directly to your Google Drive as you mentioned last time? I'm not sure this will be helpful info, but maybe.

-Could you provide us access to the SN2023hrk-Comparison.ods file? We think it may be in a zip file, If it is, please provide the full zip file. If small enough, just email to karen dotdot collins atatat outlook dotdot com, or provide a link on google drive if easier.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
1) That directory is not mapping to Google Drive - this is now an external drive (I changed my organization in an effort to avoid this problem).

2) I am happy to provide you access to that file - it doesn't appear to be a zip of any kind, I created it as a LibreOffice spreadsheet and that is what it still appears to be. I've attached it here.

SN2023hrk-Comparison.ods
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

keastrid
Thanks for the file.

Unfortunately, using it I could not reproduce the problem, are you opening a folder that contains many ODS files? Does it contain any images?

Kevin
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
Here is the contents of that directory:

/media/cduston/MCARG/AnalyzedSources/SN2023hrk$ ls
20230510               NOTES~
20230511               SN2023hrk-B.csv
20230512               SN2023hrk-Blue.csv
20230514               SN2023hrk-Comparison.ods
20230517               SN2023hrk-Photometry-3-4-5-Blue.tbl
20230519               SN2023hrk-Photometry-3-4-5-Red.tbl
20240509               SN2023hrk-Photometry-4-7-10-Blue.tbl
20240509.zip           SN2023hrk-Photometry-4-7-10-Red.tbl
image_subtraction      SN2023hrk-Red.csv
image_subtraction.zip  Stacked
NOTES                  zip_all.sh
/media/cduston/MCARG/AnalyzedSources/SN2023hrk$

So no, it only contains one .ods file, and no, it does not contain any images.

I think this problem occurs when I end up switching directories in AIJ. For example, I run AIJ from the command line in this directory, and then navigate around (say open some images from 20240509, move them to Stacked, then open them again there,....or some variation thereof). That's typically my workflow, in any case. But when the error happens, even reopening AIJ does not clear it - the only way I can open stacks again is if I revert back to 5.0. After a few days, I update to daily, and it continues to work for ~weeks.

I appreciate the attention to this!

Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

keastrid
I wasn't able to reproduce this issue, but I have created a potential fix here. Please give it a try when you have a chance. If it does not work, please send me the aij.log file in the installation (it next to astroimagej, ij.jar, AstroImageJ.cfg).
Reply | Threaded
Open this post in threaded view
|

Re: Can't open stacks in AIJ any longer - StackOverflowError

cduston
Great thanks! I can confirm that this runs (version 02 reported correctly), and I've opened some image files from that previous directory without error. Naturally, since the error is intermittent I cannot confirm beyond that, but I appreciate the attempted fix. I'll run this version for a while and watch for problems.