Since you have the %@ in the line which reads NSLog(@"token: %@") the presence of the %@ implies that there will be a set of parameters in the va_arg list which is passed into that function.
You don't have anything there. I have seen this failure on OPENSTEP and Cocoa as well as GNUste. So this shouldn't be considered a problem/bug. GC On Wed, Jan 18, 2012 at 10:50 AM, Riccardo Mottola <[email protected]> wrote: > Hi, > > I'm expanding a CVS parser in DataBasin. I'm trying to parse a quoted CSV > file. > > The code snippet is: > > NSLog(@"2 %@, remaining: %@", field, [[scanner string] > substringFromIndex: [scanner scanLocation]]); > [scanner scanString:qualifier intoString:&token]; > if (token != nil) > { > NSLog(@"token: %@"); > > now I expect token to be the qualifier ("). NSLog however dies. Why? I get > the backtrace below and as you may see, if I print out the object in GDB, it > is indeed the string I so expect. Why is NSLog spitting into my face? Did I > find some obscure bug or am I missing the obvious in my code? > > Thank you, > > Riccardo > > --- > #0 0xb768d926 in objc_msg_lookup () from > /usr/lib/i386-linux-gnu/libobjc.so.3 > #1 0xb775327b in GSPrivateFormat (s=0xbfffd9c0, format=0xbfffda00, > ap=0xbfffeb04 "øø\005\bHù\005\bLëÿ¿1", locale=0x0) at GSFormat.m:1856 > #2 0xb7770dd7 in -[GSPlaceholderString initWithFormat:locale:arguments:] ( > self=0x80ed4cc, _cmd=0xb7af7460, format=0x838e01c, locale=0x0, > argList=0xbfffeb04 "øø\005\bHù\005\bLëÿ¿1") at GSString.m:1314 > #3 0xb78bd211 in -[NSString initWithFormat:arguments:] (self=0x80ed4cc, > _cmd=0xb7b2d688, format=0x838e01c, > argList=0xbfffeb04 "øø\005\bHù\005\bLëÿ¿1") at NSString.m:1152 > #4 0xb795e095 in +[NSString(GNUstepBase) stringWithFormat:arguments:] ( > self=0xb7af77e0, _cmd=0xb7ad6bb8, format=0x838e01c, > argList=0xbfffeb04 "øø\005\bHù\005\bLëÿ¿1") at NSString+GNUstepBase.m:46 > #5 0xb784c6c1 in NSLogv (format=0x838e01c, > args=0xbfffeb04 "øø\005\bHù\005\bLëÿ¿1") at NSLog.m:340 > #6 0xb784c963 in NSLog (format=0x805fa14) at NSLog.m:247 > #7 0x080545f4 in -[DBCVSReader decodeOneLine:] (self=0x83a4ef4, > _cmd=0x805f8d0, line=0x85c0974) at DBCVSReader.m:174 > #8 0x08054151 in -[DBCVSReader getFieldNames:] (self=0x83a4ef4, > _cmd=0x805f8b0, firstLine=0x85c0974) at DBCVSReader.m:120 > > > (gdb) p token > $1 = (struct NSString *) 0x833d7c4 > (gdb) po token > " > > > _______________________________________________ > Discuss-gnustep mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnustep -- Gregory Casamento Open Logic Corporation, Principal Consultant yahoo/skype: greg_casamento, aol: gjcasa (240)274-9630 (Cell) http://www.gnustep.org http://heronsperch.blogspot.com _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
