En/na Luca Olivetti ha escrit:
En/na Luca Olivetti ha escrit:

Since I still have the RPMs built under mandriva 2009.1, I replaced
everything with the old versions (gnustep-base included) and the stack
smashing is still there, so it's either another library causing it (it
happens in libc) or an underlying problem in sope/sogo.


Well, I really need some help here (not knowing much about objective c and gdb).

google helped ;-)

I loaded the database with just one of the events causing the crash, I attached the debugger to the running sogo and I can inspect the full backtrace.

The problem appears to be here:
...
#7 0xb757cfd0 in -[iCalMonthlyRecurrenceCalculator recurrenceRangesWithinCalendarDateRange:] (self=0xa2bdcf0, _cmd=0xb759f9f0,
    _r=0xa5c6c20) at iCalMonthlyRecurrenceCalculator.m:433
433     }
Current language:  auto; currently objective-c
(gdb)


Not very helpful (to me) since line 433 is the closing bracket of the method, so let's see with what parameters it was called:

Well, that's actually the point. It appears that "ranges" gets messed up.
I stepped in the program, and when it calls the method "_addInstanceWithStartDate" (line 418 of iCalMonthlyRecurrenceCalculator.m), inside that method at line 170 it does:

  [_ranges addObject: r]

Just before that line:

(gdb) p -[_ranges count]
$9 = 0


But right after executing it:

(gdb) p -[_ranges count]
$11 = 4294967295

I also stepped into the -[GSMutableArray addObject:] method and it seems to do the right thing:

(gdb) break iCalMonthlyRecurrenceCalculator.m:170
Breakpoint 1 at 0xb757c08a: file iCalMonthlyRecurrenceCalculator.m, line 170.
(gdb) c
Continuing.

Breakpoint 1, -[iCalMonthlyRecurrenceCalculator _addInstanceWithStartDate:limitDate:limitRange:toArray:] (self=0xa48bdd8, _cmd=0xb759b138, _startDate=0xa6199d0, _until=0x0, _r=0x925cf68, _ranges=0xa619970) at iCalMonthlyRecurrenceCalculator.m:170
170         [_ranges addObject: r];
(gdb) s
-[GSMutableArray addObject:] (self=0xb759247c, _cmd=0xa48bdd8, anObject=0xb70050c0) at GSArray.m:408
408     {
(gdb) s
409       if (anObject == nil)
(gdb) s
414       if (_count >= _capacity)
(gdb) s
429       _contents_array[_count] = RETAIN(anObject);
(gdb) p _count
$1 = 0
(gdb) p _capacity
$2 = 2
(gdb) next
430       _count++;     /* Do this AFTER we have retained the object.   */
(gdb) p _count
$3 = 0
(gdb) next
431     }
(gdb) p _count
$4 = 1
(gdb) next
-[iCalMonthlyRecurrenceCalculator _addInstanceWithStartDate:limitDate:limitRange:toArray:] (self=0xa48bdd8, _cmd=0xb759b138, _startDate=0xa6199d0, _until=0x0, _r=0x925cf68, _ranges=0xa619970) at iCalMonthlyRecurrenceCalculator.m:171
171       [r release];
(gdb) p _count
No symbol "_count" in current context.
(gdb) p -[_ranges count]
$5 = 4294967295

Any idea of what could corrupt ranges here?

Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 (Ext.133)  Fax +34 93 5883007
--
[email protected]
https://inverse.ca/sogo/lists

Reply via email to