-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
History text lost on conversion to FITS and back causing PROVSHOW to segfault #32
Comments
My inclination is that this is not meant to happen in the sense that a roundtrip is meant to get you back where you started. ndf2fits->fits2ndf is meant to be lossless (and @MalcolmCurrie works hard for that to be true). It still sounds like your patch is a good safety net. Note that NDF does not start history recording if there is no history structure so to enable history recording ORAC-DR (presumably picard) would have to enable history on the file (and it shouldn't do that on the input file as we probably shouldn't be modifying files given to the pipeline). |
Since I have other jobs to complete first this week, I asked Graham to post this as an issue. |
@grahambell Can you send me, or tell me where to find, the gs850um_healpix001244.sdf file that causes provshow to seg fault? |
Commit 9769826 should fix the segfault in provshow. But there is still the issue of why fits2ndf creates blank history text. |
This is ironic. FITSIO has changed the way it handles long history headers. I propose to modify CVG_WHISR to make paragraghs for these elements I can then make COF_CHISR recognise the continuation lines for these |
A second factor was the buffer size for the text records. The SMURF |
I've made a change to NDF2FITS too (0b4b02c). |
So can this ticket be closed? |
I just wanted confirmation from Graham, but I believe it can be closed. The history |
David's fix prevented the segfault I was encountering, so the main issue is fixed. The history looked mostly OK as far as I remember -- I'm not sure if the colons in Perl module names were still being a problem or not. |
ORAC-DR writes SCUBA-2 JSA tiles with history information:
And jsawrapdr converts it to FITS including the history:
Then jsawrapdr converts it back to SDF and the history is missing:
(and PROVSHOW works on that file).
However when ORAC-DR processes that file, I get a file, also without history:
But now PROVSHOW segfaults:
(Which prevents jsawrapdr from post-processing that file.)
I was able to put an if statement around the line which I identified with gdb
as causing the segfault, so I have the following, which works:
But I'm not sure whether HistRec.text is supposed to be allowed to be NULL or
not. If it is then I could commit this change, but if it's supposed to be
guaranteed to not be NULL then this isn't the right fix.
The text was updated successfully, but these errors were encountered: