On Mon, 04 Aug 2008, Lorenzo Fiorini wrote:

Hi Lorenzo,

> Here it is the bt:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0xdffff26c
> 0x00054fbc in hb_selectReadSocket (Socket=0x30fb18) at ../../hbinet.c:239
> 239        FD_SET(Socket->com, &set);
> (gdb) bt
> #0  0x00054fbc in hb_selectReadSocket (Socket=0x30fb18) at ../../hbinet.c:239
> #1  0x00056c88 in HB_FUN_HB_INETACCEPT () at ../../hbinet.c:1619

It means that HB_InetServer() failed.
Please add this code:

      if HB_InetErrorCode( nSocket ) != 0
         ? "socket error=",  HB_InetErrorCode( nSocket ), ;
                             HB_InetErrorDesc( nSocket )
      endif

just after:

      nServerSock := HB_InetServer( nPort )

and you will see the error code and description
and maybe you will be able to answer why it fails.

The other thing is adding protections against passing wrong
(-1) socket handles to low level socket functions. Looks
that in MacOSX the internal functions does not have such
protection and it GPFs in FD_SET(). The problem exists in
all platforms though probably not everywhere GPF appears
and we should add such protection. This should be part
of some general cleanup in hbinet.c code but looks that
for MacOSX it will be critical so I'll try to make it ASAP.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to