Re: Seg fault in [NSAutoreleasePool release]

2009-06-22 Thread Fred Kiefer
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)]
 0x7f5c429a3817 in get_imp () from /usr/lib/libobjc.so.2
 (gdb) bt
 #0  0x7f5c429a3817 in get_imp () from /usr/lib/libobjc.so.2
 #1  0x7f5c42f534db in -[NSAutoreleasePool emptyPool] (self=0xa302a0,
 _cmd=0x7f5c434267f0) at NSAutoreleasePool.m:438
 #2  0x7f5c42f532de in -[NSAutoreleasePool dealloc] (self=0xa302a0,
 _cmd=0x7f5c434267e0) at NSAutoreleasePool.m:343
 #3  0x7f5c42f5329a in -[NSAutoreleasePool release] (self=0xa302a0,
 _cmd=0x604790) at NSAutoreleasePool.m:336
 #4  0x00402178 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


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: Seg fault in [NSAutoreleasePool release]

2009-06-22 Thread Stefan Bidigaray
Yeah, I was thinking that's probably my problem.  I still haven't figured
out all this autorelease stuff yet.

Thanks
Stefan
___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev