Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null reference exception when running WhisperChat(sample app) on Mono Version 5.16 #59

Open
marzim opened this issue Jul 1, 2019 · 2 comments
Labels

Comments

@marzim
Copy link

marzim commented Jul 1, 2019

Hi @yallie ,

Tried to run the WhisperChat(sample app) on Linux(Opensuse) box with Mono version 5.16.
Server run just fine but Client crash during MainForm_Show
`Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object

Server stack trace: at System.Security.Principal.WindowsIdentity.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization (System.Object sender) [0x00000] in <773ec02b42f74a918ccd74911c8063c9>:0
at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent () [0x00021] in <773ec02b42f74a918ccd74911c8063c9>:0`

BTW I'm using the latest version.

Any inputs are much appreciated.

Thanks.

@marzim marzim changed the title Null reference exception when running WhisperChat(sample app) on Mono Null reference exception when running WhisperChat(sample app) on Mono Version 5.16 Jul 1, 2019
@yallie
Copy link
Member

yallie commented Jul 10, 2019

Hi @marzim

Didn't try running Zyan on Linux for a couple of years, sorry.
Looks like there's an issue with WindowsIdentity deserialization under Mono.
Not sure why it pops up in Zyan example that doesn't use authentication...

@yallie yallie added the bug label Jul 10, 2019
@BanzaiGit
Copy link

Hi @yallie ,

I have same problem with xamarin android on visual studio 2022 community at this line :
var connection = new ZyanConnection("tcpex://DB-PORTABLE2:12345/Sample", protocol);

System.NullReferenceException
Message=Object reference not set to an instance of an object.

here is the stacktrace :

Server stack trace: 
  at System.Security.Principal.WindowsIdentity.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization (System.Object sender) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs:265 
  at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent () [0x00021] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/serialization/objectmanager.cs:1100 
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x0010d] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectreader.cs:206 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00099] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:197 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:173 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.DeserializeMethodResponse (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:155 
  at Zyan.SafeDeserializationHelpers.Channels.SafeBinaryClientFormatterSink.SyncProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg) [0x00083] in <6859c22e88514256b5fb29f77c07e826>:0 

Exception rethrown at [0]: 
  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, System.Runtime.Remoting.Messaging.IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00146] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs:306 

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants