Jump to content

Walking on the Moon

PixInsight with Mac OS 10.12 Sierra may crash on save as .fits


Recommended Posts

Relevant For PI users on Mac OS 10.12 Sierra where a crash occurs on saving .xisf files as .fits and illegal keywords exist in the fits header.

I had a problem today with some .xisf PixInsight files that needed evaluation in a program that only reads FITS format files.

Opening the .xisf files in PixInsight and then saving without change as .FITS caused PI to crash immediately.

I opened a bug report on the PI forum and posted the Mac crash reports together with a sample .xisf file and Juan Conejero at PI responded quickly, the error was being caused by illegal characters used in the FITS header.

The observatory program that was saving the original camera .fits files has been set to write a non-numeric entry under the DEWPOINT' HUMIDITY' and TEMPERAT' keywords, a number is allowed as an entry but not as in this case a character string "NaN"

Manually editing these FITS keywords from "NaN" to "0" and then saving the .xisf as .fits resulted in a normal save operation with no crash.

On older Mac OS's and Windows versions this should just result in an error message but in Mac OS 10.12 Sierra it crashes the PI program and launches the Apple crash report program.

A copy of Juan Conejeros reply to the problem is posted below in case anyone else has this crash behaviour with the current PI versions Ripley or Ripley and Mac OS 10.12 Sierra.


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.

Edited by Oddsocks
Link to comment
Share on other sites

  • 7 months later...

I downloaded the trial version of PixInSight 1.8 (6/1/17) to run on my Mac with Sierra and this problem still exists.  I cannot save an image file without PI crashing. I am using xsif format.  All intermediate files would save, only the final stacked image would not.  Was the problem ever solved?


NOTE: I can load and save an xsif file with a new name without a problem.

UPDATE:  I found that I can save an xsif file if I uncheck the FITS header keywords box.  Is this the solution?

Edited by schulzep
Link to comment
Share on other sites

Just tried loading an .xisf file on my iMac and saving as a .fits

Running MacOS 10.12.5




It gave a warning that fits files are no longer supported  but still it did save the file in a depreciated version.   Also gave the messages attached.


Nothing crashed though.  I would check your PI version has all the updates installed.  also that your Mac is up to date.

Screen Shot 2017-06-05 at 17.31.53.jpg

Screen Shot 2017-06-05 at 17.32.17.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.