1

I'm using Async Targeting Pack in Silverlight 5.0 application. When unhandled exception occurs in some async method (assuming from async "state machine"), stack trace of the exception than contains only:

in System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__0(Object state)

end not any other code locations.

svick
  • 236,525
  • 50
  • 385
  • 514
Tomáš Holan
  • 321
  • 3
  • 10
  • How can I get "full" stack trace or find out actual location, where exception occured? Is this some bug of targeting pack or it is simply not supported? – Tomáš Holan Jan 16 '13 at 20:16
  • This means that the exception happened after first await call, but before the end. Since async functions are by default state machines, the stack trace is lost. – Toni Petrina Jan 22 '13 at 15:00
  • @ToniPetrina , couldn't grasp... why after "first"? If exception happens after N-th await call but before the end. what's the difference? – Gennady Vanin Геннадий Ванин May 06 '13 at 18:59
  • The difference is huge. When you return in the function after awaiting, the stack trace must be different. After all, you didn't come to that point from function call, you came as a continuation for the awaited task. – Toni Petrina May 07 '13 at 09:14

0 Answers0