Author Topic: Saving .xisf as .fits causes PI Mac OS version to crash  (Read 1656 times)

Offline WillB

  • Newcomer
  • Posts: 30
Saving .xisf as .fits causes PI Mac OS version to crash
« on: 2016 October 25 03:12:25 »
When trying to save a .xisf image as .fits for export to CCD inspector the Mac OS version of PixInsight crashes.
Moving the same .xisf file to the Windows version of PixInsight and saving as .fits works ok. Problem exists on the Mac version of PI only.

Apple crash report attached as well as screen shots of Mac version and sys report extracts.

Link to dropbox sample of image that causes crash (one of ten, all exhibit same behaviour):

https://www.dropbox.com/s/d92xlmu0s4ob244/Flat%20Field%20Test_30sec_1x1_L_frame10_c.xisf?dl=0

PI is version 01.08.04.1199 Ripley X64
Mac version OS Sierra 10.12, iMac Retina 5K 27-inch, Late 2014 with intel 4Ghz i7 and 32Gb 1600Mhz DDR3, Graphics AMD Radeon R9 M295X 4096MB.

Regards.
William.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Saving .xisf as .fits causes PI Mac OS version to crash
« Reply #1 on: 2016 October 25 08:12:56 »
Hi William,

The problem with this image is in three numeric FITS header keywords with NaN (Not a Number) values, namely:

DEWPOINT NaN                                Dew Point in degrees C
HUMIDITY NaN                                Humidity in %
TEMPERAT NaN                                Ambient Temperature in degrees C


Trying to save this image in FITS format generates the following error on all supported platforms, including OS X 10.11.6:

CFITSIO error message stack:
01 : Error in ffd2e: double value is a NaN or INDEF

without any crash, which is the correct behavior. I have no macOS 10.12 machine, so I can't test this issue on that OS version. Please note that macOS Sierra is still not supported officially. However, I see no reason for a crash to happen in this case, unless CFITSIO is doing something weird.

The FITS standard does not allow header keywords with non-numeric entities such as NaN and +/-Inf, so these keywords are illegal in a FITS file. You may want to contact the authors of the application that generated the original file to fix this issue.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline WillB

  • Newcomer
  • Posts: 30
Re: Saving .xisf as .fits causes PI Mac OS version to crash
« Reply #2 on: 2016 October 25 13:22:10 »
Thank you for the fast reply Juan.

I can confirm that changing the FITS keywords Dewpoint, Humidity and Temperat in the FITS editor from "NaN" to "0" before saving the .xisf as .fits results in normal file saving operation of PixInsight without a crash.

I tried a second sample .xisf file with the bad "NaN" term used in the header and PixInsight crashes immediately upon save as .fits.

Looks like it is a bug specific to the Mac OS 10.12 Sierra operating system.

I will inform the observatory operator of the problem with the bad FITS keywords.

Regards.

William.