Bug 26866 - Symbols don't load
Summary: Symbols don't load
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.4
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2015-02-09 10:55 UTC by Jeremy Kolb
Modified: 2017-07-08 02:55 UTC (History)
9 users (show)

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


Attachments
Xamarin Logs (33.08 KB, application/zip)
2015-02-10 09:39 UTC, Jeremy Kolb
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 ANSWERED

Description Jeremy Kolb 2015-02-09 10:55:27 UTC
VS2013

When exceptions are thrown I can only step into my own code.  There are no libraries listed in the "Modules" window and I can't load pdbs from symbol servers.
Comment 1 asimk 2015-02-10 02:32:20 UTC
We have tried to reproduce the issue by generating exception in code and seeing that no dlls are listed in Module window. Screencast for this is mentioned below: 
http://screencast.com/t/jDNa0rFDD

Please review the screencast and provide use test steps/directions to reproduce the issue.

Also can you please add the logs from the following places?:
IDE log: Location: C:\User\AppData\Local\Xamarin\Log\ 
(Devenev file with latest timestamp)
Environment Info: Location:  Help> About Microsoft Visual studio
Comment 2 Jeremy Kolb 2015-02-10 09:39:12 UTC
I made this screen cast of a debugging session.  I'm using the debug runtime in the options menu and the MvvmCross nuget packages includes pdbs so I can get at the source through the editor (go to definition) but not while debugging.

http://screencast.com/t/va6YoQNAxPyF

You can also clone my project: https://github.com/kjeremy/FragmentStatePagerAdapterCrash
Comment 3 Jeremy Kolb 2015-02-10 09:39:40 UTC
Created attachment 9750 [details]
Xamarin Logs
Comment 4 Jeremy Kolb 2015-02-17 14:25:35 UTC
Any update on this?  Do you need more info from me?
Comment 5 Jeremy Kolb 2015-03-04 16:33:04 UTC
I've provided the needed info above.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2015-03-04 18:30:03 UTC
Based on the log files from comment 3 and the screencast from comment 2, I am fairly confident this is a duplicate of bug 25356.


@jkolb, to help the QA team reproduce the problem using your repository on GitHub: is simply running the app sufficient to hit the error? If not, then if you wouldn't mind listing a short set of numbered steps to reproduce the problem using the project from GitHub, that would be perfect. (See also [1] for information to include in other bug reports that you might file in the future.) Thanks!

> [1] https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html


@jkolb, another interesting thing to check would be to see if a more accurate exception message + call stack appears in the Application Output (as in bug 25356). If you like, you can attach back the contents of your Application Output after repeating the steps in the screencast from comment 2. Or you can attach back the `adb logcat` file from the device (see also [2]).

> [2] https://kb.xamarin.com/customer/portal/articles/1675684#adb-logcat
(Note: if this link redirects you to the top level https://kb.xamarin.com/ domain when you click it the first time, try clicking it again.)



## Additional analysis of the screencast from comment 2

### "Frame not in module"

Precisely as in bug 25356, a "Frame not in module" tab pops open when VS catches the "wrong" exception.


### Transcribed stack trace

To be thorough and to improve the textual content of this bug report, I have transcribed the stack trace from when the exception is caught in the screencast from comment 2:

> 0x21 in System.Diagnostics.Debugger.Mono_UnhandledException_internal
> 0x1 in System.Diagnostics.Debugger.Mono_UnhandledException at /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/mono/cs ...
> 0x26 in object.73a11399-d116-448c-bf9b-45b58fea5ae2
> 0x4A in Cirrious.MvvmCross.ViewModels.MvxViewModelLoader.LoadViewModel
> 0x24 in Cirrious.MvvmCross.ViewModels.MvxViewModelLoader.LoadViewModel
> 0x6E in Cirrious.MvvmCross.Droid.FullFragging.Fragments.MvxFragmentExtensions.LoadViewModel
> 0x1C in Cirrious.MvvmCross.Droid.FullFragging.Fragments.MvxFragmentExtensions.
> 0x13 in Cirrious.MvvmCross.View.MvxViewExtensionMethods.OnViewCreate
> 0x84 in Cirrious.MvvmCross.Droid.FullFragging.Fragments.MvxFragmentExtensions.OnCreate
> 0xA3 in Cirrious.MvvmCross.Droid.FullFragging.Fragments.MvxBindingFragmentAdapter.HandleCreateCalled
> 0xC in Cirrious.CrossCore.Core.MvxDelegateExtensionMethods.Raise<Android.OS.Bundle>
> 0x1C in Cirrious.MvvmCross.Droid.FullFragging.Fragments.EventSource.MvxEventSourceFragment.OnCreate
> 0x13 in Android.App.Fragment.n_OnCreate_Landroid_os_Bundle_ at /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/monodroi..
> 0x17 in object.73a11399-d116-448c-bf9b-45b58fea5ae2



Thank again!
Brendan
Xamarin Support Team
Comment 7 Jeremy Kolb 2015-03-05 10:40:48 UTC
Just build the app from the github repository, scroll the viewpager to the end and then back again and it should crash.  At that point I can't load symbols from the pdbs even though they are in the mvvmcross nuget packages.
Comment 8 Brendan Zagaeski (Xamarin Team, assistant) 2015-03-11 17:26:08 UTC
Thanks! Marking as NEW per comment 7 so we can have QA try one more pass at confirming the issue based on those steps to reproduce.
Comment 9 Jeremy Kolb 2015-04-09 13:02:30 UTC
Any news?
Comment 10 Arpit Jha 2015-08-25 08:14:35 UTC
I have checked this issue and able to reproduce this issue with the help of bug description and attached project.

I am getting exception on scrolling UI speedly.

Getting 'Frame not in module' on break button click in exception window.


Supplement Info:
Screencast: http://www.screencast.com/t/XhCiMi3hb
adb logcat:https://gist.github.com/Arpit360/c3651411f2d936c85d56

Environment Info:
Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Xamarin   3.11.893.0 (dd3b114)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.6.5 (965922617b643927fd4a01adae68730b63a01ecb)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.5.0 (67572797c1794b8219673503e84709d6a775628a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 13 Brendan Zagaeski (Xamarin Team, assistant) 2017-07-08 02:55:53 UTC
For a little bit of "fun" to wind down this Friday evening, I randomly selected this old bug for cleanup.


I will resolve this bug as "answered" for the moment based on some exploration into the information from Comment 0 and Comment 2.  In short, it turns out that the MvvmCross NuGet packages referenced in the repository from Comment 2 do not provide .pdb files after all (even for non-Xamarin C# apps), so the debugger would not be expected to load symbols for that particular scenario.  I suspect there might have been some extra debug symbol setup in the user's original full scenario from Comment 0 that would need additional steps to setup after cloning the sample repository from Comment 2.




## Possible topics for follow-up enhancement requests, depending on user interest

Here are a few small things I noticed while exploring this bug that could possibly be interesting for follow-up.  I am not sure how common these scenarios are for users, so I will hold off on filing enhancement reports for them.  But any user who is interested in one of them can feel free to file a new enhancement report to request some follow-up discussion.  Thanks!


- The "Debug > Windows > Modules" window does not (yet) show information for Xamarin projects.  This window doesn't seem to be too crucial for most development and diagnosis tasks, but it might be nice to provide that functionality for Xamarin projects eventually.


- For console C# apps, Visual Studio enables the "Go To Source Code" context menu item for any Call Stack line that comes from a library with loaded debug symbols, even if the source files for the library are _not_ present at the original location where they were compiled.  For Xamarin projects, the "Go To Source Code" command is only enabled if the source files _are_ present at their original compile location.  Note that the file names and line numbers do appear as expected in the Call Stack for Xamarin projects in this scenario, so the symbol files are at least being loaded successfully.  As a guess, maybe the disabled context menu item is instead due to a limitation of remote debugging in Visual Studio, and perhaps isn't unique to Xamarin apps?


- For console C# apps, Visual Studio enables the "Switch to Frame" context menu item for every Call Stack line, regardless of availability of debug symbols.  For Xamarin projects, that context menu seems to be enabled only when the "Go To Source Code" context menu item is also enabled.  (In contrast, Visual Studio on Mac allows switching to any stack frame in this situation, so this issue is probably more about the Visual Studio UI logic than the Mono soft debugger behavior.)


- For console C# apps, Visual Studio offers "Load Symbols" and "Symbol Settings..." context menu items for every Call Stack line that does not yet have debug symbols loaded.  For Xamarin projects, those context menus are never shown.  As I understand it, this is an expected limitation.  Xamarin apps are debugged remotely on a target device, so all of the debug symbols need to be uploaded to the device during the deployment phase (before the app launches).  Loading symbols on-demand from the host computer into an already-running app on the remote device during debugging would be tricky at best.




## Additional side note

In the end, my old guess in Comment 6 about Bug 25356 was _not_ relevant to this bug because this report does not involve `async` methods.