Plate solve hangs

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

Plate solve hangs

andreok
Hello,

My AIJ v5 is hanging after logging the following message, and never returns the plate solve finished message:
"[2022-02-17T20:15:04.313]      Astrometry job 6207988 for ESPC WASP-1245.000secs00000001.fit: SOLVED"
If I check the WCS menu item I can still see the Stop plate solve process available.

PS: I'm a Mac OS X user.

Regards,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Hi Andre,

I tried a platesolve on my Mac, and the image solved successfully and then the finished message was posted to the log panel as expected. So, we will need to dig deeper.
-Is this a consistent problem, or do you see it only occasionally?
-Could you please post a screen grab of your astrometry set-up panel (but don't include your login code at the top of the panel).
-Click on the bottom part of the AIJ Toolbar and post a screengrab of the info that shows in the bottom of the panel.
-Are you solving a single image or stack of images?
-What version of Mac OS X are your running?
-If all else fails to help us duplicate your problem, we may need to get an example image from you, but let's explore the above information first.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

andreok
Hi Karen,

This error is consistent and happens for a single frame and for a (virtual) stack of frames.
Here are the screen grabs:




Unfortunately, I can only use my old Macbook with Mac OS X 10.13.6 for testing.
The images I'm trying to plate solve are the sample Science Images form the astrodennis.com website.

Thanks,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Hi Andre,

Thanks for the detailed information. I do not see anything unusual about your set up, and it looks like the WCS coordinates and annotations from astrometry.net are being added to your image as expected. Is that correct?

After the plate solve(s) are finished, are you able to terminate the plate solve process if you click on the astrometry icon above the image stack? While this shouldn't be needed, it might be a workaround for now.

At this point, my best guess is that the problem is some odd interaction with the older version of Mac OS X. We unfortunately do not have a Mac running OS X 10.x for testing and debug though.

If there is another AIJ user running Mac OS X 10.x, could you please test and let us know if an astrometry.net plate solve also hangs at the end of the run as described here?

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

andreok
Hi Karen,

Just a few additional comments:
1- The image is not updated on the disk if I enable the "Auto Save" option;
2- Only the first image from stack is processed;
3- The plate solve process can be manually stopped from the WCS menu.

Do you know how I could start AIJ from the command line (directly invoking Java, instead of using the universalJavaApplicationStub), or check some log file, so I could try to trace what AIJ is trying to do?

PS: I tried to invoke the java [...] ij.ImageJ class, passing all .jar and .class files, but only IJ is displayed, and

Thanks,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Hi Andre,

I tried a virtual stack of images and the plate solves completed and the files saved as expected on my Mac (running the latest Mac OS).

Since I can't duplicate the problem, I'm just stabbing at ideas below.

Not that it would be a solution, but for debug purposes, could you try with "Annotate" and "Add to Header" disabled to see if that works around the problem? It looks like you already have "Auto Save" disabled in the earlier test (at least in the screen shot you sent). If not, see if that makes a difference.

If you haven't tried a stack in memory (i.e. NOT a virtual stack), also see if that makes a difference.

Is there any chance the folder where your images are location is write-protected?

Also, do you have AIJ 4 installed on the computer, or could you install it? Does it work as expected?

I've asked Kevin for some ideas on debugging. We'll get back with any ideas.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

andreok
Hi Karen,

I tried a fresh AIJ v4 and updated to the daily build, and it works just fine:


I was thinking that it could be something related to the OpenJDK 17, so I installed JDK 17.0.2 on my machine and copied it into AJI v5, but the issue persists.

However, everything works fine (with both single images and virtual stack) when I disable "Annotate" and leave "Add to Header" enabled.
So, there must be something going on with the "Annotate" option.
I have the following options enabled under the "Annotate" menu item:
- Right click shows SIMBAD object(s) in web browser (if has WCS)
- Search SIMBAD for object names when opening annotate dialog (if has WCS)
- Auto update annotations in FITS header
- Display annotations from FITS header when image is displayed

Thanks,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Hi Andre,

This is good info. It sounds like there's at least a workaround for now by disabling the "Annotate" checkbox.

If you would like to debug further and see if it can help us find a fix to support older version of OS X, you can run AIJ from the command line with java -jar ij.jar. Maybe then a java exception would show?

If the above doesn't give any useful information, it could be a deadlock, so getting a threaddump would help: https://www.baeldung.com/java-thread-dump#1-jstack
(jps in terminal to get the ID while AIJ is locked up, then jstack <id> > dump.txt )

If none of the above works and you really need a solution, the next step would be to install IntelliJ community edition (i.e. free) from the jetbrains website and then install the AIJ v5 project from github. The instructions are provided at that link. That will give full debugging capabilities, but might take some time investment to get familiar with IntelliJ.

Sorry to push this back your way. I just don't know how to reproduce the problem since my Macs have later version of Mac OS.

Karen and Kevin
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

andreok
Hello Karen,

Thank you very much for the information.
In general, the development of AIJ follows the same principals as the IJ (extensions using plugins and scripts/macros)?

I think I managed to capture the exception with the "Annotate" option on and using the java -jar ij.jar (with the JDK17.0.2):
"$ java -jar ij.jar
Exception in thread "Run$_Thread-0" java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "ij.gui.Roi.getName()" is null
        at astroj.OverlayCanvas.add(OverlayCanvas.java:40)
        at astroj.Astrometry.addAnnotateRoi(Astrometry.java:1281)
        at astroj.Astrometry.solve(Astrometry.java:852)
        at astroj.AstroStackWindow$9.run(AstroStackWindow.java:4513)"
It looks like the Astrometry thread is aborting at the call to addAnnotateRoi(), due to a NullPointerException.

Thanks,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

keastrid
Hi Andre, thanks for the error message.

This should now be fixed pending a future daily build.

Kevin
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Hi Andre,

Thanks for the debugging info. I appreciate you doing it, because it seems the problem may not be unique to old Mac OS X versions after all.

I have now made Kevin's fix available in the latest daily build (should be v5.0.1.08 or later after you update).

Let us know if this indeed fixes the problem.

Cheers,
Karen
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

andreok
Hi Karen and Kevin,

Just to let you know that the issue was fixed with the latest build.

Thank you very much for the outstanding support, as always.

Thanks,
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Plate solve hangs

karenacollins
Administrator
Great! Thanks for confirming!