Bug 77852 - Crashes very often when moving an appointment from the main window to the small window showing the month
Summary: Crashes very often when moving an appointment from the main window to the sma...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 3.2
Platform: Mandrake RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
: 83527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-17 18:01 UTC by Alex Chejlyk
Modified: 2004-09-04 20:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace of moving appointment bug (3.48 KB, text/plain)
2004-04-16 17:40 UTC, michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Chejlyk 2004-03-17 18:01:26 UTC
Version:           3.2 (using KDE KDE 3.2.0)
Installed from:    Mandrake RPMs
Compiler:          Mandrake 10 gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
 
OS:          Linux

When attempting to reschedule an appointment from one date to another, I drag the appointment (from week view) to the appropriate calendar day on the small calendar in the upper left hand corner of korganizer. This crashes very often (more than 1/2 the time) killing the application. When it doesn't crash, it works as expected, the appointment shows up on the new calendar day.

The problem occurs in Korganizer as a stand alone app and within the Kontact framework.

I have noticed the same problem, although it crashes more often, on my FreeBSD system using kde 3.1.x.

The backtrace on my MDK10 system says it is unable to create a valid backtrace.
Comment 1 Reinhold Kainhofer 2004-03-25 11:31:26 UTC
I'm able to reproduce that problem, although it crashes only after I move/copy 
several events. I also get a useless backtrace in gdb:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 9814)]
0x4107720d in QApplication::x11ProcessEvent(_XEvent*) () 
from /usr/lib/libqt-mt.so.3
(gdb) bt
#0  0x4107720d in QApplication::x11ProcessEvent(_XEvent*) () 
from /usr/lib/libqt-mt.so.3
#1  0x4108cf01 in QEventLoop::processEvents(unsigned) () 
from /usr/lib/libqt-mt.so.3
#2  0x410f4ce8 in QEventLoop::enterLoop() () from /usr/lib/libqt-mt.so.3
#3  0x410f4b98 in QEventLoop::exec() () from /usr/lib/libqt-mt.so.3
#4  0x410e16d1 in QApplication::exec() () from /usr/lib/libqt-mt.so.3
#5  0x08050a81 in main (argc=2, argv=0xbffff6d4) 
at ../../HEAD_kdepim/korganizer/main.cpp:58


The console debug output is:

libkcal: Event::clone()
libkcal: CalendarResource::endChange()
korganizer: ERROR: No change count for resource.
libkcal: CalendarResources::save( Ticket *)
korganizer: KOAgendaView::startDrag(): Delete drag source


Somehow this reminds me of the crashes I hoped I had fixed some time ago :-(((

Thanks for the report,
Reinhold

Comment 2 michael 2004-04-16 17:39:06 UTC
This is confirmed problem... Been meaning to file a bug.  It occurs any time you move an appointment.  Whether you drag the appointment, or double click then change the date/time manually.  I am attaching a backtrace.
Comment 3 michael 2004-04-16 17:40:45 UTC
Created attachment 5661 [details]
Backtrace of moving appointment bug
Comment 4 Jan Schaefer 2004-05-13 17:13:49 UTC
I can confirm this with KDE 3.2.1 SUSE RPMs
Comment 5 Reinhold Kainhofer 2004-07-19 22:40:28 UTC
*** Bug 83527 has been marked as a duplicate of this bug. ***
Comment 6 Reinhold Kainhofer 2004-09-04 20:25:45 UTC
CVS commit by kainhofe: 

Fix the crash when cancelling a drop. I can now no longer reproduce the crash.

CCMAIL: 77852-done@bugs.kde.org


  M +17 -16    kodaymatrix.cpp   1.53


--- kdepim/korganizer/kodaymatrix.cpp  #1.52:1.53
@@ -209,5 +209,5 @@ void KODayMatrix::recalculateToday()
     }
   }
-  // qDebug(QString("Today is visible at %1.").arg(today));
+  // kdDegug(5850) << "Today is visible at "<< today << "." << endl;
 }
 
@@ -481,4 +481,6 @@ void KODayMatrix::dropEvent( QDropEvent 
   }
 
+  if ( action == DRAG_COPY  || action == DRAG_MOVE ) {
+  
   // When copying, clear the UID:
   if ( action == DRAG_COPY ) {
@@ -494,5 +496,4 @@ void KODayMatrix::dropEvent( QDropEvent 
   }
 
-  if ( action == DRAG_COPY  || action == DRAG_MOVE ) {
     e->accept();
     if ( event ) {
@@ -510,5 +511,5 @@ void KODayMatrix::dropEvent( QDropEvent 
       // When moving, we don't need to insert  the item!
       if ( action != DRAG_MOVE ) {
-        if ( !mCalendar->addEvent( event ) ) {
+        if ( !mCalendar->addIncidence( event ) ) {
           KODialogManager::errorSaveIncidence( this, event );
           return;
@@ -533,5 +534,5 @@ void KODayMatrix::dropEvent( QDropEvent 
       // When moving, we don't need to insert  the item!
       if ( action != DRAG_MOVE ) {
-        if ( !mCalendar->addTodo( todo ) ) {
+        if ( !mCalendar->addIncidence( todo ) ) {
           KODialogManager::errorSaveIncidence( this, todo );
         }