Analyzation of the Thread Crashes

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
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
 

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
I noticed that pl.SendCommand("net.disconnect") does not crash the server when being used in a Timer and probably also in a thread..
 
Last edited:
  • Informative
Reactions: Jakkee

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
I noticed that pl.SendCommand("net.disconnect") does not crash the server when beeing used in a Time and probably also in a thread..
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.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
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.
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?
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
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?
Maybe. I wonder if the disconnect button executes net.disconnect
 

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
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
 
  • Funny
Reactions: DreTaX

፨ẴzɏϻΘķ፨

Member
Member
Apr 9, 2016
123
6
18
28
Canada
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
and can be done through testing server?