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

Sebastien Pouliot sebastien.pouliot at gmail.com
Thu Jun 5 07:40:01 EDT 2008


On Mon, 2008-06-02 at 11:31 -0700, herenvardo wrote:
> I'll try to be short and concise: a few months ago I started developing a
> project in Microsoft Visual C# 2008 Express Edition, with the idea of making
> it Mono-compatible. In order to achieve that goal, I have been checking Mono
> project's progress on this site frequently, and kept running MoMA checks on
> all my assemblies at least once a week. Now that some pieces of the project
> start holding together, I've started some testing:
> On .NET (3.5 upon Win XP Home SP3), the application runs fine, besides some
> minor glitches (like "added the wrong icon to that menu" or "forgot to
> localize the 'Filter' property for this SaveDialog", but no serious errors
> until now.
> Running MoMA on these assemblies only mentions a few ToDo's about the
> TextBoxBase.Undo() method and the auto-complete stuff on combo-boxes: these
> are useful features, but no critical after all (and chances are high that
> Mono 2.0 would be out there before I make a first "stable" release).
> Trying to run the applicantion on Mono (1.9.1, upon the same Win system)
> with a command like:
> mono myProgram.exe
> apparently does nothing. 

Could you be more specific ? e.g. does it just "freeze" there without
showing anything or do you get the command prompt back ? is an empty
window visible ? or a new process ?

> When I found about the -v switch, I got what I'd
> guess is an exception's traceback, mentioning calls to
> OutOfMemoryException's, NullReferenceException's and
> StackOverflowException's constructors: this cannot be good at all.

Actually you're wrong because it's good ;-). The exception are created,
not thrown, at the start of the application because, when the right
situation occurs (like an being out of memory) it's a bad time to create
(allocate) an exception but the perfect time to throw the existing one.

> I have tried a few helloworld-like programs, to make sure that mono was
> working properly, and they ran fine.

And they all should show the same exception creation when starting.

> I have absolutelly no previous experience with Mono, and very limited
> experience with non-Windows systems (except some DOS tinkering long ago), so
> I'm completelly lost. I have no idea about how to debug the assembly in mono
> (ie: try to see what's causing these exceptions), nor even how to compile my
> project using mono's compiler instead of Microsoft's (maybe the visual
> compiler is doing something weird). Worst of all (the previous would be
> actually good otherwise, since it's a chance to learn and a challenge), I've
> been unable to find any sources about these "basic" topics on the web, such
> as tutorials, faqs, troubleshooting examples... absolutely nothing after 3
> hours of googling.
> So, could someone please point me to any resource to, at least, get started
> in the topic?

Start by providing some basic info, like are you using Mono on Windows,
Linux, other OS ? which distro/version (OS) and package/version for
Mono ...

> Thanks in advance, both on my part and on that of any "non-Windowed"
> potential user for my project.

Sebastien



More information about the Mono-list mailing list