[Mono-list] My program randomly doesn't work with Mono
Jonathan Gagnon
jonathan.gagnon at croesus.com
Wed May 16 14:44:02 EDT 2007
I use Fedora Core 3 and mono 1.2.3.1. I get the same problem when using
mono 1.2.4. I wanted to attach the outfile generated by heap-buddy but it
is too large for the mono-list. I attached the "backtraces" and the "types"
outputs instead. Here's the summary :
SUMMARY
Filename: outfile
Allocated Bytes: 228.3M
Allocated Objects: 5000070
GCs: 12
Resizes: 328
Final heap size: 2725.3M
Distinct Types: 8
Backtraces: 14
Jonathan
_____
De : mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] De la part de Alan McGovern
Envoyé : Wednesday, May 16, 2007 12:05 PM
À : Chris Seaton
Cc : mono-list at lists.ximian.com
Objet : Re: [Mono-list] My program randomly doesn't work with Mono
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
<mailto: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/300f7fe2/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: types.txt
Url: http://lists.ximian.com/pipermail/mono-list/attachments/20070516/300f7fe2/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: backtraces.txt
Url: http://lists.ximian.com/pipermail/mono-list/attachments/20070516/300f7fe2/attachment-0001.txt
More information about the Mono-list
mailing list