Analyzation of the Thread Crashes

Discussion in 'News & Announcements' started by DreTaX, Apr 1, 2016.

  1. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,817
    Likes Received:
    602
    I have been looking into this a very long time, and as always the log ends with UnityEngine.Object.FindObject...

    @tarynkelley have been looking into It too.

    Seems like anything that is on timer, or on a thread causes the server to have a nice crash popup. (Player.Disconnect calls UnityEngine.Object.FindObject)

    This has been resolved in a higher UnityEngine version, @Snake even found the changelog of It before.

    Some of the plugins use a timer to handle checks later, and even disconnect players.

    I have been thinking on several stuffs, how could I actually make It safer, but I can't come up with anything useful. I have been thinking on raising a hook, but I have been wondering if the hook would be running under a thread too.

    http://stackoverflow.com/questions/17123061/calling-methods-in-main-thread-from-other-threads

    The guy who gave the answer also shows the usage of the delegates, which we use for calling our hooks.

    I will see if that would work or not
     
    #1
    • Like Like x 1
    • Informative Informative x 1
  2. tarynkelley
    Offline

    tarynkelley Moderator Moderator

    Joined:
    Nov 14, 2015
    Messages:
    559
    Likes Received:
    36
    I noticed that pl.SendCommand("net.disconnect") does not crash the server when being used in a Timer and probably also in a thread..
     
    #2
    Last edited: Apr 2, 2016
    • Informative Informative x 1
  3. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,817
    Likes Received:
    602
    What the actual fuck?

    It might be because the disconnect is not called by the server. The server sends the command and the client disconnects. Not bad m8.
     
    #3
  4. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,443
    Likes Received:
    135
    If that's true, I'd assume you could probably mod the client so it does not disconnect (Unless you quit the game). You could make a pretty OP hack from that; No ban/kick hack?
     
    #4
    • Agree Agree x 2
  5. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,817
    Likes Received:
    602
    Maybe. I wonder if the disconnect button executes net.disconnect
     
    #5
  6. tarynkelley
    Offline

    tarynkelley Moderator Moderator

    Joined:
    Nov 14, 2015
    Messages:
    559
    Likes Received:
    36
    I can confirm now also that it is working stable in a thread.

    I agree that it could theoretically also be bypassed with a modded client.

    I was also thinking about using pl.SendCommand("quit") instead :D
     
    #6
    • Funny Funny x 1
  7. xandeturf
    Offline

    xandeturf Moderator Moderator

    Joined:
    Nov 4, 2015
    Messages:
    132
    Likes Received:
    9
    in ConnectionAcceptor --> uLink_OnPlayerDisconnected
     
    #7
  8. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,817
    Likes Received:
    602
    What?
     
    #8
  9. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,443
    Likes Received:
    135
    I think he is saying to use this method:
    [​IMG]
     
    #9
  10. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,817
    Likes Received:
    602
    Its a hook. Its called when someone dcs.

    Sent From My Samsung Galaxy S4
     
    #10
  11. xandeturf
    Offline

    xandeturf Moderator Moderator

    Joined:
    Nov 4, 2015
    Messages:
    132
    Likes Received:
    9
    there is an end to cherish ? the beta will be free to use ?
     
    #11
  12. ፨ẴzɏϻΘķ፨
    Offline

    ፨ẴzɏϻΘķ፨ Member Member

    Joined:
    Apr 9, 2016
    Messages:
    123
    Likes Received:
    2
    and can be done through testing server?
     
    #12
  13. tarynkelley
    Offline

    tarynkelley Moderator Moderator

    Joined:
    Nov 14, 2015
    Messages:
    559
    Likes Received:
    36

Share This Page

iHax Comunity/