Bug 23566 - Exception on Async call: "An unhandled exception occurred", no stacktrace shown
Summary: Exception on Async call: "An unhandled exception occurred", no stacktrace shown
Status: RESOLVED DUPLICATE of bug 26087
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-03 02:13 UTC by PaulH
Modified: 2016-05-10 16:58 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Exception dialog with no useful information (6.43 KB, image/png)
2014-10-03 02:13 UTC, PaulH
Details
Output Window with the stack trace that should be in the exception dialog (37.12 KB, image/png)
2014-10-03 02:14 UTC, PaulH
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 26087

Description PaulH 2014-10-03 02:13:39 UTC
Created attachment 8294 [details]
Exception dialog with no useful information

As per this thread: http://forums.xamarin.com/discussion/6800/unhandled-exception-details-in-vs-2012-where-is-it

When VS2013 (or 2012 by the looks of it) encounters an error, occasionally you get the dialog shown in the above thead's original post, with the error message "An unhandled exception occurred", and no option but to Break or continue, and no additional information.

To reproduce:
 - Create or open a simple Xamarin Forms application that uses a NavigationPage, for example the Monkeys Sample (https://github.com/jamesmontemagno/Xamarin.Forms-Monkeys)
 - await a navigation page pop when there are no pages on the stack to pop (to cause an exception).  In the Monkeys sample, replace OnItemSelected in MonkeysPage.xaml.cs with the following:

    public async void OnItemSelected(object sender, ItemTappedEventArgs args)
    {
      var monkey = args.Item as Monkey;
      if (monkey == null)
        return;

      await Navigation.PopModalAsync();
      // Reset the selected item
      list.SelectedItem = null;
    }

 - Run the app and invoke the awaited method (eg. by tapping a list item in the Monkeys sample).

Actual Results:
 - The attached dialog which provides no useful information.  You can open the Output window (also attached) and view the exception details, but this is not intuitive for beginners

Expected Results:
 - a useful dialog indicating the source of the error and stacktrace, as per the Output window (preferably allowing the stacktrace to be copied to clipboard)
Comment 1 PaulH 2014-10-03 02:14:30 UTC
Created attachment 8295 [details]
Output Window with the stack trace that should be in the exception dialog
Comment 2 PaulH 2014-10-03 02:16:02 UTC
Build environment:
Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0444002-02230
Microsoft LightSwitch for Visual Studio 2013

Office Developer Tools - May 2014 Update ENU   06177-004-0444002-02230
Microsoft Office Developer Tools for Visual Studio 2013 - May 2014 Update ENU

Team Explorer for Visual Studio 2013   06177-004-0444002-02230
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0444002-02230
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0444002-02230
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0444002-02230
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0444002-02230
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02230
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0444002-02230
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools   2013.2.50425
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.1.20409.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.1
Provides common services for use by Azure Mobile Services and Windows Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

NuGet Package Manager   2.8.50313.46
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools   1.1
Windows Azure Mobile Services Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.6.262.0 (21b7dba8736246dfd10e3f19a92ed68f1b30abfd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.16.0.17 (2a7b68212b17c903160fbd8e0106babb299d1be3)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.0.66.0 (3e201c8aa14879773f966f483329bcda49fd3a41)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 Rajneesh Kumar 2014-10-03 05:32:03 UTC
I have checked this issue and able to reproduce. To reproduce this I have followed the steps provided in bug description.

1. Download sample from the link provided in bug description
3. Open (Monkeys-XAML-UI) in VS
2. Replace the following code OnItemSelected in MonkeysPage.xaml.cs

  var monkey = args.Item as Monkey;
      if (monkey == null)
        return;

      await Navigation.PopModalAsync();
      // Reset the selected item
      list.SelectedItem = null;

4. Run the deploy the app on simulator
5. Tap a list item an exception dialog will occur
6. Observe that dialog which provides no useful information

I also observed Output window and view the exception details, but this is no useful information for user.

Screencst: http://www.screencast.com/t/6rxfvmQ1t

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0444002-02032
Microsoft LightSwitch for Visual Studio 2013

Microsoft Office Developer Tools for Visual Studio 2013 ENU   06177-004-0444002-02032
Microsoft Office Developer Tools for Visual Studio 2013 ENU

Team Explorer for Visual Studio 2013   06177-004-0444002-02032
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0444002-02032
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0444002-02032
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0444002-02032
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0444002-02032
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02032
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0444002-02032
Windows Phone SDK 8.0 - ENU

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.0.11001.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.0
Provides common services for use by Azure Mobile Services and Windows Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Web Developer Tools 2013   2.0.40926.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

NuGet Package Manager   2.7.40911.287
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools   1.0
Windows Azure Mobile Services Tools

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.6.262.0 (21b7dba8736246dfd10e3f19a92ed68f1b30abfd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.16.0.17 (2a7b68212b17c903160fbd8e0106babb299d1be3)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.0.66.0 (3e201c8aa14879773f966f483329bcda49fd3a41)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2015-06-12 17:09:21 UTC
Thanks for the report. To help with bookkeeping I will mark this bug as a duplicate of Bug 26087.

The scenario described in comment 0 is in fact a combination of Bug 26087 as well as Bug 25356, but I think Bug 26087 is the primary focus of the request.

*** This bug has been marked as a duplicate of bug 26087 ***