Welcome, Guest
Username: Password: Remember me
25 Jul 2018
Glad to announce of release of INDI Library v1.7.4 on 2018-07-25. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...

TOPIC: Issue with Polar Alignment

Issue with Polar Alignment 4 months 2 weeks ago #24626

Looks like this issue is unique to the Astroberry Focuser. At any rate, I added one more condition to prevent that, but the Astroberry Focuser should fix this also at its end. Ideally, once motion is complete, it should change state to OK and send the final value. Instead, it is doing that 3 times in a row, and hence the 3 captures. With the change in 2.9.4, it will only capture 1 time, but will display a warning for each attempted capture beyond that while still in progress.
The following user(s) said Thank You: HelgeMK

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Issue with Polar Alignment 4 months 2 weeks ago #24645

I will investigate the issue on the Astroberry Focuser side. As far as I remember it reports OK only after it finishes travel to the destination. I will double check this.

BTW. I think I observed the same behaviour in PiFace Focuser driver, but it does not capture 3 times in a row, even though the log contains 3 entries. Since I developed both drivers it might be the case that there are some similarities between them. I will double check this
The following user(s) said Thank You: HelgeMK

Please Log in or Create an account to join the conversation.

Issue with Polar Alignment 3 months 1 week ago #25909

It seems that I am also experiencing this Windows-only bug where cfitsio returns with status 105/FILE_NOT_CREATED (resulting in the 'Error creating WCS file: "couldn't create the named file"' message in the log). I've spent an hour or two poking around the KStars, Qt, and cfitsio source code to try to determine why this is happening, but nothing has immediately jumped out at me. The error is definitely coming from cfitsio, but as for why, not to mention only on Windows, I'm not really sure. The file path in the log that HelgeMK posted certainly looks valid, and KStars does prepend a ! character to set cfitsio's "clobber" option, so I don't see any reason why it shouldn't be deleting and re-creating the file. Perhaps fits_read_errmsg() would provide more specific information as to where/why this error is being emitted?

My working hypothesis is that the existing temp file created by Qt isn't being removed properly by cfitsio for some reason, since I think that Linux systems will not complain about "creating" a new file if it already exists but is empty, whereas Windows systems will. That's really the only explanation I can come up with for the Windows-specific behavior we are seeing here. I have a somewhat limited ability to look into this right now as I'm at a week-long star party, but I'll try to build KStars from source with the equipment I have with me, so that I can make some tweaks and see if I can figure out a fix.
The following user(s) said Thank You: knro

Please Log in or Create an account to join the conversation.

Last Edit: by smhxx.

Issue with Polar Alignment 2 months 2 weeks ago #26363

I did some more investigation tonight, using a different Windows system hooked up to my Raspberry Pi 3B+ INDI server (using the telescope/CCD simulators and remote plate solving to eliminate any extra variables,) and I'm now thoroughly confident I've isolated the root cause. I won't go into the story of how I figured this all out, because it's pretty boring, but it has to do with the behavior of Qt's handling of temp files. There is a relevant bug report here which was marked as invalid due to "security concerns," since apparently introducing strange and overtly misleading platform-specific behavior is A-OK in Qt Land as long as it's marginally "safer" for one person somewhere in the world on at least one occasion.

Anyway, long story short, Qt maintains a chokehold on any temp files it creates, and will absolutely never, under any circumstances, close its file handle until the file is removed or the reference to it destroyed, even if you explicitly call close(). The worst part is that I'm not even joking. This is actually a real thing that somebody thought was a good idea, and then wrote this comment explaining why the method silently refuses to do the one thing that is literally the name of the method, and then returns success anyway. Unbelievable. On Mac/Linux, this doesn't matter, because UNIX-based systems will happily allow two simultaneously-active file handles to point to the same file, but Windows will refuse cfitsio access to the file since Qt still "owns" it, hence the Windows-only nature of the bug.

I suppose you could call remove() on the file rather than close(), but it seems to me like you'd be giving up any benefits that using Qt to manage the file would have offered (such as removing it when the process ends? Does Qt do that?) At that point it seems like it would just be a plain old vanilla temp file, and you might as well just use std::tmpnam() or something like that rather than jumping through the "create a file, then remove it, then create it again" hoops. I'll leave the implementation details to the maintainers, but hopefully with this information you'll be able to get the PA utility working for Windows users in 2.9.7. Cheers!

EDIT: The relevant code in KStars is at the top of Align::processPAHStage().
The following user(s) said Thank You: knro

Please Log in or Create an account to join the conversation.

Last Edit: by smhxx.

Issue with Polar Alignment 2 months 2 weeks ago #26364

Thanks for the detailed report! I push a change that replaces QTemporary file with simply a file with UUID. The changes should be in the Daily binary factory image here:
binary-factory.kde.org/job/KStars_Nightly_win32/

They usually build around 21:00 UTC
The following user(s) said Thank You: smhxx

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Issue with Polar Alignment 2 months 2 weeks ago #26365

Awesome! Great response time, by the way. I will run another test tonight using the nightly binary and confirm that the issue is resolved. Thanks a ton!

Please Log in or Create an account to join the conversation.

Issue with Polar Alignment 2 months 2 weeks ago #26379

I just tried the polar alignment process again with the nightly build and can confirm that the bug is resolved with today's changes. It now reaches the final "correction vector" screen properly, rather than failing after the third image is taken. Thanks for the fix!

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica