Skip to content

Null Refrence Exception in Encoding Thread #68

@Platratio34

Description

@Platratio34

Overview

I basically copied the code from the GUI example (witch was working with the same versions of everything), and when I run it I get a null reference exception when I try to connect to a mumble server. It is connecting to the mumble server, witch is the uMurmur server integrated in CitizenFX Framework (FiveM/RedM), and I have confirmed that it did actuality join with a standard client also in the server. There is also about a 5 second delay from when I run the connect function, and when I get the error, and it receives 7 messages during that time.

Stack Trace

Unhandled exception. System.Exception: BasicMumbleProtocol's _encodingThread was terminated unexpectedly because of a System.NullReferenceException
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MumbleSharp.Audio.Codecs.Opus.OpusDecoder..ctor(Int32 outputSampleRate, Int32 outputChannelCount)
   at MumbleSharp.Audio.Codecs.Opus.OpusCodec..ctor(Int32 sampleRate, Byte sampleBits, Byte channels, UInt16 frameSize)
   at MumbleSharp.Audio.CodecSet.<>c__DisplayClass4_0.<.ctor>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at MumbleSharp.Audio.CodecSet.GetCodec(SpeechCodecs codec)
   at MumbleSharp.Audio.AudioEncodingBuffer.Encode(SpeechCodecs codec)
   at MumbleSharp.BasicMumbleProtocol.EncodingThreadEntry(Exception& exception)
   --- End of inner exception stack trace ---
   at MumbleSharp.BasicMumbleProtocol.<Initialise>b__40_1()
   at System.Threading.Thread.StartCallback()

Versions

  • net6.0-windows
  • MumbelSharp 2.0.0
  • NAudio 2.1.0
  • protobuf-net 3.1.26

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions