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 : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Alan McGovern
Envoyé : Wednesday, May 16, 2007 12:05 PM
À : Chris Seaton
Cc : [email protected]
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 <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 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 - [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list
Type # Total AvSz AvAge BT#
System.Collections.Hashtable/Slot[] 17 190.1M 11727728.2 1.1 2
object 5000000 38.1M 8.0 2.1 1
System.MonoType 47 1.5k 31.8 11.7 5
int[] 1 152b 152.0 12.0 1
char[] 1 58b 58.0 12.0 1
System.Collections.Hashtable 1 48b 48.0 11.0 1
string 2 26b 13.0 12.0 1
System.Collections.Hashtable/KeyMarker 1 8b 8.0 12.0 1
Backtrace # Total AvSz AvAge
type=System.Collections.Hashtable/Slot[] 16 190.1M 12460702.0 1.1
System.Collections.Hashtable:Rehash
System.Collections.Hashtable:PutImpl
System.Collections.Hashtable:Add
TestApp.Program:Main
type=object 5000000 38.1M 8.0 2.1
TestApp.Program:Main
type=System.MonoType 40 1.4k 35.3 11.7
type=int[] 1 152b 152.0 12.0
System.Collections.Hashtable:.cctor
TestApp.Program:Main
TestApp.Program:Main
type=System.Collections.Hashtable/Slot[] 1 148b 148.0 0.0
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
TestApp.Program:Main
type=char[] 1 58b 58.0 12.0
System.String:.cctor
System.Collections.Hashtable:.cctor
System.Collections.Hashtable:.cctor
TestApp.Program:Main
TestApp.Program:Main
type=System.Collections.Hashtable 1 48b 48.0 11.0
TestApp.Program:Main
type=System.MonoType 4 48b 12.0 12.0
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
TestApp.Program:Main
type=string 2 26b 13.0 12.0
System.Collections.Hashtable:.cctor
System.Collections.Hashtable:.cctor
TestApp.Program:Main
TestApp.Program:Main
type=System.MonoType 1 12b 12.0 12.0
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
System.Collections.Hashtable:.ctor
TestApp.Program:Main
type=System.MonoType 1 12b 12.0 12.0
System.Collections.Hashtable:Add
System.Collections.Hashtable:Add
TestApp.Program:Main
type=System.MonoType 1 12b 12.0 12.0
TestApp.Program:Main
TestApp.Program:Main
type=System.Collections.Hashtable/KeyMarker 1 8b 8.0 12.0
KeyMarker:.cctor
System.Collections.Hashtable:Add
System.Collections.Hashtable:Add
TestApp.Program:Main
type=System.Collections.Hashtable 0 0b 0.0 0.0
System.Runtime.Remoting.Contexts.Context:.cctor
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list