[Mono-bugs] [Bug 421664] New: If I create a new interface SomeNamespace.ISerializable, then System.Serializable serialization fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 29 16:30:09 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=421664


           Summary: If I create a new interface SomeNamespace.ISerializable,
                    then System.Serializable serialization fails
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: remoting
        AssignedTo: lluis at novell.com
        ReportedBy: brett at fogcreek.com
         QAContact: mono-bugs at lists.ximian.com
                CC: tedu at fogcreek.com
          Found By: ---


Created an attachment (id=236392)
 --> (https://bugzilla.novell.com/attachment.cgi?id=236392)
The .cs file used to repro the bug. See repro steps above.

Description of Problem:
If I create a new interface SomeNamespace.ISerializable, then
System.Serializable serialization of a class that is both System.ISerializable
and SomeNamespace.ISerializable fails with
'System.Runtime.Serialization.SerializationException: No surrogate selector was
found for type (the type I was trying to serialize).

Steps to reproduce the problem:
1. gmcs AppDomain.cs
2. mono AppDomain.exe


Actual Results:
OKAY, BLAH BLAH SERIALIZED

Unhandled Exception: System.Runtime.Serialization.SerializationException: No
surrogate selector was found for type AppDomainTest.MySerializable

Server stack trace:
  at System.Runtime.Serialization.ObjectRecord.LoadData
(System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector
selector, StreamingContext context) [0x00000]
  at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000]
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000]
  at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result,
System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
  at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000]
  at System.Runtime.Remoting.RemotingServices.DeserializeCallData
(System.Byte[] array) [0x00000]
  at (wrapper xdomain-dispatch) PrintTest.PrintTest:testSerializable
(object,byte[]&,byte[]&)

Exception rethrown at [0]:

  at (wrapper xdomain-invoke) PrintTest.PrintTest:testSerializable
(AppDomainTest.MySerializable)
  at AppDomainTest.Program.Main (System.String[] args) [0x00000]

Expected Results:
$ ./AppDomain.exe
PrintTest.testBLAHBLAHSerializable says:
OKAY, BLAH BLAH SERIALIZED
PrintTest.testSerializable says:
OKAY, SERIALIZED


How often does this happen? 
Always


Additional Information:
The "Expected Results" are what I get when I run this test against Microsoft
Net 2 runtime (after compiling with gmcs or csc).

This may not be a big deal, because you can just change the name of your
interface to ISOMETHINGSerializable, but it seems like this is probably just a
matter of checking the fully qualified typename at some point during
marshaling.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list