Common\\Sockets\\TCPsocketWin.cpp:99 Failure condition: !name.IsEmpty()

I get a “Common\Sockets\TCPsocketWin.cpp:99 Failure condition: !name.IsEmpty()” now when launching my app on Windows 10. This has started since I am using Xojo 2016 r3. Previously I built that app with Xojo 2016 Release 1.1 and problem did not exist. The only thing I have done is updating Xojo and MBS pluggin.

Anybody else?

Stan

Have you tried going back to the old MBS plugin to see if that still works?

I found where it comes from:

[code]Dim aNetworkInterface As NetworkInterface
Dim myIP As String

aNetworkInterface = System.GetNetworkInterface()

If aNetworkInterface <> nil then
myIP = aNetworkInterface.IPAddress <--------------------------------------------- HERE
end if[/code]

System.GetNetworkInterface has an optional parameter, if I set it to 0, IT THEN WORKS.

[code]Dim aNetworkInterface As NetworkInterface
Dim myIP As String

aNetworkInterface = System.GetNetworkInterface(0)

If aNetworkInterface <> nil then
myIP = aNetworkInterface.IPAddress
end if[/code]

It looks like the parameter is no longer optional, is that possible? No problem on macOS, this is an issue on MS Windows only, in my case MS Windows 10.

I have come across the exact same problem (Win 7). This started with 2016r2. I didn’t have this issue with prior releases of Xojo. Passing an argument (e.g. 0) does indeed cause the code to behave properly. I believe this is a bug. By not passing an argument you expect it to give you the default interface, which may not be interface 0.

Furthermore, if you use GetNetworkInterface without an argument in code, set a break point immediately after, run the code and then use the IDE to inspect the properties of the networkinterface object, the IDE will throw the same error message.

That’s about when we added the ability to access localhost.

Yes, it would appear that way.

I tested this on the Mac, and calling GetNetworkInterface without an index returns an empty interface (IP address 0.0.0.0), and not the default interface.

It seems that calling this method without an index no longer works. I’m not sure if this is a bug or intended behavior.

There is a Feedback case associated with this: <https://xojo.com/issue/45509>