Exception has been thrown by the target of an invocation.

Options
I am working on a multiplayer racing game for WP8 and I get this exception:

Exception: Exception has been thrown by the target of an invocation.
Type: System.Reflection.TargetInvocationException
Module: mscorlib
InnerException: Object reference not set to an instance of an object.
AdditionalInfo:<No Data>
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NetworkingPeer.ExecuteRPC(Hashtable rpcData, PhotonPlayer sender)
at NetworkingPeer.OnEvent(EventData photonEvent)
at ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback(Byte[] inBuff)
at ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands()
at ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands()
at PhotonHandler.Update()
at PhotonHandler.$Invoke19(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)



2-3 players join room and the master client starts the game here menu scene is changed to the race scene and now (with uttermost rarity) this exception happens. It crashes my game.

I have no clue where to look for a solution.... please help

Comments

  • Bump ... [Please....]
  • Whats the filename that's throwing the error? And the line(s) of code that surround it.

    Post that info, and we might help.