locked
Visual Studio 15.6 Causes iOS Deployments to Hang VS IDE RRS feed

  • Question

  • User1869 posted

    Just upgraded to VS Pro 15.6. Previously no complaints from iOS connection.

    Now I get a complaint in the Xamarin console when I load a project / reconnect to the Mac - "Could not install Xcode tool package 'MobileDevice.pkg' " and the Connection dialog displays the following.

    Opening XCode on the Mac does not solve the issue.

    Compiles / deploys work fine once, then VS hangs with a 'Not responding' white bar in the IDE.

    Update: Got VS Connection dialog to quit complaining by opening up Xcode.app, Navigating to the /Packages directory and manually installing MobileDevice.pkg. Still hangs after 2nd deployment.

    Tuesday, March 6, 2018 5:27 PM

All replies

  • User13824 posted

    As an additional data-gathering step to see if by chance it reveals anything interesting, you can look at the call stack of the Main Thread for the hung instance of Visual Studio:

    1. Follow steps 1 – 5 from the guide about collecting the Visual Studio call stacks.
    2. Navigate to the Debug > Threads window in the second instance of Visual Studio.
    3. Double-click on the Main Thread.
    4. Right click in the Call Stack window, and enable Show External Code.
    5. Take a look at the call stack, particularly for any methods in a Xamarin namespace. You can also copy and paste back the call stack into this forum thread.

    (Or if you prefer, you could follow all of the steps on the guide and attach back the minidump file.)

    Wednesday, March 7, 2018 1:16 AM
  • User13824 posted

    As one more bit of follow-up, I'll note that for any IDE hang, it is basically always fair game to submit a new problem via Help > Submit Feedback > Report a Problem to get the issue tracked for investigation and a potential bug fix. That process will automatically collect some more details that might help for the team to investigate in case your initial local investigation with the Call Stack doesn't turn up an answer.

    Similar to the steps for collecting the call stacks, you can attach to the hung IDE instance from a second Visual Studio instance, use the Record feature of the Report a Problem tool to select the hung instance (or the instance where you will perform the step to replicate the hang), start recording, wait a few moments (or perform the steps to replicate the hang and then wait a few moments), stop recording, and then proceed to submit the feedback.

    Wednesday, March 7, 2018 2:34 AM
  • User297045 posted

    I am having the same problem on two different developer computers.

    Wednesday, March 7, 2018 6:36 PM
  • User13824 posted

    DannyLloyd, the same problem as in both the error about "MobileDevice.pkg" and the hang, or just one or the other?

    Wednesday, March 7, 2018 11:50 PM
  • User1869 posted

    So captured a mini-dump. Looked thru the call stack, did not see anything Xamarin related. Submitted to "Report a Problem" as well.

    Have verified that deploying to physical devices does not cause the issue. Unable to test on Android emulators b'cause I am running in a VM.

    Attached is call stack. Where can I upload my 400M minidump file :-)

    Thursday, March 8, 2018 5:46 PM
  • User13824 posted

    Interesting. From that stack trace of the Main Thread:

    // [Managed to Native Transition] // Microsoft.Build.dll!Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(string resourceName, object[] args) // Microsoft.Build.dll!Microsoft.Build.Execution.BuildManager.BeginBuild(Microsoft.Build.Execution.BuildParameters parameters) // Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.BuildManager.BuildManagerAccessor.PrepareDesignTimeBuild(string logFileName)

    And the information from the "Report a Problem" ticket had the Native frames too, showing the top as:

    // ntdll.dll!EtwEventWrite

    So to make a first rough guess, it sounds like 2 things are happening:

    1. The design-time build is somehow causing an exception to be thrown.
    2. For some reason the call to log that exception via event tracing (ETW) is never completing.

    The most direct way forward is probably investigation by the team on the Developer Community report.

    It's possible that the call stacks of the other threads wouldn't provide any other interesting clues, but if you wanted you could try collecting the minidump once more, switching the file save settings from "Minidump with Heap" to just "Minidump", and zipping that up. With a little luck, that would be small enough that you could attach it here too.

    Friday, March 9, 2018 12:45 AM
  • User13824 posted

    I also skimmed through Visual Studio telemetry for hangs to see if I could turn up any other clues. I haven't studied that telemetry much before, so there's a chance I might be misinterpreting it, but if I'm reading it correctly, one other possibly interesting thing is that it looks like all the users who are hitting similar hangs have ReSharper running in a background thread. So if by chance you are using ReSharper, it might be interesting to test if temporarily disabling it changes the behavior.

    Friday, March 9, 2018 1:14 AM
  • User360562 posted

    Hi @BrendanZagaeski , there were 7 preview releases of VS 15.6 - how come such major issues appear in the GA release? My IDE has become totally useless for Android ...

    Friday, March 9, 2018 10:50 PM
  • User13824 posted

    If I read the telemetry correctly, for this particular forum discussion about Xamarin.iOS, issues with Xamarin.Android would be unrelated. All the matching telemetry events for this particular issue involve a Xamarin.iOS project. I would recommend to vote on and follow items Xamarin.Android on Developer Community for updates and fix notifications related to what you're seeing (this link might match).

    (Note that the engineering team studies any issues where the vote count on Developer Community (or the corresponding automated telemetry for hangs and crashes in the IDE) rises markedly after a non-preview release. They use this review process to determine a next set of recommendations for how to avoid similar scenarios for future non-preview releases. Many many different aspects are involved for different kinds of issues, and adding new recommendations is an iterative process across releases, so I'm not sure there would be any succinct or self-contained answers from that process that would be of interest to users (nor do I know too much about the specifics of the recommendations myself since I'm just an assistant, not an engineering manager).)


    EDIT: Adjusted my wording a little for better grammar and clarity.

    Saturday, March 10, 2018 9:03 PM
  • User1869 posted

    I have upgraded to 15.6.1, same ReSharper. Issue seems to have gone away (10+ iOS deploy's w/out problems)

    Saturday, March 10, 2018 11:40 PM
  • User317805 posted

    I just upgraded to 15.6.1, the problems with the XCode Tools installation fails now happens to me as well. I also have Resharper installed. Disabling Resharper and restarting, no error.

    Monday, March 12, 2018 7:20 PM
  • User13824 posted

    the problems with the XCode Tools installation fails now happens to me as well

    For suggested workarounds and for updates and fix notifications for that Xcode package error issue, I would recommend following and voting on the corresponding Developer Community report: - https://developercommunity.visualstudio.com/content/problem/209704/vs-156-xcode-tools-installation-fails.html

    (In case it helps avoid any confusion, the original author of this thread resolved that issue by following a manual package installation approach, and that Xcode package error is a separate issue from the IDE hang behavior when building.)

    Monday, March 12, 2018 7:41 PM
  • User1869 posted

    I spoke too soon.

    I have now disabled R#, the problem remains. The pattern seems to be. If I build, then deploy, it never locks up. If I I just hit the green arrow, it locks up the second time.

    Monday, March 12, 2018 9:39 PM