ds9 crashes on (file).new display

215 views
Skip to first unread message

wgwe...@telus.net

unread,
Feb 13, 2016, 1:03:03 AM2/13/16
to astrometry
Hi Dustin.

I am managing to get solves on Ubuntu 14 ((trusty), but the output file, which I assume has the wcs info in the header crashes ds9 when I try to examine the results of the solve. I have tried to find some anomaly in the header, but when I look at it using "less file.new" it looks ok. Is this a known bug? Are others having problems with this?

Ole Streicher

unread,
Feb 13, 2016, 3:37:00 AM2/13/16
to astro...@googlegroups.com
This is probably more a problem in ds9 than in astrometry.net (ds9
should not crash even if there is a problem in the header). If you
use the saods9 that comes with Ubuntu: Could you open a but on
https://bugs.launchpad.net/ubuntu/+source/saods9 and attach the fits
file that caused the crash?

This is a bit urgent, since the DebianImportFreeze for Ubuntu 16.04 is
in a few days, and if there is a bug, it should be fixed before.

Best regards

Ole

(saods9 maintainer for Debian/Ubuntu)

Dustin Lang

unread,
Feb 13, 2016, 9:52:22 AM2/13/16
to astrometry
News to me.

Another way to check the file is with the "fitsverify" program (we include a copy in Astrometry.net) -- it will tell you whether the file is valid FITS or not.  If it's valid, then ds9 certainly shouldn't crash, even if the headers are weird.

One thing it *may* be is our SIP distortion correction headers.  The community never quite managed to choose and universally support a distortion standard, so you could try solve-field --no-tweak  [...] to turn that off.

cheers,
--dustin


wgwe...@telus.net

unread,
Feb 13, 2016, 1:09:47 PM2/13/16
to astrometry


On Friday, 12 February 2016 22:03:03 UTC-8, wgwe...@telus.net wrote:
Hi Dustin.

I am managing to get solves on Ubuntu 14 ((trusty), but the output file, which I assume has the wcs info in the header crashes ds9 when I try to examine the results of the solve. I have tried to find some anomaly in the header, but when I look at it using "less file.new" it looks ok. Is this a known bug? Are others having problems with this?

Further to my last post: I tried to diagnose the problem by copying the WCS header info to the original .fits file, and this crashed the "cphead" command from wcstools. It seems to me that something in the header  is causiing the problem. Visually it looks ok, could there be a non-printing character in there somewhere?

Ole, I tried the bug report route, but could not figure out the procedure. I have attached the file here, hope that that is ok.

Bill
ngc2320new.fit

wgwe...@telus.net

unread,
Feb 13, 2016, 1:34:10 PM2/13/16
to astrometry


On Friday, 12 February 2016 22:03:03 UTC-8, wgwe...@telus.net wrote:
Hi Dustin.

I am managing to get solves on Ubuntu 14 ((trusty), but the output file, which I assume has the wcs info in the header crashes ds9 when I try to examine the results of the solve. I have tried to find some anomaly in the header, but when I look at it using "less file.new" it looks ok. Is this a known bug? Are others having problems with this?

In response to Dustin's suggestion re: --no-tweak... Tried that and ds9 accepts the output with no complaint. Thanks for the suggestion. But... how does that affect the outcome of the solve? I am using this only for low precision (star id) use only for now so I don't need sub arc-sec results.

Dustin Lang

unread,
Feb 13, 2016, 1:59:01 PM2/13/16
to astrometry
Interesting!

We start by finding a simple TANgent-plane match.  This can be represented by the venerable standard TAN flavor of WCS header.  We then try to compute a polynomial distortion solution, which is represented with the SIP convention, which is not 100% standardized or supported by various tools.  The TAN version you get with --no-tweak (or with --tweak-order 0, where we try to compute a refined TAN projection using more stars) should be fine for most purposes unless you have a lot of distortion in your images.

FWIW, fitsverify says your file is fine except that instead of being padded with binary 0 values, it is padded with space characters (' '), hex value 0x20.

cheers,
--dustin


Ole Streicher

unread,
Feb 13, 2016, 3:32:57 PM2/13/16
to astro...@googlegroups.com
wgwe...@telus.net writes:
> Ole, I tried the bug report route, but could not figure out the
> procedure. I have attached the file here, hope that that is ok.

Thank you, I could reproduce the problem. Actually I found that we had
exactly this problem last year:

https://bugs.launchpad.net/ubuntu/+source/wcstools/+bug/1458333

It is actually not a problem of DS9, but of the wcstools library (which
are used in DS9 for WCS calculation). At that time I thought that I
found a workaround; it turns out that it didn't work.

You can reproduce this with installing the "wcstools" package and then
running the following, which will also crash:

wcshead ngc2320new.fit

I must say that I have no idea how to fix this. It is something Jessica
Mink (the author of wcstools) should fix upstream. I contacted her last
year, but she didn't come up with a solution yet.

The main problem here is that the wcstools lib reads the CTYPE1/CTYPE2
values into a 9-byte char, while they are actually 13 bytes:

CTYPE1 = 'RA---TAN-SIP' / TAN (gnomic) projection + SIP distortions
CTYPE2 = 'DEC--TAN-SIP' / TAN (gnomic) projection + SIP distortions

Sorry, that I can't help here; we need someone finding a fix for
wcstools.

Best regards

Ole

Dustin Lang

unread,
Feb 13, 2016, 3:58:00 PM2/13/16
to astrometry
Someone should turn that into a buffer overflow exploit -- maybe that'll get their attention =)

--dstn

Ole Streicher

unread,
Feb 13, 2016, 4:07:14 PM2/13/16
to astro...@googlegroups.com
Dustin Lang <dstn...@gmail.com> writes:
> Someone should turn that into a buffer overflow exploit -- maybe
> that'll get their attention =)

.... or could you ping Jessica as well? I now wrote her a reminder; but
maybe you have more influence, since you are (as far as I know) one of
the forcing drivers for extensions like SIP. In the moment, wcstools
(and all programs that use them) just cannot use this extension.

This bug is really serious, since it is in one of the basic astronomy
packages.

Best

Ole

Dustin Lang

unread,
Feb 13, 2016, 4:21:41 PM2/13/16
to astrometry
I thought that at some point in the past, wcstools supported SIP correctly.  Or maybe I'm confused and that was wcslib.

Sure, I'll send a note, but I think you overestimate my influence :)

--dstn

gra...@appstate.edu

unread,
May 12, 2016, 1:12:23 PM5/12/16
to astrometry
Re ds9 crashing on the .new files produced by astrometry.net, I have experienced exactly the same problem with ds9 v7.2. However, I just happened to have an older version of ds9 (5.6.3) and that does not crash on the .new files! So perhaps the problem is with ds9 rather than wcstools?

Richard Gray

Reply all
Reply to author
Forward
0 new messages