Bug 265085 - Saving ktimetrackerfile without adding the file-type will erase all data.
Summary: Saving ktimetrackerfile without adding the file-type will erase all data.
Status: RESOLVED FIXED
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (show other bugs)
Version: Git (master)
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Thorsten Staerk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 12:41 UTC by Samuel Suther
Modified: 2011-09-27 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Suther 2011-02-01 12:41:12 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

I start a trackingsession. Then go to save, choose my folder and type Zeiterfassung as filename (without .ics).
Click on OK, and all stored data is erased. The file Zeiterfassung has 0Byte.


Reproducible: Always




OS: Linux (i686) release 2.6.32-25-generic
Compiler: cc
Comment 1 Ricardo Graça 2011-02-22 22:35:56 UTC
For me it's even worse. Even adding the .ics extension causes the new file to be erased and all data lost. In order to create a new file and not loose any data it's necessary to create the new file, save it and only then can you start adding tasks and keeping track of them.
Comment 2 Thorsten Staerk 2011-02-25 19:50:00 UTC
I can take a look at this this weekend.
Comment 3 Thorsten Staerk 2011-02-26 22:02:48 UTC
I cannot reproduce.
Comment 4 Ricardo Graça 2011-02-27 15:31:49 UTC
Just took a live image of Fedora 14 KDE i686 and booted into it, started KTimeTracker, closed the default file and created a new one, added a new task and tracked it for a few seconds, then edited it so it has something other than 0:00, clicked on the floppy icon to save it, typed a file name and pressed save -> BAM! All data lost.
Also happens in Arch Linux i686. I'll test it on openSUSE 11.3 tomorrow and report back.
Comment 5 Ricardo Graça 2011-02-28 15:52:03 UTC
Also tested on openSUSE 11.3 x86_64 with KDE updated to version 4.5.5 and this same bug is present. When 11.4 comes out I'll report back.
Comment 6 Ricardo Graça 2011-02-28 22:22:30 UTC
One more test, this time on Ubuntu 10.10 x86_64 which also exhibits the same problem.
Comment 7 Thorsten Staerk 2011-09-20 14:40:42 UTC
I can reproduce. Here are the steps to reproduce:
1. start ktimetracker
2. choose file->new
3. add a Task A
4. choose file->save
5. use an not-yet-existing file name, no .ics extension

actual result:
task A no longer exists

expected result:
task A still exists
Comment 8 Thorsten Staerk 2011-09-20 15:02:43 UTC
In the FileDiaLog I crashed ktimetracker and got the following stack trace:

Application: KTimeTracker (ktimetracker), signal: Segmentation fault
[Current thread is 1 (Thread 0x7feda21e8760 (LWP 17705))]

Thread 2 (Thread 0x7fed8eb68700 (LWP 17726)):
#0  0x00007fed9ac4b503 in poll () from /lib64/libc.so.6
#1  0x00007fed9693a114 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fed9693a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fed9bc85976 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fed9bc5a052 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fed9bc5a265 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fed9bb6f1e4 in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fed9bc3b968 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fed9bb71a5e in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fed9b8e2a3f in start_thread () from /lib64/libpthread.so.0
#10 0x00007fed9ac5467d in clone () from /lib64/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7feda21e8760 (LWP 17705)):
[KCrash Handler]
#6  0x00007fed9ac4b503 in poll () from /lib64/libc.so.6
#7  0x00007fed9693a114 in ?? () from /lib64/libglib-2.0.so.0
#8  0x00007fed9693a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#9  0x00007fed9bc8591f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#10 0x00007fed9d4e0d8e in ?? () from /usr/lib64/libQtGui.so.4
#11 0x00007fed9bc5a052 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#12 0x00007fed9bc5a265 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#13 0x00007fed9d8ee32e in QDialog::exec() () from /usr/lib64/libQtGui.so.4
#14 0x00007fed9f346a9d in KFileDialogPrivate::getSaveFileName (dir=..., filter=..., parent=0x81f750, caption=..., options=..., selectedFilter=0x0) at /root/kdelibs/kio/kfile/kfiledialog.cpp:759
#15 0x00007fed9f346429 in KFileDialog::getSaveFileName (dir=..., filter=..., parent=0x81f750, caption=...) at /root/kdelibs/kio/kfile/kfiledialog.cpp:707
#16 0x00000000004549bc in TimetrackerWidget::saveCurrentTaskView (this=0x81f750) at /root/kdepim/ktimetracker/timetrackerwidget.cpp:216
#17 0x0000000000456a19 in TimetrackerWidget::saveFile (this=0x81f750) at /root/kdepim/ktimetracker/timetrackerwidget.cpp:491
#18 0x000000000045a189 in TimetrackerWidget::qt_metacall (this=0x81f750, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0x7fff853cd360) at /root/kdepim/ktimetracker/timetrackerwidget.moc:201
#19 0x00007fed9bc6fdef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#20 0x00007fed9d435982 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4
#21 0x00007fed9d435b7a in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4
#22 0x00007fed9d86be63 in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00007fed9d871e7a in ?? () from /usr/lib64/libQtGui.so.4
#24 0x00007fed9e293148 in KMenu::mouseReleaseEvent (this=0x984c00, e=0x7fff853ce060) at /root/kdelibs/kdeui/widgets/kmenu.cpp:464
#25 0x00007fed9d48d538 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#26 0x00007fed9d87306b in QMenu::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#27 0x00007fed9d43bd14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#28 0x00007fed9d444aac in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#29 0x00007fed9e19d1dd in KApplication::notify (this=0x7fff853cedd0, receiver=0x984c00, event=0x7fff853ce060) at /root/kdelibs/kdeui/kernel/kapplication.cpp:311
#30 0x00007fed9bc5abfc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#31 0x00007fed9d43cd25 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#32 0x00007fed9d4bb054 in ?? () from /usr/lib64/libQtGui.so.4
#33 0x00007fed9d4b94c9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#34 0x00007fed9d4e10f2 in ?? () from /usr/lib64/libQtGui.so.4
#35 0x00007fed96939bd3 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#36 0x00007fed9693a3b0 in ?? () from /lib64/libglib-2.0.so.0
#37 0x00007fed9693a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#38 0x00007fed9bc8591f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#39 0x00007fed9d4e0d8e in ?? () from /usr/lib64/libQtGui.so.4
#40 0x00007fed9bc5a052 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#41 0x00007fed9bc5a265 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#42 0x00007fed9bc5e6ab in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#43 0x0000000000420575 in main (argc=1, argv=0x7fff853cf8c8) at /root/kdepim/ktimetracker/main.cpp:136
Comment 9 Thorsten Staerk 2011-09-20 16:10:31 UTC
TimetrackerWidget::newFile() must ask for an _icalfilename
Comment 10 Thorsten Staerk 2011-09-20 18:24:11 UTC
ok, the problem is that ktimetrackerstorage never creates a new CalendarResource after clicking onto "New". So we have 3 choices:
- ask for filename directly after clicking new. File gets loaded then.
- ask for filename when first doing the save operation.
- removing the "New" menu entry
Comment 11 Thorsten Staerk 2011-09-21 05:30:21 UTC
The reason why I could not reproduce in the beginning was that you were referring to a "session" so I thought you meant File->Start New Session.