On Tue, 25 Apr 2000 11:10:45 -0600, [EMAIL PROTECTED] wrote:
> Erik Rasmussen wrote:
> > The computer is a PentiumIII, with Mandrake Linux, and here's the gdb
> > output (I can't yet figure why this app is wanting a hostname, and it's
> > not immediately obvious from the man page why gethostbyname() is
> > returning a null ptr).....
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x40648adf in gethostbyname (name=0x0) at ../nss/digits_dots.c:24
> > 24 ../nss/digits_dots.c: No such file or directory.
> > (gdb) bt
> > #0 0x40648adf in gethostbyname (name=0x0) at ../nss/digits_dots.c:24
> > #1 0x40329b2f in _c_TcpInPort__newForReceivingFromPortNumber_ (
> > self=0x404399e0, _cmd=0x4043a1e8, n=4237) at TcpPort.m:1189
> > #2 0x40329d51 in
>
> It's probably your network isn't set up correctly. You should check your
> /etc/hosts file and see if it at least contains this line:
>
> 127.0.0.1 localhost
>
> But, really, it should be handled better by GNUstep.
I've added more logging in this sort of situation, and made the TcpPort stuff
return a nil port rather than crashing - of course that probably just means
that something somewhere else will crash when it gets a nil port and it's
expecting a real one :-( However, I don't want to put much work into
TcpPort/NSConnection as I'm intending to replace it with the more MacOS-X
compatible GSTcpPort when/if I get time.
At least the changes should result in improved debug messages. when a machine
doesn't have its networking set up properly.
Q. Should we make NSHost throw an exception if it can't create a currentHost
object? at present, it simply returns nil.