kryonet
kryonet copied to clipboard
discoverHost throws error on iOS
Using client.discoverHost on Android and desktop works without issue. But it fails on iOS (using for RoboVM for port). (For information creating a server on iOS works perfectly, you can connect to it with an Android Client and all goes well. )
The stack:
[WARN] java.lang.Class: Class.forName() failed to load 'android.os.Process' Exception in thread "Thread-7" java.lang.IllegalArgumentException: sockaddrToInetAddress bad ss_family: 0 at libcore.io.Posix.recvfromBytes(Native Method) at libcore.io.Posix.recvfrom(Posix.java) at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java) at libcore.io.IoBridge.recvfrom(IoBridge.java) at java.net.PlainDatagramSocketImpl.doRecv(PlainDatagramSocketImpl.java) at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java) at java.net.DatagramSocket.receive(DatagramSocket.java) at com.esotericsoftware.kryonet.Client.discoverHost(Client.java)
Tested with Kryonet 2.20 and 2.21
Very cool to hear it mostly works with RoboVM! I'm afraid you'll probably have to go to RoboVM for help on the crash.
Hi,
I'm getting this same error on kryonet 2.21 and latest libgdx/roboVM releases. Has anyone found a fix?
Don't know about robovm, but discoverHost is of limited use.
-Nate
On Tue, May 20, 2014 at 8:17 PM, Brett Davis [email protected]:
Hi,
I'm getting this same error on kryonet 2.21 and latest libgdx/roboVM releases. Has anyone found a fix?
— Reply to this email directly or view it on GitHubhttps://github.com/EsotericSoftware/kryonet/issues/57#issuecomment-43663408 .
Nope, I still have no fix for that as well as no workaround for now :/ I could not spend much time on it for now.
The only remaining issue is the discoveryHost.
2014-05-20 20:37 GMT+02:00 Nathan Sweet [email protected]:
Don't know about robovm, but discoverHost is of limited use.
-Nate
On Tue, May 20, 2014 at 8:17 PM, Brett Davis [email protected]:
Hi,
I'm getting this same error on kryonet 2.21 and latest libgdx/roboVM releases. Has anyone found a fix?
— Reply to this email directly or view it on GitHub< https://github.com/EsotericSoftware/kryonet/issues/57#issuecomment-43663408>
.
— Reply to this email directly or view it on GitHubhttps://github.com/EsotericSoftware/kryonet/issues/57#issuecomment-43666037 .
@NathanSweet I'm not sure I understand what you mean-Should I not be using DiscoverHosts? If not, do you have any recommendations for how to get similar functionality? The game I am developing needs to automatically connect players to each other.
It only works on a LAN and even then depends on the network hardware and configuration. You should probably have a server for match making.
-Nate
On Wed, May 21, 2014 at 4:28 PM, Brett Davis [email protected]:
@NathanSweet https://github.com/NathanSweet I'm not sure I understand what you mean-Should I not be using DiscoverHosts? If not, do you have any recommendations for how to get similar functionality? The game I am developing needs to automatically connect players to each other.
— Reply to this email directly or view it on GitHubhttps://github.com/EsotericSoftware/kryonet/issues/57#issuecomment-43761215 .
Ah right, it's a LAN game though, not online.
This is a bug in RoboVM caused by weird behavior in OSX/iOS when receiving empty UDP packets. We have pushed a workaround which seems to fix the problem. In any case you should close this as it's been confirmed to be RoboVM-related. See robovm/robovm#344.