Bug #589

avatar

remoting error since updating smuxi-server to Mono 2.10.1

Added by Carlo Kok 4725 days ago. Updated 2686 days ago.

Status:Closed Start:04/20/2011
Priority:Urgent Due date:
Assigned to:avatarMirco Bauer % Done:

0%

Category:Server
Target version:1.0+stable
Complexity:

High

Found in Version:

Votes: 1 (View)

Description

Exception Type:
System.InvalidCastException

Exception Message:
Object must implement IConvertible.

Exception StackTrace:

Server stack trace: 

   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)

   at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)

   at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)

   at System.Collections.Generic.Dictionary`2.OnDeserialization(Object sender)

   at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent()

   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)

   at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)

   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.DeserializeMessage(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)

   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Smuxi.Engine.GroupChatModel.get_Persons()

   at Smuxi.Frontend.Gnome.GroupChatView.Sync()

   at Smuxi.Frontend.Gnome.GnomeUI.<SyncChat>c__AnonStoreyA.<>m__13(Object , EventArgs )

Related issues

related to Smuxi - Feature #814 HTTP/REST/JSON Web API New 02/26/2013
duplicated by Smuxi - Bug #898 Exception: Ein Objekt muss IConvertible implementieren. Closed 10/28/2013
duplicated by Smuxi - Bug #652 InvalidCastException when connecting to server Closed 11/23/2011
duplicated by Smuxi - Bug #996 Happens every time Twitter tries to sync with the client Closed 11/12/2014
duplicated by Smuxi - Bug #998 Exception: Object must implement IConvertible. Closed 11/19/2014

Associated revisions

Revision 1e172f72a127afeea33f2cffa9455b7d147cb7f6
Added by Mirco Bauer 2803 days ago

Frontend-GNOME: detect and report Mono <-> .NET incompatibility for remote engines (refs: #589)

Smuxi users running a smuxi-server on Mono and connecting from Windows using the
Microsoft .NET framework will lead to an user-unfriendly crash dialog like this:

Exception Type:
System.InvalidCastException
Exception Message:
Object must implement IConvertible.
Exception StackTrace:
Server stack trace:
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
at System.Collections.Generic.Dictionary`2.OnDeserialization(Object sender)
at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Smuxi.Engine.GroupChatModel.get_Persons()
at Smuxi.Frontend.Gnome.GroupChatView.Sync()
at Smuxi.Frontend.Gnome.TwitterGroupChatView.Sync()

The user has no hint how to proceed here. Since this is a known incompatibility
since Mono 2.10 [0], we detect this condition and hint the user how to fix it.

History

Updated by Mirco Bauer 4723 days ago

avatar

Are you using smuxi-server? If so, which side have you upgraded to 2.10.1?

Updated by Mirco Bauer 4723 days ago

avatar

For the record: smuxi-server on mono 2.6.7 and smuxi-frontend-gnome on mono 2.10.1 works for me

Updated by Carlo Kok 4723 days ago

avatar

server is: Mono JIT compiler version 2.10.1 (tarball Mon Apr 11 15:46:24 UTC 2011)

mono --version

gui runs on windows (not mono). It worked before I updated the server to 2.10

Updated by Mirco Bauer 4716 days ago

avatar

Carlo Kok wrote:

server is:

[ck@buurtnet ~]$ mono --version Mono JIT compiler version 2.10.1 (tarball Mon Apr 11 15:46:24 UTC 2011)

gui runs on windows (not mono). It worked before I updated the server to 2.10

Have you installed Smuxi from source tarball or a binary package? Please check if it links .NET 2.0 by running:
monodis --assemblyref smuxi-server.exe

Updated by Carlo Kok 4715 days ago

avatar

1: Version=2.0.0.0
Name=mscorlib
Flags=0x00000000
Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89
2: Version=1.2.10.0
Name=log4net
Flags=0x00000000
Public Key:
0x00000000: A5 71 5C C6 D5 C3 54 0B
3: Version=0.8.0.0
Name=smuxi-common
Flags=0x00000000
Zero sized public key
4: Version=0.8.0.0
Name=smuxi-engine
Flags=0x00000000
Zero sized public key
5: Version=2.0.0.0
Name=System.Runtime.Remoting
Flags=0x00000000
Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89
6: Version=2.0.0.0
Name=System
Flags=0x00000000
Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89

Installed from a binary package, I think the "Other "package.

Updated by Mirco Bauer 4715 days ago

avatar

So Mono 2.10.1 is no longer ABI (Remoting) compatible with .NET 3.5, that is very sad. I hope this will be fixed in Mono. Can you give Mono 2.10.2 a try?

Updated by Mirco Bauer 4511 days ago

avatar
  • Priority changed from Normal to Urgent

Updated by Mirco Bauer 4507 days ago

avatar

There is no known workaround yet. Mono 2.10.x broke ABI compatibility with MS .NET when it comes to the System.Collections.Generic.Dictionary<K, V> type which Smuxi makes use of. We will need a fix in Mono for this issue.

Updated by Mike Gibson 4460 days ago

avatar

Has this bug been reported upstream? If so, do you have a link to the case? I'm having the same issue in my code and would like to look into fixing it.

Updated by Mirco Bauer 4324 days ago

avatar
  • Status changed from New to Closed

I never experienced this issue with Mono 2.10.8 so I think I can assume the issue is no longer present

Updated by Mirco Bauer 3803 days ago

avatar
  • Category set to Server
  • Status changed from Closed to New

Updated by Mirco Bauer 3803 days ago

avatar

This issue only becomes visible when the smuxi-server runs on Mono 2.10 and the frontend on Microsoft .NET

Updated by Mirco Bauer 3305 days ago

avatar

The only known workaround is to use Mono on Windows

Updated by Mirco Bauer 3210 days ago

avatar
  • Complexity set to High

Updated by Mirco Bauer 3210 days ago

avatar

Most people start to only see this issue when they add a Twitter account for some reason. Here is such sample:

Exception Type:
System.InvalidCastException

Exception Message:
Obiekt musi implementowa? element IConvertible.

Exception StackTrace:

Server stack trace: 
   w System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   w System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
   w System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
   w System.Collections.Generic.Dictionary`2.OnDeserialization(Object sender)
   w System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent()
   w System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   w System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   w System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
   w System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   w System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   w System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   w Smuxi.Engine.GroupChatModel.get_Persons()
   w Smuxi.Frontend.Gnome.GroupChatView.Sync()
   w Smuxi.Frontend.Gnome.TwitterGroupChatView.Sync()
   w Smuxi.Frontend.ChatViewSyncManager.Sync(IChatView chatView)
   w Smuxi.Frontend.ChatViewSyncManager.SyncWorker(ChatModel chatModel)

Updated by Mirco Bauer 2816 days ago

avatar
  • Subject changed from remoting error since updating mono to 2.10.1 to remoting error since updating smuxi-server to Mono 2.10.1
  • Status changed from New to Assigned
  • Assigned to set to Mirco Bauer

Updated by Mirco Bauer 2816 days ago

avatar

The real fix of this issue will come with switching to a new RPC system like REST. HTTP/JSON/REST does not rely on binary serialization like .NET remoting currently does.

Updated by Mirco Bauer 2686 days ago

avatar
  • Status changed from Assigned to Resolved
  • Target version set to 1.0+stable

Updated by Mirco Bauer 2686 days ago

avatar
  • Status changed from Resolved to Closed

Smuxi is now detecting this issue and shows a dialog with a link to resolve the issue instead of crashing.

Also available in: Atom PDF