Home Forums Support Peer Discovery – Android

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3333
    Anonymous
    Inactive

    I am just getting started using peer discovery so I created an App with the correct privileges to test my code however, I get the following error on the DiscoverPeers call:

    [mono] Unable to find seq points for method ‘(wrapper managed-to-native) System.Diagnostics.Debugger:Mono_UnhandledException_internal (System.Exception)’.
    [] * Assertion at /Users/builder/data/lanes/1131/2a7b6821/source/mono/mono/mini/debugger-agent.c:5452, condition `sp’ not met
    [libc] Fatal signal 6 (SIGABRT) at 0x00002305 (code=-6), thread 8983 (mpleApp.xamarin)

    using the code:

    public static void DiscoverPeers()
    {
    PeerDiscovery.EnableDiscoverable(PeerDiscovery.DiscoveryMethod.TCPPortScan);
    while (true) {
    Dictionary<ShortGuid, Dictionary<ConnectionType, List<EndPoint>>> discoveredPeerEndPoints = PeerDiscovery.DiscoverPeers(PeerDiscovery.DiscoveryMethod.UDPBroadcast,4000);
    foreach (ShortGuid networkIdentifier in discoveredPeerEndPoints.Keys)
    PeerDiscovered(networkIdentifier, discoveredPeerEndPoints[networkIdentifier]);
    Thread.Sleep(10000);
    }

    #3335
    Anonymous
    Inactive

    Interesting error. I have some quick questions that will help find a solution:

    1. Have you tried removing the foreach loop after DiscoverPeers returns, does the error still occur?
    2. Odd that the error in thrown by System.Diagnostics.Debugger, have you tried running in release?
    3. Why is peer discovery enabled for TCPPortScan but then you use a UDPBroadcast discovery mode in the next line?
    4. What level of NetworkComms.Net license do you have? If you have Indie/Enterprise with access to source I could recommend some quick fixes without having to send you a new binary.

    Marc

    #3342
    Anonymous
    Inactive

    Also please see my most recent post here -https://networkcomms.net/forums/topic/peer-discovery-issue-on-mac-os/#post-3341

    My guess is the issues are related.

    If you could reply to my above questions I will be able to get a hotfix out to you that will hopefully solve the problem.

    Regards,
    Marc

    #3373
    Anonymous
    Inactive

    We are still investigating this in conjunction with the peer discovery issues in linux/osx. Will post back here when we know more.

    Regards,
    Marc

    #3377
    Anonymous
    Inactive

    Okay I was distracted with some bug fixing, but I’ve returned to this issue. I’ve created a new project that doesn’t throw errors anymore (removing the foreach loop after DiscoverPeers fixed the error), but it still doesn’t discover peers:

    //Both server and client must be discoverable
    PeerDiscovery.EnableDiscoverable(PeerDiscovery.DiscoveryMethod.UDPBroadcast);
    //Write out the network adaptors that are discoverable
    Console.WriteLine(“\nPeer Identifier: ” + NetworkComms.NetworkIdentifier);
    Console.WriteLine(“\nDiscoverable on:”);
    foreach (IPEndPoint localEndPoint in Connection.ExistingLocalListenEndPoints(ConnectionType.UDP))
    Console.WriteLine(“{0}:{1}”, localEndPoint.Address, localEndPoint.Port);

    Dictionary<ShortGuid, Dictionary<ConnectionType, List<EndPoint>>> discoveredPeerEndPoints = PeerDiscovery.DiscoverPeers(PeerDiscovery.DiscoveryMethod.UDPBroadcast);

    Assuming there is some sort of bug with the lib is there an ETA for a hotfix?

    • This reply was modified 9 years, 6 months ago by .
    • This reply was modified 9 years, 6 months ago by .
    #3405
    Anonymous
    Inactive

    Heya Mark,

    We have successfully reproduced this problem. We hope to have a fix or more information for you within the next few days.

    Regards,
    Marc

    #3406
    Anonymous
    Inactive

    We have made progress, the problem is related to this one – https://bugzilla.xamarin.com/show_bug.cgi?id=7981.

    We have managed to successfully discover peers on an android device. We will put together a hotfix of the next few days.

    Marc

    #3412
    Anonymous
    Inactive

    Heya Mark,

    We have a hotfix available for this issue now. If you give us your email we will send you a download link.

    Regards,
    Marc

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.