On 20 Nov 2009, at 06:33, Chris Idou wrote:

> 
> 
> I've got a report from a user of my program crashing.
> 
> In the console they are getting this:
> 
> 11/19/09 3:08:46 PM[0x0-0x18a18a]Progname[8699]Progname(8699,0x1167b0000) 
> malloc: *** error for object 0x100563870: pointer being freed was not 
> allocated
> 11/19/09 3:08:46 PM[0x0-0x18a18a] Progname[8699]*** set a breakpoint in 
> malloc_error_break to debug
> 
> 
> Thread 2 Crashed:
> 0   libSystem.B.dylib             0x00007fff87a7784d usleep$NOCANCEL + 0
> 1   libSystem.B.dylib             0x00007fff87a96e3c abort + 93
> 2   libSystem.B.dylib             0x00007fff879ae155 free + 128
> 3   libSystem.B.dylib             0x00007fff879fa16e asl_set_query + 572
> 4   libSystem.B.dylib             0x00007fff87a16239 asl_send + 824
> 5   libSystem.B.dylib             0x00007fff87a15e56 asl_vlog + 570
> 6   libSystem.B.dylib             0x00007fff87a15c19 asl_log + 153
> 7   Progname.CocoaTools        0x0000000104567101 -[Log 
> vlogLevel:format:arguments:] + 270
> 8   Progname.CocoaTools        0x000000010456730c -[Log notice:] + 164
> ....etc
> 
> Does this look like an Apple bug? It looks to me like the asl subsystem is 
> freeing something it shouldn't and aborting the program.
> 

Normally when I see crashes involving calls to methods with format strings, I 
immediately assume that the arguments following the the format string do not 
match the format specifiers in the format string. e.g. if -[Log notice:] is 
declared like this

-(void) notice: (NSString*) format, ...;

[log notice: @"blah blah blah %@ %s", "blah"];

The above line has an NSObject missing from its argument list.  There's also

[log notice: someNSStringofIndeterminateOrigin];

which may crash if the string contains format specifiers e.g. if it is a URL 
with % escapes in it.

So you probably want to check your calls to -[Log notice:].


> 
>      
> __________________________________________________________________________________
> Win 1 of 4 Sony home entertainment packs thanks to Yahoo!7.
> Enter now: http://au.docs.yahoo.com/homepageset/
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/adc%40jeremyp.net
> 
> This email sent to a...@jeremyp.net


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to