Bugs: dmsort
Bugs
Sorting string values
(14 Sep 2012)
dmsort can crash if sorting on a string column with duplicate values if a secondary sort criteria is used. For example
% cat sort.dat #type count_rate star 1.0 star 1.3 pulsar 1.5 agn 0.4 % dmsort sort.dat sort.fits "type,count_rate" clob+ *** glibc detected *** dmsort: double free or corruption (fasttop): 0x000000000d73dc40 *** ======= Backtrace: ========= /lib64/libc.so.6[0x35126711df] /lib64/libc.so.6(cfree+0x4b)[0x351267163b] ...
The exact screen output will likely be different. The bug is triggered because the 'type' column has two "star" values which causes the secondary sort on "count_rate" to be triggered.
Sorting on just the string column works as expected.
Bugs fixed in CIAO 4.4
The following is a list of bugs that were fixed in the CIAO 4.4 software release.
Use "copyall=no" with the "opt=text/simple" format (04 May 2010)
The text/simple ASCII format does not support IMAGE blocks. When sorting a table with the default value of the dmsort copyall parameter (yes), the tool attempts to copy the other blocks from the input file, including the NULL PRIMARY image.
unix% dmsort simple.fits "simple.sort.dat[opt kernel=text/simple]" keys=y # DMSORT (CIAO): Error adding full header.
Workaround:
Set copyall=no. Note that any other blocks in the file will not be copied either.

![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)