[Mono-bugs] [Bug 431929] New: Running a debugger in Monodevelop consumes large amount of memory

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 3 07:30:03 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=431929


           Summary: Running a debugger in Monodevelop consumes large amount
                    of memory
           Product: MonoDevelop
           Version: SVN
          Platform: x86
        OS/Version: Kubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: debugger
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Lukasz.Piatkowski at secpl.cs.put.poznan.pl
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I'm testing debugger integration in Monodevelop on a following example:

using System;

namespace DebugTest
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string s = "aaa";
            string b = s + "ccc";
            Console.WriteLine("Hello World! {0} {1}", b, s);
        }
    }
}

I have trap enabled on line "string b = s + "ccc";". The program runs normally
when not in debugger mode, but when using debugger start up takes about 30sec.
In this time memory allocated for process mono (the one running debugger, I
suppose) rises to something like 1.5GB (my system has 2GB total). After that
breakpoint fires and i can see values of local variables. For variable "b" it
says "out of memory". Then I can run the program and it ends normally. After it
ends, the 1.5GB is free again.

Meanwhile, I'm getting this log on a console where MD is run:

## DebuggerServer started
>> OnInitialized
<< OnInitialized
Cannot insert breakpoint 3: Location is invalid.
Server OnTargetEvent: TargetHitBreakpoint stopped:True data:4 internal:False
queue:0 thread:Thread @1
GetBacktrace managed time: 15,708 ms n:1
OnTargetEvent, type - TargetHitBreakpoint
System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_string_alloc
(intptr)
  at (wrapper alloc) object:Alloc (intptr,int)
  at System.Text.StringBuilder.InternalEnsureCapacity (Int32 size) [0x000b1] in
/home/piontec/mono/mcs/class/corlib/System.Text/StringBuilder.cs:713
  at System.Text.StringBuilder.Append (Char value) [0x00025] in
/home/piontec/mono/mcs/class/corlib/System.Text/StringBuilder.cs:434
  at DebuggerServer.Util.EscapeString (System.String text) [0x000a3] in
/home/piontec/mono/monodevelop/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Util.cs:301
  at DebuggerServer.ExpressionEvaluator.ToExpression (System.Object obj)
[0x00065] in
/home/piontec/mono/monodevelop/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ExpressionEvaluator.cs:136
  at DebuggerServer.ExpressionEvaluator.TargetObjectToExpression
(Mono.Debugger.Thread thread, Mono.Debugger.Languages.TargetObject obj)
[0x00000] in
/home/piontec/mono/monodevelop/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ExpressionEvaluator.cs:50
  at DebuggerServer.Util.CreateObjectValueImpl (Mono.Debugger.Thread thread,
IObjectValueSource source, ObjectPath path,
Mono.Debugger.Languages.TargetObject obj, ObjectValueFlags flags) [0x001d5] in
/home/piontec/mono/monodevelop/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Util.cs:103
  at DebuggerServer.Util.CreateObjectValue (Mono.Debugger.Thread thread,
IObjectValueSource source, ObjectPath path,
Mono.Debugger.Languages.TargetObject obj, ObjectValueFlags flags) [0x00000] in
/home/piontec/mono/monodevelop/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Util.cs:45
Can't parse expression
Can't parse expression
Can't parse expression
Server OnTargetEvent: TargetStopped stopped:True data:0 internal:False queue:0
thread:Thread @1
GetBacktrace managed time: 3,161 ms n:1
OnTargetEvent, type - TargetStopped
Server OnTargetEvent: TargetExited stopped:False data:0 internal:False queue:0
thread:
Server OnTargetEvent: TargetExited stopped:False data:0 internal:False queue:0
thread:
Server OnTargetEvent: TargetExited stopped:False data:0 internal:False queue:0
thread:
OnTargetEvent, type - TargetExited
Can't parse expression
Can't parse expression


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list