Yoshify / DiscJockey

DiscJockey - An all-in-one custom Boombox solution for Lethal Company
1 stars 1 forks source link

Downloaded music does not play #14

Open kuttLoggin opened 10 months ago

kuttLoggin commented 10 months ago

Downloaded music does not play :( Playing music by url link only

[Info   :Yoshify.DiscJockey] [15:38:02.53] DiscJockey 1.2.0: NetworkedBoombox<StartStreamingTrack>: Requested stream for Lil Nas X - HOLIDAY
[Info   :Yoshify.DiscJockey] [15:38:02.53] DiscJockey 1.2.0: NetworkedBoombox<StartStreamingTrack>: Starting stream.
[Info   :Yoshify.DiscJockey] [15:38:02.53] DiscJockey 1.2.0: NetworkedAudioSender<StopStreaming>: Stream stopped
[Info   :Yoshify.DiscJockey] [15:38:02.53] DiscJockey 1.2.0: NetworkedAudioSender<StartStreaming>: Starting Stream for Lil Nas X - HOLIDAY
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Unity.Netcode.FastBufferWriter.WriteValueSafe (System.String s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
Unity.Netcode.BufferSerializerWriter.SerializeValue (System.String& s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
Unity.Netcode.BufferSerializer`1[TReaderWriter].SerializeValue (System.String& s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
DiscJockey.Audio.Data.TrackMetadata.NetworkSerialize[T] (Unity.Netcode.BufferSerializer`1[TReaderWriter] serializer) (at <5105695db27a43dca62599d530b24f3f>:IL_003E)
DiscJockey.Networking.Audio.NetworkedAudioPacket.NetworkSerialize[T] (Unity.Netcode.BufferSerializer`1[TReaderWriter] serializer) (at <5105695db27a43dca62599d530b24f3f>:IL_0018)
Unity.Netcode.FastBufferWriter.WriteNetworkSerializable[T] (T& value) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0019)
DiscJockey.Managers.DJNetworkManager.SendAudioPacketServerRpc (System.UInt64 networkedBoomboxId, DiscJockey.Networking.Audio.NetworkedAudioPacket data) (at <5105695db27a43dca62599d530b24f3f>:IL_007E)
DiscJockey.Networking.NetworkedBoombox.SendFrame (System.Byte[] frame) (at <5105695db27a43dca62599d530b24f3f>:IL_004F)
DiscJockey.Networking.Audio.NetworkedAudioSender.SendFrame (System.Single[] frame) (at <5105695db27a43dca62599d530b24f3f>:IL_0018)
DiscJockey.Networking.Audio.NetworkedAudioSender.SendAudio (System.Threading.CancellationToken ctx) (at <5105695db27a43dca62599d530b24f3f>:IL_00DF)
UnityEngine.Debug:LogException(Exception)
Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception)
DiscJockey.Networking.Audio.<SendAudio>d__20:MoveNext()
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder:Start(<SendAudio>d__20&)
DiscJockey.Networking.Audio.NetworkedAudioSender:SendAudio(CancellationToken)
Cysharp.Threading.Tasks.UniTask:Void(Func`2, CancellationToken)
DiscJockey.Networking.Audio.NetworkedAudioSender:StartStreaming(CachedAudio)
DiscJockey.Networking.NetworkedBoombox:StartStreamingTrack(Track)
DiscJockey.Audio.AudioManager:RequestPlayTrack(Track)
DiscJockey.Audio.Data.TrackListButton:RequestPlayTrack()
UnityEngine.EventSystems.EventSystem:Update()

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Unity.Netcode.FastBufferWriter.WriteValueSafe (System.String s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
Unity.Netcode.BufferSerializerWriter.SerializeValue (System.String& s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
Unity.Netcode.BufferSerializer`1[TReaderWriter].SerializeValue (System.String& s, System.Boolean oneByteChars) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0000)
DiscJockey.Audio.Data.TrackMetadata.NetworkSerialize[T] (Unity.Netcode.BufferSerializer`1[TReaderWriter] serializer) (at <5105695db27a43dca62599d530b24f3f>:IL_003E)
Unity.Netcode.FastBufferWriter.WriteNetworkSerializable[T] (T& value) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0019)
DiscJockey.Managers.DJNetworkManager.SendAudioStreamTransmissionStartedServerRpc (System.UInt64 senderClientId, System.UInt64 networkedBoomboxId, DiscJockey.Audio.Data.TrackMetadata trackMetadata, DiscJockey.Audio.Data.AudioFormat audioFormat) (at <5105695db27a43dca62599d530b24f3f>:IL_008B)
DiscJockey.Networking.NetworkedBoombox.NotifyStreamStarted (System.UInt64 playerClientId, System.UInt64 networkedBoomboxId, DiscJockey.Audio.Data.TrackMetadata trackMetadata, DiscJockey.Audio.Data.AudioFormat audioFormat) (at <5105695db27a43dca62599d530b24f3f>:IL_0001)
DiscJockey.Networking.NetworkedBoombox.StartStreamingTrack (DiscJockey.Data.Track track) (at <5105695db27a43dca62599d530b24f3f>:IL_00E1)
DiscJockey.Audio.AudioManager.RequestPlayTrack (DiscJockey.Data.Track track) (at <5105695db27a43dca62599d530b24f3f>:IL_0006)
DiscJockey.Audio.Data.TrackListButton.RequestPlayTrack () (at <5105695db27a43dca62599d530b24f3f>:IL_0001)
UnityEngine.Events.InvokableCall.Invoke () (at <e27997765c1848b09d8073e5d642717a>:IL_0010)
UnityEngine.Events.UnityEvent.Invoke () (at <e27997765c1848b09d8073e5d642717a>:IL_0022)
UnityEngine.UI.Button.Press () (at <17de86d66286445fa95af59fa8fa644d>:IL_001C)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <17de86d66286445fa95af59fa8fa644d>:IL_0009)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <17de86d66286445fa95af59fa8fa644d>:IL_0007)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <17de86d66286445fa95af59fa8fa644d>:IL_0067)
UnityEngine.EventSystems.EventSystem:Update()
Yoshify commented 10 months ago

Do you have any steps for reproducing the error? It would help for tracing down your exact problem.

kuttLoggin commented 10 months ago

Hm, join in game, create lobby, take boombox, F10, click on the track

Yoshify commented 10 months ago

And this happens with any track, not just downloaded music?

kuttLoggin commented 10 months ago

Only with downloaded music in the Custom Songs folder And the links are working fine for some reason

kuttLoggin commented 10 months ago

I can send you the full log file if you need it

kuttLoggin commented 10 months ago

16 I decided to check, as soon as the downloaded tracks are more than 20, the mod starts giving an error on play

Yoshify commented 10 months ago

@kuttLoggin could you provide logs for this? I've just tried this and can't replicate it.

kuttLoggin commented 10 months ago

@Yoshify https://gist.github.com/kuttLoggin/d75a565684c4f28bd3bfeb2ed582e769

Yoshify commented 10 months ago

@kuttLoggin are you using a legitimate copy of LC?

kuttLoggin commented 10 months ago

@Yoshify Of course, mods run through r2modman

Yoshify commented 10 months ago

@kuttLoggin Hm, It's strange then, your client isn't taking ownership of the tracklist which runs when the client connects to PlayerControllerB, no code from that patch is running whatsoever. I've only seen this with people that have pirated the game.

kuttLoggin commented 10 months ago

@Yoshify Each time I re-enter the game, the music is either on or off Maybe some of the mods are conflicting?

kuttLoggin commented 10 months ago

Oh, the music can come on even if I recreate the lobby a few times

Yoshify commented 10 months ago

Can you please disable everything in your modlist besides BepInEx and DiscJockey, and try running it to see if the issue still occurs? It's highly likely there's a conflict somewhere.

kuttLoggin commented 10 months ago

Tried it, everything works fine

kuttLoggin commented 10 months ago

Well, it looks like some mod is conflicting with your mod. But it seems to be solved by reentering the lobby.

Yoshify commented 10 months ago

@kuttLoggin Could I please get you to follow this flowchart until you find the conflict causing the problems? Whatever the conflict is it appears to be preventing it from working properly and I'd love to identify the cause so I can look into making a compatibility patch, or contact the author.

image

kuttLoggin commented 10 months ago

@Yoshify Okay, I'm on it. I think it's going to take a while, but I'm interested in solving this problem.

Yoshify commented 10 months ago

No rush, take your time :)