1

Something went horribly wrong with my WPF application and it appears I have 24 million actions on the dispatcher waiting to run.

windbg with sosex shows me

0:000> !dumpgen 2 -stat
       Count      Total Size      Type
-------------------------------------------------
...
      23,967,120    575,210,880   Catel.MVVM.Command`2+<>c__DisplayClass35_0[[System.Object, mscorlib],[System.Object, mscorlib]]
      23,967,139    575,211,336   System.Windows.Threading.DispatcherOperationTaskSource`1[[System.Object, mscorlib]]
      23,967,139    575,211,336   System.Windows.Threading.DispatcherOperationTaskMapping   
      23,967,139    575,211,336   System.Threading.Tasks.TaskCompletionSource`1[[System.Object, mscorlib]]
      23,967,139    958,685,560   MS.Internal.CulturePreservingExecutionContext
      23,967,120  1,533,895,680   System.Func`1[[System.Threading.Tasks.Task, mscorlib]]
      23,967,139  1,533,896,896   System.Windows.Threading.PriorityItem`1[[System.Windows.Threading.DispatcherOperation, WindowsBase]]
      23,967,554  1,533,923,456   System.Action
      23,967,139  1,917,371,120   System.Threading.Tasks.Task`1[[System.Object, mscorlib]]
      23,967,156  2,109,109,728   System.Threading.ExecutionContext
      23,967,139  2,684,319,568   System.Windows.Threading.DispatcherOperation

Is there a way I can see the actual code that the Action will be executing? I have a rough idea what is going on based on the objects reference by the above, but seeing the actual code the Action will execute will be helpful.

JonDrnek
  • 1,414
  • 3
  • 19
  • 37
  • Please post the output of `!sosex.mdt` or `!sos.dumpobj` for one of them. You need to look at the _invocationList property to see what objects are in there. From there, proceed to dump, using `mdt` or `dumpobj` the contents. – Steve Johnson Dec 14 '16 at 21:46
  • 1
    Related: http://stackoverflow.com/questions/3668642/get-method-name-from-delegate-with-windbg – Thomas Weller Dec 19 '16 at 11:57
  • Can you confirm that yours in x64 (from the memory consumption it looks like). Look at the related question and please tell us why this is not a duplicate. – Thomas Weller Dec 19 '16 at 11:58
  • It does appear to be a duplicate. Thanks – JonDrnek Dec 20 '16 at 14:50

0 Answers0