discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: some gnustep-base tests are randomly failing


From: Fred Kiefer
Subject: Re: some gnustep-base tests are randomly failing
Date: Sat, 29 Oct 2011 18:51:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

On 28.10.2011 20:18, Richard Frith-Macdonald wrote:

On 28 Oct 2011, at 18:55, Fred Kiefer wrote:


At least on my machine this isn't the case, I don't have ICU installed. When 
adding some log statements in noticed that the test code actually raises an 
exception, so I ran gdb against the test code and this produced the following 
back trace:


gdb) bt
#0  -[NSException raise] (self=0x790ad8, _cmd=0x7ffff7d36e20) at
NSException.m:955
#1  0x00007ffff7883f08 in +[NSException raise:format:]
(self=0x7ffff7d36a40,
    _cmd=<value optimized out>, name=0x7ffff7d371a0, format=0x7ffff7d087a0)
    at NSException.m:835
#2  0x00007ffff77f6895 in -[GSMutableString
replaceCharactersInRange:withString:] (
    self=0x790388, _cmd=0x7ffff7d87c60, aRange=..., aString=0x7ffff7d5d7e0)
    at GSString.m:4414
#3  0x00007ffff792a6ea in -[NSMutableString
replaceOccurrencesOfString:withString:options:range:] (self=0x790388,
_cmd=<value optimized out>, replace=0x7ffff7d5d3e0, by=0x7ffff7d5d7e0,
    opts=<value optimized out>, searchRange=...) at NSString.m:5514
#4  0x00007ffff78d0cca in -[NSNumberFormatter stringForObjectValue:]
(self=0x69c598,
    _cmd=<value optimized out>, anObject=<value optimized out>) at
NSNumberFormatter.m:1300
#5  0x000000000040685d in main () at basic.m:22


gdb) up 2
#2  0x00007ffff77f6895 in -[GSMutableString 
replaceCharactersInRange:withString:] (
    self=0x790388, _cmd=0x7ffff7d87c60, aRange=..., aString=0x7ffff7d5d7e0)
    at GSString.m:4414
4414      GS_RANGE_CHECK(aRange, _count);
(gdb) p aRange
$1 = {location = 0, length = 1}
(gdb) po self
<object returns empty description>
(gdb) p [self length]
$2 = 0

Thanks ... I fixed that ... was not terminating the loop properly when 
searching for the substring.

Thank you, this fixed the tests for me. Still I think that we should add tests for all the combinations of replaceOccurrencesOfString:withString:options:range: to our test suite. That bit of code turned out to be surprisingly complicated and error prone.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]