kzwkt / wnd-charm

Automatically exported from code.google.com/p/wnd-charm
0 stars 0 forks source link

wndchrm trunk crashes when a sig file is present for which there's no tiff #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Grab any test set, train some sigs, then move a tiff out of the way. You can 
use my test set which exists on 
lgchrm14:/home/colettace/projects/eckley_worms/TimeCourse. There the file 
01/Day1_09.tiff isn't there.
2. Train a classifier using the trunk. The command I ran was:
~/src/wnd-charm/wndchrm/trunk/wndchrm train -l -m `pwd` TimeCourse.fit
3. Crash occurs when file 01/Day1_09-l.sig is reached.

What is the expected output? What do you see instead?

colettace@niairplgchrm14 ~/projects/eckley_worms/TimeCourse
$ ~/src/wnd-charm/wndchrm/trunk/wndchrm train -l -m `pwd` TimeCourse.fit
Processing directory '/home/colettace/projects/eckley_worms/TimeCourse/01'
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_01.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_01-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_02.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_02-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_03.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_03-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_04.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_04-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_05.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_05-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_06.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_06-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_07.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_07-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_08.tif'.
Sig '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_08-l.sig' read in.
Processing image file 
'/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_09.tif'.
Adding '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_09-l.sig' for 
sig calc.
processing '/home/colettace/projects/eckley_worms/TimeCourse/01/Day1_09-l.sig' 
(index 0).
TIFFOpen: /home/colettace/projects/eckley_worms/TimeCourse/01/Day1_09.tif: 
Cannot open.
*** glibc detected *** /home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm: 
double free or corruption (out): 0x0000000001f4aa90 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3955e750c6]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x434d91]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x412509]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x411507]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x410980]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x408faa]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3955e1ecdd]
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm[0x404829]
======= Memory map: ========
00400000-006b5000 r-xp 00000000 fd:01 815963                             
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm
008b4000-008c1000 rw-p 002b4000 fd:01 815963                             
/home/colettace/src/wnd-charm/wndchrm/trunk/wndchrm
008c1000-008c7000 rw-p 00000000 00:00 0 
01e39000-01f7f000 rw-p 00000000 00:00 0                                  [heap]
35ed000000-35ed0e8000 r-xp 00000000 fd:00 293480                         
/usr/lib64/libstdc++.so.6.0.13
35ed0e8000-35ed2e8000 ---p 000e8000 fd:00 293480                         
/usr/lib64/libstdc++.so.6.0.13
35ed2e8000-35ed2ef000 r--p 000e8000 fd:00 293480                         
/usr/lib64/libstdc++.so.6.0.13
35ed2ef000-35ed2f1000 rw-p 000ef000 fd:00 293480                         
/usr/lib64/libstdc++.so.6.0.13
35ed2f1000-35ed306000 rw-p 00000000 00:00 0 
35ed400000-35ed416000 r-xp 00000000 fd:00 131301                         
/lib64/libgcc_s-4.4.6-20110824.so.1
35ed416000-35ed615000 ---p 00016000 fd:00 131301                         
/lib64/libgcc_s-4.4.6-20110824.so.1
35ed615000-35ed616000 rw-p 00015000 fd:00 131301                         
/lib64/libgcc_s-4.4.6-20110824.so.1
3955600000-3955620000 r-xp 00000000 fd:00 130838                         
/lib64/ld-2.12.so
395581f000-3955820000 r--p 0001f000 fd:00 130838                         
/lib64/ld-2.12.so
3955820000-3955821000 rw-p 00020000 fd:00 130838                         
/lib64/ld-2.12.so
3955821000-3955822000 rw-p 00000000 00:00 0 
3955e00000-3955f97000 r-xp 00000000 fd:00 130840                         
/lib64/libc-2.12.so
3955f97000-3956197000 ---p 00197000 fd:00 130840                         
/lib64/libc-2.12.so
3956197000-395619b000 r--p 00197000 fd:00 130840                         
/lib64/libc-2.12.so
395619b000-395619c000 rw-p 0019b000 fd:00 130840                         
/lib64/libc-2.12.so
395619c000-39561a1000 rw-p 00000000 00:00 0 
3956600000-3956615000 r-xp 00000000 fd:00 130848                         
/lib64/libz.so.1.2.3
3956615000-3956814000 ---p 00015000 fd:00 130848                         
/lib64/libz.so.1.2.3
3956814000-3956815000 r--p 00014000 fd:00 130848                         
/lib64/libz.so.1.2.3
3956815000-3956816000 rw-p 00015000 fd:00 130848                         
/lib64/libz.so.1.2.3
3956a00000-3956a83000 r-xp 00000000 fd:00 130844                         
/lib64/libm-2.12.so
3956a83000-3956c82000 ---p 00083000 fd:00 130844                         
/lib64/libm-2.12.so
3956c82000-3956c83000 r--p 00082000 fd:00 130844                         
/lib64/libm-2.12.so
3956c83000-3956c84000 rw-p 00083000 fd:00 130844                         
/lib64/libm-2.12.so
3957600000-3957662000 r-xp 00000000 fd:00 272550                         
/usr/lib64/libtiff.so.3.9.4
3957662000-3957861000 ---p 00062000 fd:00 272550                         
/usr/lib64/libtiff.so.3.9.4
3957861000-3957864000 rw-p 00061000 fd:00 272550                         
/usr/lib64/libtiff.so.3.9.4
395b200000-395b223000 r-xp 00000000 fd:00 264736                         
/usr/lib64/libjpeg.so.62.0.0
395b223000-395b423000 ---p 00023000 fd:00 264736                         
/usr/lib64/libjpeg.so.62.0.0
395b423000-395b424000 rw-p 00023000 fd:00 264736                         
/usr/lib64/libjpeg.so.62.0.0
7fe498bde000-7fe498dd8000 rw-p 00000000 00:00 0 
7fe498dea000-7fe498ded000 rw-p 00000000 00:00 0 
7fff57a4e000-7fff57d05000 rw-p 00000000 00:00 0                          [stack]
7fff57d9a000-7fff57d9b000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]
Aborted (core dumped)

Please use labels and text to provide additional information.

The crash occurs at TrainingSet::AddImageFile() line 1461, when a call is made 
to our_sigs[sig_index].sig->Clear ();

Notice that the variable n_sigs is only greater than 0 for this edge case 
situation, and thus that's the only time line 1461 is hit.

Original issue reported on code.google.com by christop...@nih.gov on 15 Jun 2012 at 8:02

GoogleCodeExporter commented 9 years ago
Can't reproduce.  Update added to TrainingSet to avoid this error, but I could 
not reproduce the original error, so I cannot confirm that this has been fixed.

Original comment by i...@cathilya.org on 19 Jun 2012 at 8:54