Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
We have a situation where trying to call Sfs2X.SmartFox.EnableLagMonitor on our smartfox object is resulting in an exception "Object reference not set to an instance of an object." that is caught and logged. This does not happen very frequently so we are unable to reproduce it. The Smartfox object is not null and IsConnected state is also true. Any idea where the issue might be?
Re: Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
Hi,
the LagMonitor should be activated after a successful login. It may be that your client side logic does not handle the state of "non logged in" correctly?
What version of the API are you using by the way?
Cheers
the LagMonitor should be activated after a successful login. It may be that your client side logic does not handle the state of "non logged in" correctly?
What version of the API are you using by the way?
Cheers
Re: Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
Our version is Smartfox 1.7.13.0
We are calling the function upon SFSEvent.ROOM_JOIN , which means login must have happened for room to be joined in.
We are calling the function upon SFSEvent.ROOM_JOIN , which means login must have happened for room to be joined in.
Re: Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
which means login must have happened for room to be joined in.
Yes, definitely.
Is there any way in which you can replicate the issue?
Also do you have a full stack trace of the Exception when it occurs?
Thanks
Re: Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
As of now, we have been unable to replicate the issue.
The error encountered is "Object reference not set to an instance of an object."
The stacktrace looks like this (have substituted the program namespace using [ProgramNameSpace]) -
Sfs2X.SmartFox.EnableLagMonitor (System.Boolean enabled, System.Int32 interval, System.Int32 queueSize) [0x00000] in <00000000000000000000000000000000>:0 \n at [ProgramNameSpace].SFSEventManager.RoomJoinFunction () [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.Core.EventListenerDelegate.Invoke (Sfs2X.Core.BaseEvent evt) [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.Core.EventDispatcher.DispatchEvent (Sfs2X.Core.BaseEvent evt) [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.SmartFox.ProcessEvents () [0x00000] in <00000000000000000000000000000000>:0
[ProgramNameSpace].SFSEventManager.RoomJoinFunction () is called when the function attached to the listener SFSEvent.ROOM_JOIN is called (and nothing else is called before it after ROOM_JOIN happens).
The error encountered is "Object reference not set to an instance of an object."
The stacktrace looks like this (have substituted the program namespace using [ProgramNameSpace]) -
Sfs2X.SmartFox.EnableLagMonitor (System.Boolean enabled, System.Int32 interval, System.Int32 queueSize) [0x00000] in <00000000000000000000000000000000>:0 \n at [ProgramNameSpace].SFSEventManager.RoomJoinFunction () [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.Core.EventListenerDelegate.Invoke (Sfs2X.Core.BaseEvent evt) [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.Core.EventDispatcher.DispatchEvent (Sfs2X.Core.BaseEvent evt) [0x00000] in <00000000000000000000000000000000>:0 \n at Sfs2X.SmartFox.ProcessEvents () [0x00000] in <00000000000000000000000000000000>:0
[ProgramNameSpace].SFSEventManager.RoomJoinFunction () is called when the function attached to the listener SFSEvent.ROOM_JOIN is called (and nothing else is called before it after ROOM_JOIN happens).
Re: Getting Object reference not set to an instance of an object in Sfs2X.SmartFox.EnableLagMonitor
Thanks, definitely very odd.
Is it possible to see what the client side ROOM_JOIN event handler does?
If you prefer you can contact us via our support@... email box.
Thanks
Is it possible to see what the client side ROOM_JOIN event handler does?
If you prefer you can contact us via our support@... email box.
Thanks
Who is online
Users browsing this forum: No registered users and 46 guests