[Mono-list] My program randomly doesn't work with Mono

Alan McGovern alan.mcgovern at gmail.com
Wed May 16 12:05:03 EDT 2007


Can i get both of you experiencing problems to either run your applications
with heap-prof or heap-buddy to generate some profiling statistics to help
figure out whats going wrong on your particular setup?

Also, what OS's and mono versions are you on that are causing these
problems? Is the behaviour the same with mono 1.2.4? Please test that before
filing any bug reports.

Alan.

On 5/16/07, Chris Seaton <chris at chrisseaton.com> wrote:
>
> The problem is intermittent. I can work on my program all day and
> then suddenly it just starts failing. Stick a Console.WriteLine in
> and it works again. Then it stops again and I take it out and it
> works again!
>
> Chris
>
> On 16 May 2007, at 16:54, Ted Milker wrote:
>
> > Just an FYI but none of these crash on FreeBSD 6.2 running mono
> > 1.2.3.1
> >
> > Jonathan Gagnon wrote:
> >> Hi,
> >>
> >> I too have different behaviors if I put a Console.WriteLine in my
> >> code.
> >> Consider the following example :
> >>
> >> static void Main(string[] args)
> >> {
> >>     int num = 5000000;
> >>     Hashtable table = new Hashtable();
> >>     for (int i = 0; i < num; ++i)
> >>     {
> >>         Object obj = new Object();
> >>         table.Add(obj, obj);
> >>     }
> >> }
> >>
> >> That crashes somewhere inside the for loop.  But if I add a
> >> WriteLine at the
> >> beginning like this :
> >>
> >> static void Main(string[] args)
> >> {
> >>     int num = 5000000;
> >>     Console.WriteLine("WriteLine");
> >>     Hashtable table = new Hashtable();
> >>     for (int i = 0; i < num; ++i)
> >>     {
> >>         Object obj = new Object();
> >>         table.Add(obj, obj);
> >>     }
> >> }
> >>
> >> Everything works fine.  Then if I add another WriteLine at the end
> >> followed
> >> by a Thread.Sleep, it crashes again, but this time inside the
> >> Thread.Sleep :
> >>
> >> static void Main(string[] args)
> >> {
> >>     int num = 5000000;
> >>     Console.WriteLine("WriteLine");
> >>     Hashtable table = new Hashtable();
> >>     for (int i = 0; i < num; ++i)
> >>     {
> >>         Object obj = new Object();
> >>         table.Add(obj, obj);
> >>     }
> >>     Console.WriteLine("WriteLine");
> >>     Thread.Sleep(10000);
> >> }
> >>
> >> Any modifications to that code may lead to different behaviors.
> >> Sometimes I
> >> seem to end up being stuck in a infinite loop (with 2.8 gig of
> >> allocated
> >> virtual memory).  It seems like the size of the executable has an
> >> impact on
> >> the result...
> >>
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070516/be958a7d/attachment.html 


More information about the Mono-list mailing list