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

herenvardo herenvardo at gmail.com
Fri Jun 6 11:17:30 EDT 2008

Andy Hume wrote:
> I think I've found the problem -- it depends on a MSFT bug that creates
> bad content.   To check that it's the same fault, I'd need to see the
> input XML.  Rather than dealing with debuggers (eek) can you just search
> all the files in the project for XML starting with element
> TableLayoutSettings.
Search found 0 matches :(. I tried for both "<TableLayout" and
":TableLayout" (just for case the xml uses some namespaces), ignoring case,
looking through all the files within my solution's folder (including
subfolders, hidden & system stuff, and so on). Removing the "<" or the ":"
at the beginning (just looking for raw text, regardless of it's actually
XML) yields some results (both .resx XML files and .cs code files); but
searching for "TableLayoutSettings" doesn't find anything.
My best guess is that the exact XML input passed to the crashing function is
generated "on-the-fly" from the properties and all other details about the
panel, during execution. (Otherwise, the "TableLayoutSettings" string should
appear, at least, somewhere within the .dll and/or .exe files).

Andy Hume wrote:
> I don't really understand where MSFT uses this content, if not in the
> .Designer file, then probably in a .resx file.  Did the project start out
> in VS2008, or maybe in VS2003?  I can't get VS2005 to create such content.
The whole solution initially started as a VC# 2005 Express solution; and was
upgraded to 2008 as soon as I got the final version of the new IDE. A few
weeks ago, I switched it from targeting the .NET 2.0 to .NET 3.5, with the
aim of defining some extension methods. For what it matters, most of the
code (including the parts causing the problem, which are quite recent), has
been developed under VC# 2008 Express.

If you want to check them, I'm attaching the two .cs files (my code and the
.Designer.cs), and the resx files for the UserControl that is raising the
issue:  http://www.nabble.com/file/p17694700/spell.zip spell.zip . (The
actual application is a mere wrapping just to test that control).

Andrus Moor-2 wrote:
> Even free C# Express 2008 allows to step into MS System.Windows.Forms.dll
> source code.
> Maybe we can use instructions from
> http://www.codeproject.com/KB/dotnet/netmassdownloader.aspx
> to debug MONO SWF source also. 
Rather that saying that the Express edition "allows" stepping into that
code, it'd be more accurate that this article provides a workaround to
enable that.
Anyway, I've tried the downloader and got lots of 404 errors while trying to
fetch the sources. I haven't been able to step into the calls that pass the
relevant xml data, but will keep trying to get it working.

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.
View this message in context: http://www.nabble.com/Help-for-porting%3A-VC--2008-express-binaries-crashing-when-run-by-mono-tp17607386p17694700.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list