Page 1 of 1

Sfs instance lost (Null reference)

Posted: 14 Dec 2014, 02:14
by braza
Hi!
Once in a while, usually during debugging, which means one of the parties is not responding anymore, Unity client receives

NullReferenceException: Object reference not set to an instance of an object
NetworkManager.FixedUpdate () (at Assets/Scripts/Framework/NetworkManager.cs:82)


at sfs.ProcessEvents();

Network manager is as per tutorials. So I'm really curious how could reference be lost..

Re: Sfs instance lost (Null reference)

Posted: 14 Dec 2014, 10:40
by Lapo
Me too. I have no idea. :)
You should probably check the code in the NetworkManager and make sure there aren't conditions in which the sfs variable is set to null

thanks

Re: Sfs instance lost (Null reference)

Posted: 17 Jan 2015, 17:09
by braza
Lapo wrote:Me too. I have no idea. :)
You should probably check the code in the NetworkManager and make sure there aren't conditions in which the sfs variable is set to null

thanks

well, if I just search for this sfs reference usages, there's no any place in my code that assignes it to null... ok, I'll keep investigating

Re: Sfs instance lost (Null reference)

Posted: 19 Jan 2015, 23:54
by brendan7
I've been getting this too. It only happens on android after a long pause>resume in which the sfs client stays connected. I never assign the sfsClient as null.

So far my solution is to re-initiate the client and any dependent systems, which still has issues of its own, so finding the root problem would be great

Re: Sfs instance lost (Null reference)

Posted: 20 Jan 2015, 11:14
by Lapo
I am not an Android expert... but it sounds like an app life cycle problem.
Maybe here you can read about tools to help you find out what is going on --> https://developer.android.com/training/ ... emory.html