gnustep-dev
[Top][All Lists]
Advanced

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

Re: Bug in NSRunLoop?


From: Richard Frith-Macdonald
Subject: Re: Bug in NSRunLoop?
Date: Mon, 10 Jun 2002 17:46:07 +0100

On Monday, June 10, 2002, at 03:54 PM, Marcus Müller wrote:

Hi,

I think I've found a bug in the NSRunLoop but I don't understand why the bug occurs. The problem is pretty simple. If you create a socket and attach it to the runloop by telling it to -acceptInBackgroundAndNotify, the socket will be added to the runloop and all is fine for the first connection. The second connection (and any other successive connections) doesn't work, however, as it appears that the new socket is automatically closed. I don't know why that happens. Unfortunately I cannot debug the problem as I'm on FreeBSD and cannot build a debug build of GNUstep (compiler [gcc 3.0.4] crashes), but that's another story. Can somebody else please investigate?

In order to make debugging easier I've written a testcase. It's available at:

http://www.mulle-kybernetik.com/~znek/GNUstep/GSSocketTest.tar.bz2

The testcase runs as expected under Mac OS X but fails with the symptoms described above on my FreeBSD box. I suspect that the same will happen on any GNUstep platform.

Thanks for your help in advance,

I think the bug is in your test code.
You forgot to retain the handle for the new incoming connection ... so the handle is
being deallocated, and the connection shut down.

It may be working one MacOS-X because the sequence of autorelease pools being used is
different, or it may be that MacOS-X has a memory leak.




reply via email to

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