Bug 141110

Summary: open file second time crash
Product: [Applications] kommander Reporter: Burapha Linux Server <buraphalinuxserver>
Component: Kommander editorAssignee: mrudolf
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Burapha Linux Server 2007-02-03 07:20:09 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.4 
OS:                Linux


None that I am aware of.


If you attempt to open /etc/hosts is says it cannot be done (but the file does exist).  
"Could not load file '/etc/hosts'"
If you try it a second time you crash.


Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1233586512 (LWP 17778)]
[KCrash handler]
#5  0xb68912b7 in memcpy () from /lib/libc.so.6
#6  0xb72b045d in QString::operator+= () from /usr/lib/qt/lib/libqt-mt.so.3
#7  0x081457fb in WorkspaceItem::text ()
#8  0x08145bc5 in WorkspaceItem::key ()
#9  0xb70dd0cd in QListViewItem::compare () from /usr/lib/qt/lib/libqt-mt.so.3
#10 0xb70e4e48 in qHeapSortHelper<QListViewPrivate::SortableItem*, QListViewPrivate::SortableItem> () from /usr/lib/qt/lib/libqt-mt.so.3
#11 0xb70e5000 in qHeapSort<QListViewPrivate::SortableItem*> ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#12 0xb70d3e24 in QListViewItem::sortChildItems ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#13 0xb70cfb2b in QListViewItem::enforceSortOrder ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#14 0xb70cf830 in QListView::firstChild () from /usr/lib/qt/lib/libqt-mt.so.3
#15 0x08144bf1 in Workspace::updateColors ()
#16 0x081467c4 in Workspace::qt_invoke ()
#17 0xb6ffe57d in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#18 0x0809e95f in FormFile::addedFormFile ()
#19 0x080d335e in MainWindow::openFormWindow ()
#20 0x080d4fe6 in MainWindow::fileOpen ()
#21 0x080d513a in MainWindow::fileOpen ()
#22 0x080cbf1e in MainWindow::qt_invoke ()
#23 0xb6ffe57d in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#24 0xb6ffe9e6 in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#25 0xb782ff59 in KAction::activated () from /opt/kde/lib/libkdeui.so.4
#26 0xb78300b1 in KAction::slotActivated () from /opt/kde/lib/libkdeui.so.4
#27 0xb783036d in KAction::slotButtonClicked () from /opt/kde/lib/libkdeui.so.4
#28 0xb7832bf6 in KAction::qt_invoke () from /opt/kde/lib/libkdeui.so.4
#29 0xb6ffe57d in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#30 0xb78f32df in KToolBarButton::buttonClicked ()
   from /opt/kde/lib/libkdeui.so.4
#31 0xb78f36d0 in KToolBarButton::mouseReleaseEvent ()
   from /opt/kde/lib/libkdeui.so.4
#32 0xb703399a in QWidget::event () from /usr/lib/qt/lib/libqt-mt.so.3
#33 0xb78f3e21 in KToolBarButton::event () from /opt/kde/lib/libkdeui.so.4
#34 0xb6fa3a7b in QApplication::internalNotify ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#35 0xb6fa471c in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#36 0xb755a3ee in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#37 0xb6f45a0e in QETWidget::translateMouseEvent ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#38 0xb6f444d0 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#39 0xb6f56ba6 in QEventLoop::processEvents ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#40 0xb6fb8de2 in QEventLoop::enterLoop () from /usr/lib/qt/lib/libqt-mt.so.3
#41 0xb6fb8d04 in QEventLoop::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#42 0xb6fa34bf in QApplication::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#43 0x080bfad2 in main ()


I realize that /etc/hosts is in the wrong format
and should not be editable, but crashing seems
to be the wrong response.  I think after the first time you open a file in the wrong format the state of the application is not reset correctly.  I expect the application not to crash but instead say something like "/etc/hosts is not in the correct format for Kommander".
Comment 1 András Manţia 2007-10-06 17:46:40 UTC
SVN commit 722079 by amantia:

Don't crash if opening a file the second time when the first try failed.

BUG: 141110

 M  +1 -0      ChangeLog  
 M  +6 -0      editor/formfile.cpp  
 M  +2 -1      editor/formfile.h  
 M  +3 -1      editor/mainwindowactions.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=722079