SupervisedClassification: segfault when opening second image
Mantis Issue 45, reported by echristophe, assigned to jmichel, created: 2008-12-09
Reproduce:
- start supervisedClassification
- open image
- close the viewer windows
- open other image
Here is the trace:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f222ac8e760 (LWP 14668)] 0x00007f2220287cd0 in ?? () from /lib/libc.so.6 (gdb) gdb Undefined command: "gdb". Try "help". (gdb) bt #0 0x00007f2220287cd0 in ?? () from /lib/libc.so.6 #1 (closed) 0x00007f22261ac9a7 in Fl_Group::resize () from /usr/bin/../lib/libfltk.so.1.1 #2 (closed) 0x00007f22261e1fb0 in Fl_Window::resize () from /usr/bin/../lib/libfltk.so.1.1 #3 (closed) 0x00007f22261a5e2a in Fl_Double_Window::resize () from /usr/bin/../lib/libfltk.so.1.1 #4 (closed) 0x000000000062c3b1 in otb::SupervisedClassificationAppli::LoadImage (this=0x2794720) at /home/christop/OTB/trunk/OTB-Applications/Classification/otbSupervisedClassificationAppli.txx:175 #5 (closed) 0x00000000005ea208 in otb::SupervisedClassificationAppli::OpenImage (this=0x2794720) at /home/christop/OTB/trunk/OTB-Applications/Classification/otbSupervisedClassificationAppli.txx:292 #6 (closed) 0x00000000006426cc in SupervisedClassificationAppliGUI::cb_Open_i (this=0x2794808) at /home/christop/OTB/OTB-Binary-Applications-Debug/Classification/otbSupervisedClassificationAppliGUI.cxx:20 #7 (closed) 0x00000000006426ff in SupervisedClassificationAppliGUI::cb_Open (o=0x27bcd60, v=0x0) at /home/christop/OTB/OTB-Binary-Applications-Debug/Classification/otbSupervisedClassificationAppliGUI.cxx:23 #8 (closed) 0x00007f22261bf2a5 in Fl_Menu_::picked () from /usr/bin/../lib/libfltk.so.1.1 #9 (closed) 0x00007f22261bf6c2 in Fl_Menu_Bar::handle () from /usr/bin/../lib/libfltk.so.1.1 #10 (closed) 0x00007f22261ad353 in Fl_Group::handle () from /usr/bin/../lib/libfltk.so.1.1 #11 (closed) 0x00007f222619738e in ?? () from /usr/bin/../lib/libfltk.so.1.1 #12 (closed) 0x00007f222619852c in Fl::handle () from /usr/bin/../lib/libfltk.so.1.1 #13 (closed) 0x00007f22261df897 in fl_handle () from /usr/bin/../lib/libfltk.so.1.1 #14 (closed) 0x00007f22261e0b24 in ?? () from /usr/bin/../lib/libfltk.so.1.1 #15 (closed) 0x00007f22261e1374 in fl_wait () from /usr/bin/../lib/libfltk.so.1.1 #16 (closed) 0x00007f2226198f58 in Fl::wait () from /usr/bin/../lib/libfltk.so.1.1 #17 (closed) 0x00007f222619907d in Fl::run () from /usr/bin/../lib/libfltk.so.1.1 #18 (closed) 0x0000000000516365 in main (argc=1, argv=0x7fff32e6c338) at /home/christop/OTB/trunk/OTB-Applications/Classification/otbSupervisedClassificationAppli.cxx:97 (gdb) up 4 #4 (closed) 0x000000000062c3b1 in otb::SupervisedClassificationAppli::LoadImage (this=0x2794720) at /home/christop/OTB/trunk/OTB-Applications/Classification/otbSupervisedClassificationAppli.txx:175 175 guiFullWindow->resize(guiFullWindow->x(),guiFullWindow->y(),full->w(),full->h()); (gdb) list 170 m_ImageViewer->SetImage(m_ImageReader->GetOutput()); 171 m_ImageViewer->Build(); 172 173 FullWidgetPointerType full = m_ImageViewer->GetFullWidget(); 174 full->resize(0,0,guiFullWindow->h(),guiFullWindow->w()); 175 guiFullWindow->resize(guiFullWindow->x(),guiFullWindow->y(),full->w(),full->h()); 176 guiFullWindow->add(full); 177 guiFullWindow->resizable(full); 178 guiFullWindow->show(); 179 full->show();
1229620196 - julienI am able to reproduce the bug.
1229620933 - julienDid some tricks to avoid to access to deleted widgets.
Find out more here: http://hg.orfeo-toolbox.org/OTB-Applications/rev/f5c03e4e4794