[Mono-bugs] [Bug 59668][Maj] New - Mono runtime fails to find object constructor (argument number disagreement)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 6 Jun 2004 14:58:47 -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 paul@seabeck-enterprises.com.

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

--- shadow/59668	2004-06-06 14:58:47.000000000 -0400
+++ shadow/59668.tmp.30250	2004-06-06 14:58:47.000000000 -0400
@@ -0,0 +1,78 @@
+Bug#: 59668
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: XP Home SP1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: paul@seabeck-enterprises.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono runtime fails to find object constructor (argument number disagreement)
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+I have created a C# that includes a multithreaded client and 
+multithreaded server.  I'm using Mono Beta2 for windows, nothing else is 
+required.  I also have created two test apps called "TestClient.exe" 
+and "TestServer.exe" which simply instantiates a number of clients and A 
+server respectively.  All are being built in debug mode from 
+VisualStudio.NET.  I simply copy the dll (Class Library) and the two test 
+apps to the same directory (..mono/bin) and invoke mono on them.  All was 
+fine until my latest build (which did NOT change the signature of the 
+Constructors) when Mono decided to spit the following out at me:
+
+Compat mode: the request from C:\Program Files\Mono-Beta2
+\lib\ManagedClasses.dll to load System was remapped (http://www.go-
+mono.com/remap.html)
+
+** (TestServer.exe:27424): WARNING **: Missing method .ctor in assembly 
+C:\Program Files\Mono-Beta2\bin\TestServer.exe typeref index 16
+
+Unhandled Exception: System.MissingMethodException: Cannot find the 
+requested method.
+
+Everything still runs fine under the Microsoft Framework.  Apparently, 
+Mono doesn't agree with the number of parameters in the constructor:
+
+(Class Library)
+public Server(string name, int scope, bool useThreads)
+...
+(TestServer.exe)
+Server s = new Server("TestServer", 1, true);
+
+
+Even if I try to compile it with mcs.exe instead of VisualStudio.Net I 
+get this:
+
+C:\Program Files\Mono-Beta2\bin>mcs TestServer.cs -r ManagedClasses.dll 
+TestServer.cs(17) error CS1501: No overload for 
+method 'ManagedClasses.Server' takes `3' arguments 
+TestServer.cs(17) error CS1501: New invocation: Can not find a 
+constructor in `ManagedClasses.Server' for this argument list
+Compilation failed: 2 error(s), 0 warnings
+
+
+
+Steps to reproduce the problem:
+1. Described above
+2. 
+3. 
+
+Actual Results:
+Code fails both compilation and runtime.
+
+Expected Results:
+Code compiles and executes normally.
+
+How often does this happen? 
+Every time now.
+
+Additional Information: