Al 18/09/10 14:28, En/na Luca Olivetti ha escrit:
I now tried to initialize ranges with
ranges = [[NSMutableArray alloc] initWithCapacity: numberOfMonthsInRange]
instead of
ranges = [NSMutableArray] arrayWithCapacity: numberOfMonthsInRange]
that gets rid of the 4294967295 issue, but it still smashes the stack
when the method returns (i.e. on the closing bracket at line 433).
That was surely a red-herring (a gdb glitch maybe?).
Now with the original file the count is one.
It seems that during the exit of the method it tries to free some
already freed object.
Since I don't understand what's happening, this is the state of the
locals between the "return ranges" and the "}":
Breakpoint 1, -[iCalMonthlyRecurrenceCalculator
recurrenceRangesWithinCalendarDateRange:] (self=0xb385340,
_cmd=0xb767f7d0, _r=0xb570b18) at iCalMonthlyRecurrenceCalculator.m:433
433 }
(gdb) info locals
ranges = (class NSMutableArray *) 0xb496370
timeZone = (class NSTimeZone *) 0xa083a30
eventStartDate = (class NSCalendarDate *) 0xaa50608
rStart = (class NSCalendarDate *) 0xb385378
rEnd = (class NSCalendarDate *) 0xb495ec0
until = (class NSCalendarDate *) 0x0
referenceDate = (class NSCalendarDate *) 0xb496398
eventDayOfMonth = 4
monthIdxInRange = 2
numberOfMonthsInRange = 2
interval = 1
repeatCount = 0
diff = 108
count = 0
byMonthList = "\000\000\000\000\000\000\000\000\001\000\000"
byMonth = (class NSArray *) 0xb496028
byMonthDay = (class NSArray *) 0x0
byPositiveMonthDaySet =
"@\e(�xs8\...@!\000\000�\000\000\000@\e(�\030X\020�\000U\023��\031\000"
byNegativeMonthDaySet = "�O\f��\002��xS8\013\004B
\224\r��w\020�\030\013w\...@\000\000"
byDayMask = (class iCalByDayMask *) 0x0
(gdb) p [ranges count]
$1 = 1
(gdb) p [ranges retainCount]
$2 = 1
(gdb) p [timeZones retainCount]
No symbol "timeZones" in current context.
(gdb) p [timeZone retainCount]
$3 = 92
(gdb) p [eventStartDate retainCount]
$4 = 3
(gdb) p [rStart retainCount]
$5 = 2
(gdb) p [rEnd retainCount]
$6 = 2
(gdb) p [until retainCount]
$7 = 0
(gdb) p [referenceDate retainCount]
$8 = 1
(gdb) p [byMonth retainCount]
$9 = 1
(gdb) p [byMonthDay retainCount]
$10 = 0
(gdb) p [byDayMask retainCount]
$11 = 0
(gdb)
What other information could I provide to try and fix this issue?
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