Closed ericatkeylogic closed 5 years ago
Hi, could you give me some more details about the problem:
Debug
for all categories and capture a log. Preferably in the demo scene, if that reproduces the problem.Thanks, Martin
Unity version 2018.2.9f1 (though also with 8f1) Not sure where dissonance version is, but the change log starts with v6.2.4 (2018-07-20)
I set everything to debug in Log Levels and get...Note the NULL ref in the middle. Will try loading a ne wproject with demo scene
[Dissonance:Core] (15:15:09.200) DissonanceComms: Loading default playback prefab
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Dissonance.LogMessage:Log() (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:60)
Dissonance.Logs:SendLogMessage(String, LogLevel) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:95)
Dissonance.Log:WriteLog(LogLevel, String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:178)
Dissonance.Log:Info(String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:346)
Dissonance.DissonanceComms:Start() (at C:\vrmeeting\Assets\Plugins\Dissonance\DissonanceComms.cs:336)
(Filename: C:/vrmeeting/Assets/Plugins/Dissonance/Core/Log.cs Line: 60)
NullReferenceException: Object reference not set to an instance of an object
at Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork.Initialize () [0x0000c] in C:\vrmeeting\Assets\Dissonance\Integrations\UNet_HLAPI\HlapiCommsNetwork.cs:92
at Dissonance.Networking.BaseCommsNetwork`5[TServer,TClient,TPeer,TClientParam,TServerParam].Dissonance.Networking.ICommsNetwork.Initialize (System.String playerName, Dissonance.Rooms rooms, Dissonance.PlayerChannels playerChannels, Dissonance.RoomChannels roomChannels, Dissonance.CodecSettings codecSettings) [0x00076] in C:\vrmeeting\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:311
at Dissonance.DissonanceComms.Start () [0x00234] in C:\vrmeeting\Assets\Plugins\Dissonance\DissonanceComms.cs:372
(Filename: C:/vrmeeting/Assets/Dissonance/Integrations/UNet_HLAPI/HlapiCommsNetwork.cs Line: 92)
[Dissonance:Core] (15:15:09.511) VoiceReceiptTrigger: Recalculating token activation: 0 tokens, activated: True
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Dissonance.LogMessage:Log() (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:60)
Dissonance.Logs:SendLogMessage(String, LogLevel) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:95)
Dissonance.Log:WriteLog(LogLevel, String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:178)
Dissonance.Log:WriteLogFormat(LogLevel, String, Int32, Boolean) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:196)
Dissonance.Log:Info(String, Int32, Boolean) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:358)
Dissonance.BaseCommsTrigger:get_TokenActivationState() (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\BaseCommsTrigger.cs:164)
Dissonance.VoiceReceiptTrigger:Update() (at C:\vrmeeting\Assets\Plugins\Dissonance\VoiceReceiptTrigger.cs:98)
(Filename: C:/vrmeeting/Assets/Plugins/Dissonance/Core/Log.cs Line: 60)
DEBUG [Dissonance:Core] (15:15:09.604) Rooms: Joined chat room 'Global'
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Dissonance.LogMessage:Log() (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:60)
Dissonance.Logs:SendLogMessage(String, LogLevel) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:95)
Dissonance.Log:WriteLog(LogLevel, String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:178)
Dissonance.Log:WriteLogFormat(LogLevel, String, String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:187)
Dissonance.Log:Debug(String, String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Log.cs:289)
Dissonance.Rooms:OnJoinedRoom(RoomMembership) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Rooms.cs:125)
Dissonance.Rooms:Join(String) (at C:\vrmeeting\Assets\Plugins\Dissonance\Core\Rooms.cs:82)
Dissonance.VoiceReceiptTrigger:JoinRoom() (at C:\vrmeeting\Assets\Plugins\Dissonance\VoiceReceiptTrigger.cs:109)
Dissonance.VoiceReceiptTrigger:Update() (at C:\vrmeeting\Assets\Plugins\Dissonance\VoiceReceiptTrigger.cs:101)
(Filename: C:/vrmeeting/Assets/Plugins/Dissonance/Core/Log.cs Line: 60)
I note that NetworkManager.singleton is null in HlapiCommsNetwork.cs line 92...
Not sure if its an issue, but I do subclass NetworkManager
with:
public class EANetworkManager : NetworkManager
{
}
Its still attached to a gameobject in the scene and seems to startup fine (I can use networking fine in game, send/receive data etc)
NetworkManager.singleton
being null will definitely be what's causing this, that's how Dissonance accesses the network system. I assume that your subclass needs to do something to initialise the singleton
property properly, although I don't know HLAPI well enough to say exactly what.
OK, for anyone with this issue, my problem was when I overrode NetworkManager, if you have an Awake override, it does not call NetworkManagers Awake, which fails to set the singleton and its null. Fix is to either remove your Awake(){} or call base classes function.
NullReferenceException: Object reference not set to an instance of an object Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork.Initialize () (at Assets/Dissonance/Integrations/UNet_HLAPI/HlapiCommsNetwork.cs:92) Dissonance.Networking.BaseCommsNetwork`5[TServer,TClient,TPeer,TClientParam,TServerParam].Dissonance.Networking.ICommsNetwork.Initialize (System.String playerName, Dissonance.Rooms rooms, Dissonance.PlayerChannels playerChannels, Dissonance.RoomChannels roomChannels, Dissonance.CodecSettings codecSettings) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:311) Dissonance.DissonanceComms.Start () (at Assets/Plugins/Dissonance/DissonanceComms.cs:372)