[Mono-bugs] [Bug 58345][Nor] New - return empty array from remote method throws 'invalid response'

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 11 May 2004 15:47:52 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by olds@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58345

--- shadow/58345	2004-05-11 15:47:52.000000000 -0400
+++ shadow/58345.tmp.25102	2004-05-11 15:47:52.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 58345
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: suse 9.0, mono beta 1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: olds@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: return empty array from remote method throws 'invalid response'
+
+Description of Problem:
+
+I am seeing a problem in remoting in the following scenario:
+
+[Serializable]
+public struct Chunk
+{
+    int blah;
+    string blech;
+}
+
+public class ServiceObject: MarshalByRefObject
+{
+    ...
+
+    public Chunk[] BlowChunks()
+    {
+        ArrayList chunks = new ArrayList();
+        ...
+        // look for chunks here
+        ...
+        return (Chunk[])chunks.ToArray(typeof(Chunk));
+    }
+    ...
+}
+
+If method BlowChunks is called to a remote instance and it returns a
+non-null array of Length == 0, the client throws an invalid server
+response exception.
+
+Steps to reproduce the problem:
+1. Run server object as described above, using TCP and binary formatters.
+2. Access remote server object via usual remoting mechanisms.
+3. a return of Chunk[0] throws exception.
+
+Actual Results:
+bad response exception
+
+Expected Results:
+empty array
+
+How often does this happen? 
+every time.