SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Exception when debugger starts

Last post 10-25-2007 8:03 PM by Simon Thum. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-25-2007 8:03 PM

    Exception when debugger starts

    (Edit: I found the Bug on my side: I was setting Thread.Name twice. This makes it a debugger flaw.)

     

    Hi,

     

    I'm getting this exception every time I start to debug a specific project. Since I extensively modified my build scripts, I guess that is to blame to some extent (though it worked for quite some time).

    However, starting a release is no problem. Additionally, I have CLRDebug as a Tool in SD (so it is invoked on the exe), and it works flawlessly with a debug build. Just to clarify the build itself is not broken.

    Since my build system is distributed over several files, the cause might well have to do with properies not being in the files they usually are, but nontheless being present after msbuild evalution (which I guess SD performs).

     

    SharpDevelop Version : 2.2.1.2648
    .NET Version         : 2.0.50727.832
    OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture      : German (Germany) (de-DE)
    Working Set Memory   : 71896kb
    GC Heap Memory       : 17741kb

    Exception thrown:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Debugger.Value..ctor(Process process, IExpirable[ expireDependencies, IMutable[ mutateDependencies, CorValueGetter corValueGetter)
       at Debugger.ObjectValueClass.<GetPropertyVariables>d__16.MoveNext()
       at Debugger.ObjectValueClass.<GetSubVariables>d__7.MoveNext()
       at Debugger.ValueProxy.get_Item(String variableName)
       at Debugger.Thread.get_Name()
       at ICSharpCode.SharpDevelop.Gui.Pads.RunningThreadsPad.RefreshThread(Thread thread)
       at ICSharpCode.SharpDevelop.Gui.Pads.RunningThreadsPad.<>c__DisplayClass2.<AddThread>b__0(Object , ThreadEventArgs )
       at Debugger.Thread.OnStateChanged()
       at Debugger.Thread.set_HasBeenLoaded(Boolean value)
       at Debugger.ManagedCallback.NameChange(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread)
       at Debugger.ManagedCallbackSwitch.NameChange(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread)
       at Debugger.ManagedCallbackProxy.<>c__DisplayClass1f.<NameChange>b__1e()
       at Debugger.MTA2STA.<>c__DisplayClass3.<EnqueueCall>b__0()
       at Debugger.MTA2STA.PerformAllCalls()
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

     

     

    When I choose to ignore it, SD thinks it has (or has) the debugger running. Trying to stop it results in 

     

    SharpDevelop Version : 2.2.1.2648
    .NET Version         : 2.0.50727.832
    OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture      : German (Germany) (de-DE)
    Working Set Memory   : 75532kb
    GC Heap Memory       : 17871kb

    Exception thrown:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Debugger.Value.MakeExpired()
       at Debugger.Value.<AddExpireDependency>b__0(Object , EventArgs )
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Debugger.Value.OnExpired(EventArgs e)
       at Debugger.Value.MakeExpired()
       at Debugger.Value.<AddExpireDependency>b__0(Object , EventArgs )
       at Debugger.PauseSession.NotifyHasExpired()
       at Debugger.Process.Continue()
       at Debugger.Process.Terminate()
       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.Stop()
       at ICSharpCode.SharpDevelop.Project.Commands.StopDebuggingCommand.Run()
       at ICSharpCode.Core.ToolBarCommand.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

     

    A second try to stop debugging will do it. 

     

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.