[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Seg fault in [NSAutoreleasePool release]
From: |
Fred Kiefer |
Subject: |
Re: Seg fault in [NSAutoreleasePool release] |
Date: |
Mon, 22 Jun 2009 11:34:12 +0200 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Stefan Bidigaray wrote:
> Not sure if this is my fault or not! I've gotten this quite often in
> testing the NSSound stuff... I've attached a copy of the program. I'm
> not sure if it's something I'm doing, or what? I'm using SVN r28323
> (it's kind of old).
>
> Here's the gdb output:
> (gdb) r
> Starting program: /root/obj/nssoundtest ../sample.au
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7f5c43b546f0 (LWP 16334)]
> 2009-06-21 18:09:54.846 nssoundtest[16334] Unknown time zone name `CST'.
> 2009-06-21 18:09:54.846 nssoundtest[16334] Using time zone with absolute
> offset 0.
> 2009-06-21 18:09:54.842 nssoundtest[16334] Duration: 6309616
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f5c43b546f0 (LWP 16334)]
> 0x00007f5c429a3817 in get_imp () from /usr/lib/libobjc.so.2
> (gdb) bt
> #0 0x00007f5c429a3817 in get_imp () from /usr/lib/libobjc.so.2
> #1 0x00007f5c42f534db in -[NSAutoreleasePool emptyPool] (self=0xa302a0,
> _cmd=0x7f5c434267f0) at NSAutoreleasePool.m:438
> #2 0x00007f5c42f532de in -[NSAutoreleasePool dealloc] (self=0xa302a0,
> _cmd=0x7f5c434267e0) at NSAutoreleasePool.m:343
> #3 0x00007f5c42f5329a in -[NSAutoreleasePool release] (self=0xa302a0,
> _cmd=0x604790) at NSAutoreleasePool.m:336
> #4 0x0000000000402178 in main (argc=2, argv=0x7fff4bb683c8)
> at nssound_test.m:73
>
> Let me know if you need all the other files that go along with this.
I did not run your test (You didn't provide a GNUmakefile and it seems
to require external headers, which is bad for a test), but from looking
at the code I notice that you are releasing "file", which is an already
autoreleased NSString. Perhaps it would be sufficient to just drop that
line.
Cheers,
Fred