gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61490] Extra columns in the metadata causes crash in plain-text ta


From: Mohammad Akhlaghi
Subject: [bug #61490] Extra columns in the metadata causes crash in plain-text tables
Date: Mon, 15 Nov 2021 15:13:56 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

URL:
  <https://savannah.gnu.org/bugs/?61490>

                 Summary: Extra columns in the metadata causes crash in
plain-text tables
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Mon 15 Nov 2021 08:13:54 PM UTC
                Category: Libraries
                Severity: 3 - Normal
              Item Group: Crash
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Currently (as of Gnuastro 0.16), when Table is given the file below it will
crash with the given error (note how there are metadata for 5 columns, while
there is only three columns of data):


[me@mypc dir]$ cat cat.txt 
# Column 1:  ID    [counter,  u8] Counter
# Column 2:  RA    [deg,     f64] Right Ascension
# Column 3:  DEC   [deg,     f64] Declination
# Column 4:  MAG-A [log,     f32] Magnitude in filter A
# Column 5:  MAG-B [log,     f32] Magnitude in filter B
1  00h12m46.10  -32d55m37.3
2  00h13m21.58  -34d00m36.7
3  22h58m32.46  -31d45m07.2
4  22h58m31.01  -31d39m18.3
5  01h27m17.99  -29d14m51.1

[me@mypc dir]$ asttable cat.txt --output=cat.fits
asttable:cat.txt:6: not enough columns in this line. Previous (uncommented)
lines in this file had 4 columns, but this line has 3 columns


The extra metadata (and not all of it! only the single extra metadata for
column 4!) is causing this crash: Table expects to have 4 (not 5!?!) columns
from the metadata, so it is crashing.

We need to investigate this and fix it (extra metadata for columns that don't
exist in the data, should be ignored: they are not relevant).

This bug was found with the help of Zohre Ghaffari.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61490>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]