Getting AggregateException out of nothing

MihaMarkicMihaMarkic ✭✭✭✭SI ✭✭✭✭
edited October 2012 in Xamarin.Android

Upon debugging in VS2010 a non-Task based method I am getting an AggregateException without any stack trace or other info whatsoever. Turning "break when exception is" on or off doesn't matter. If I continue execution the program works as nothing happened.
I know this is vague but that's all I have. WebClient.UploadValues is involved.
Is there anything I can do to find the cause of the exception?

Posts

  • ShaneMunnShaneMunn ✭✭ AUBeta ✭✭

    You could look at the InnerExceptions property to see what the AggregateException is wrapping. Unobserved exceptions will be raised in the finalizer thread, which used to bring down the app but in MonoTouch (at least) I've not seen them crash the app (which is consistent with .Net 4.5 IIRC).

    Cheers,
    Greg

  • MihaMarkicMihaMarkic ✭✭✭✭ SI ✭✭✭✭

    I would if I could :-) I get just the dialog and after I dismiss it there is just void - no related sources, no exception to inspect, no callstack, nothing.

  • MihaMarkicMihaMarkic ✭✭✭✭ SI ✭✭✭✭

    Eventually I found out where my exceptions are happening. Is this behaviour (no info on AggregateException) by default or a bug?
    Either way it should display InnerExceptions.

  • MihaMarkicMihaMarkic ✭✭✭✭ SI ✭✭✭✭

    And yes, Greg, you are correct. .net 4.5 won't stop on unhandled AggregateException anymore.
    Now, if we could get async/await from .net 4.5 as well :-)

  • ShaneMunnShaneMunn ✭✭ AUBeta ✭✭

    I'm looking forward to async / await as well :)

Sign In or Register to comment.