Daily Usage Issues

NCrunch 2.13.0.1 froze vstudio while paingint window

Started by GreenMoose on 8,205 views

v2.13.0.1 / vstudio 2013

I have my NCrunch distributed processing window (and ncrunhc tests= on my 2nd monitor (of 3), today when wanting to run a test vstudio chose to freeze while eating cpu like a madman. Attaching a new devenv a few times on the process revealed call stacks below on main thread (bug report submitted). It became responsive again after some minutes.
(devenv.exe process is at 1.4GB private byte usage, engine host at 2GB (peaked at 2.7GB).
I have both a local grid node server on my dev computer as well as grid node servers on remote computers.


 	[Managed to Native Transition]	
>	System.Drawing.dll!System.Drawing.SolidBrush.SolidBrush(System.Drawing.Color color)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.GetCustomTextFormatDelegate(nCrunch.Client.UI.TreeGridControl.TreeGridRow row)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableRowObject.PaintableRowObject(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableBodyCell.PaintableBodyCell(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.(nCrunch.Client.UI.TreeGridControl.TreeGridRow , int , int )	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.BindToRows(nCrunch.Client.UI.TreeGridControl.TreeGridRowCollection allExpandedRows, System.Type rowType)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.(nCrunch.Client.UI.GridManagement.GridManagementUpdateEvent )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UIMessageDispatcher.(System.Delegate , object )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 581	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 531	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 520	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks()	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)	Unknown

    
    -------------------------------
    
    >	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.GetCustomTextFormatDelegate(nCrunch.Client.UI.TreeGridControl.TreeGridRow row)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableRowObject.PaintableRowObject(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableBodyCell.PaintableBodyCell(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.(nCrunch.Client.UI.TreeGridControl.TreeGridRow , int , int )	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.BindToRows(nCrunch.Client.UI.TreeGridControl.TreeGridRowCollection allExpandedRows, System.Type rowType)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.(nCrunch.Client.UI.GridManagement.GridManagementUpdateEvent )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UIMessageDispatcher.(System.Delegate , object )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 581	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 531	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 520	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks()	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)	Unknown

    ----------------------------------
    
>	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.GetCustomTextFormatDelegate(nCrunch.Client.UI.TreeGridControl.TreeGridRow row)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableRowObject.PaintableRowObject(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableBodyCell.PaintableBodyCell(NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid treeGrid, int viewX, int viewY, int width, int height, nCrunch.Client.UI.TreeGridControl.TreeGridRow row, nCrunch.VSAddIn.UI.TreeGridControl.Columns.TreeGridColumn column, nCrunch.VSAddIn.UI.TreeGridControl.Palette palette)	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.(nCrunch.Client.UI.TreeGridControl.TreeGridRow , int , int )	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.()	Unknown
 	nCrunch.VSAddIn.dll!NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.BindToRows(nCrunch.Client.UI.TreeGridControl.TreeGridRowCollection allExpandedRows, System.Type rowType)	Unknown
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UI.GridManagement.DistributedProcessingWindow.(nCrunch.Client.UI.GridManagement.GridManagementUpdateEvent )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	nCrunch.VSAddIn.dll!nCrunch.VSAddIn.UIMessageDispatcher.(System.Delegate , object )	Unknown
 	[Native to Managed Transition]	
 	mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 132	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 581	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 531	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 520	C#
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback(System.Windows.Forms.Control.ThreadMethodEntry tme)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks()	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)	Unknown
 	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)	Unknown
    


Hi, thanks for sharing this.

Without having seen this happen on my end, I can only speculate on what is causing it ... but I believe that this is a performance problem in the rendering code for the main tree in the Distributed Processing Window. As you have a few machines in your grid and they're likely very actively pushing status updates, the rendering code isn't able to keep up with the demand for state changes and it's stalling the UI.

There's opportunity for optimisation in this code. Are you able to recreate the problem with any consistency? If so, I can try getting you a fixed build and perhaps you can confirm if the problem is solved ...

Closing the Distributed Processing Window while the engine is working heavily should prevent this problem from appearing.
Remco wrote:There's opportunity for optimisation in this code. Are you able to recreate the problem with any consistency? If so, I can try getting you a fixed build and perhaps you can confirm if the problem is solved ....


Well I could easily for that process instance, it seems like when the build process kicks in (after sliding delay of 5s), and I have the window open it freezes UI (not for minutes but for seconds), if I close the window the problem goes away totally.

Restarting vstudio though and the issue disappeared, cannot repro it any longer, not even a little. Now it is very snappy :(.

Although I had the vstudio opened for several days so maybe it is an issue appearing after a while of usage? for whatever reason...
Leaving VS open for a long period of time is never great for resource efficiency, but most probably this was caused by an update pattern in the distributed processing. Likely, it will happen again if you leave the window open. I'll see what I can do about optimising this code anyway, as I think it could be better and will likely remove the problem in future.
FWIW, quite easy to reproduce issue today again (had vstudio opened since yesterday).
Thanks. I've implemented a fix ... do you want an early build? Or is OK for me to include it in the next one?

Post a reply

Log in to reply.