[Mono-list] Help for porting: VC# 2008 express binaries crashing when run by mono

Andreas Färber andreas.faerber at web.de
Fri Jun 6 11:46:19 EDT 2008


Am 06.06.2008 um 17:17 schrieb herenvardo:

> Andreas Färber wrote:
>>
>> You can always resort to Console.WriteLine. :-)
>>
> Of course... If you know it, could you please me how can I  
> make .NET's own
> code to call WriteLine when I want to and with the arguments I'd  
> want? If
> you take a look at the traceback I attached on my previous post,  
> you'd find
> that it's not directly my code, but a function from the Framework,  
> which
> throws the exception. The key of the issue seems to be the XmlDocument
> passed to that function, and it's not passed from my code, but from  
> other
> functions within the framework. Of the 34 calls on that trace, only  
> the 7 at
> the bottom are actually part of my own code; the problem is  
> manifesting on
> the top call, and its source is somewhere between those 27 calls I  
> have no
> control over.
>
> Actually, I think I've just come up with some answer to my own  
> question "how
> can I make .NET's own code to call WriteLine when I want to and with  
> the
> arguments I'd want?"... which involves a lot of reflection and even  
> more
> headaches. I'll try to use reflection to "dig" into these calls and  
> retrieve
> that fatal XmlDocument argument; I will update this thread if I'm  
> able to
> get it.

You said Mono is giving you the error, not .NET.

So you'd need to insert the Console.WriteLine(xmldoc.OuterXml) or  
similar in *Mono's* source code, which is Open Source (mcs/class/ 
Managed.Windows.Forms/namespace/class.cs). Afterwards, `make  
PROFILE=net_2_0` and `make install PROFILE=net_2_0` should compile and  
install it to Mono's GAC.

You might also find this helpful:
http://www.mono-project.com/Debugging_Tips_for_Windows

Andreas



More information about the Mono-list mailing list