Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Problem with Lidgren Network Library after UWP build!

Discussion in 'Connected Games' started by rafasoft, Aug 12, 2019 at 6:15 PM.

  1. rafasoft

    rafasoft

    Joined:
    Monday
    Posts:
    4
    Hi,

    I have a strange problem to describe.. I created an application based on Lidgren Network library and after build as standalone windows application, everything is going fine.

    When I am building my application as UWP I am getting successful build but when I am launching my application I am getting Null Reference Exception from Lidgren!!!

    Could you please help me?

    Thanks in advance! Capture1.PNG
     
  2. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    326
    Posting the same thing from 2 different accounts is not going to endear you to anyone.
     
    Joe-Censored likes this.
  3. rafasoft

    rafasoft

    Joined:
    Monday
    Posts:
    4
    Thanks for your advice.. Accidentally happened.. We edit the post.
     
  4. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    326
    I tried Lidgren many years ago, before moving to ENet, then SmartFox. Are you sure Lidgren is the best solution for you? It is very low level.
     
  5. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,133
    You are probably on your own. You have the source code, you have the stacktrace. Debug it.

    Lidgren is a very good solution.
     
    LukeDawn and Joe-Censored like this.
  6. rafasoft

    rafasoft

    Joined:
    Monday
    Posts:
    4
    Thank you for your reply.. We are working on dedicated server infrastructure which working with Lidgren.

    It is not easy to move from Lidgren right now..
     
  7. rafasoft

    rafasoft

    Joined:
    Monday
    Posts:
    4
    Thank you very much for your reply...

    We believe Lidgren is the best solution for the project right now.

    The thing is that the error arises after the UWP build. As standalone PC working perfectly.

    We also build Lidgren for Unity. After this the UWP starts without Null References but when we click the login button, nothing happends.. We are not getting NetIncomingMessageType.DiscoveryResponse because we cannot achieve communication with our server!
     
  8. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,133
    Get the debug symbols for Lidgren, and debug the Lidgren source code. It is your best bet at solving the problem unless someone else has already solved it and finds this thread.

    Random people are probably not going to debug your code for you. We are happy to answer questions and guide you, but not do the work for you.

    From me just looking at the code (without debug symbols. You need those...) (https://github.com/lidgren/lidgren-network-gen3/blob/master/Lidgren.Network/NetPeer.Internal.cs#L168

    I suspect these lines: 194 returning null or 196 LocalEndPoint being null.
     
    Last edited: Aug 14, 2019 at 12:27 PM