Crash on launch with no Azure tools installed #3955

Closed
opened 2026-01-30 23:34:11 +00:00 by claunia · 6 comments
Owner

Originally created by @zb140 on GitHub (Sep 20, 2019).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): Custom build, b84a073

Any other software?

Steps to reproduce

  1. On a system that does not have any Azure tools or components installed, fetch commit b84a073.
  2. Clean and then rebuild the solution
  3. Rename profiles.json to profiles.json.old (not sure if this is important, but when I update to a new build of Terminal I like to start with a completely fresh profiles.json and merge in all my customizations)
  4. Attempt to launch Windows Terminal

Expected behavior

Terminal launches 😄

Actual behavior

Terminal crashes ☹️

Ironically, it's crashing while trying to determine whether Azure stuff is in fact installed. The exact line that's crashing is apparently in a generated file (...\src\cascadia\TerminalApp\lib\Generated Files\winrt\base.h) where it calls WINRT_RoGetActivationFactory and unexpectedly gets ERROR_MOD_NOT_FOUND (0x8007007e). Going up the stack ultimately leads to this line: 0df02343f1/src/cascadia/TerminalApp/AzureCloudShellGenerator.cpp (L34)

Everything further down the stack than that line appears to be in generated code, so I guess it's possible that generation isn't going well. But I would expect the build process I use to pretty much rule that out since it always starts with a completely fresh checkout (no local changes at all) and a complete clean and rebuild of everything. I have also tried with a completely new, fresh clone (rather than updating an existing clone) with the same results.

Originally created by @zb140 on GitHub (Sep 20, 2019). # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): Custom build, b84a073 Any other software? ``` # Steps to reproduce 1. On a system that does not have any Azure tools or components installed, fetch commit b84a073. 1. Clean and then rebuild the solution 1. Rename `profiles.json` to `profiles.json.old` (not sure if this is important, but when I update to a new build of Terminal I like to start with a completely fresh `profiles.json` and merge in all my customizations) 1. Attempt to launch Windows Terminal # Expected behavior Terminal launches 😄 # Actual behavior Terminal crashes ☹️ Ironically, it's crashing while trying to determine whether Azure stuff is in fact installed. The exact line that's crashing is apparently in a generated file (`...\src\cascadia\TerminalApp\lib\Generated Files\winrt\base.h`) where it calls `WINRT_RoGetActivationFactory` and unexpectedly gets `ERROR_MOD_NOT_FOUND` (0x8007007e). Going up the stack ultimately leads to this line: https://github.com/microsoft/terminal/blob/0df02343f13059640f57042b8c1d8c113ac4bae5/src/cascadia/TerminalApp/AzureCloudShellGenerator.cpp#L34 Everything further down the stack than that line appears to be in generated code, so I guess it's possible that generation isn't going well. But I would expect the build process I use to pretty much rule that out since it always starts with a completely fresh checkout (no local changes at all) and a complete clean and rebuild of everything. I have also tried with a completely new, fresh clone (rather than updating an existing clone) with the same results.
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-30 23:34:12 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 20, 2019):

This looks suspiciously similar to (bug number where Visual Studio 2019 Update 3 was broken), but that has since been fixed. It’s looking for a DLL that the packaging project has conveniently forgotten to place in the package.

Fortunately, it’s not about having any azure tools installed :)

Can you share some more info about your environment? What VS version are you using, and can you share a Detailed or Diagnostic level build log?

@DHowett-MSFT commented on GitHub (Sep 20, 2019): This looks suspiciously similar to (bug number where Visual Studio 2019 Update 3 was broken), but that has since been fixed. It’s looking for a DLL that the packaging project has conveniently forgotten to place in the package. Fortunately, it’s not about having any azure tools installed :) Can you share some more info about your environment? What VS version are you using, and can you share a Detailed or Diagnostic level build log?
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 20, 2019):

(That was #2625. Sorry, I’m on my phone :))

@DHowett-MSFT commented on GitHub (Sep 20, 2019): (That was #2625. Sorry, I’m on my phone :))
Author
Owner

@zb140 commented on GitHub (Sep 20, 2019):

Thanks for the quick response! My Visual Studio version is 16.3.0 Preview 1. I didn't previously realize I was using a preview version, so I guess that might be related. I can try to switch to a released version and see if that helps.

I've also attached the diagnostic level build log (zipped for file size). It's in two parts because the build actually doesn't succeed the first time. When I build from a fresh checkout it builds for a while then errors out with:

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB3272	There was a problem reading the implementation file "C:\Users\zb\stuff\Terminal\x64\Release\TerminalAppLib\TerminalAppLib.lib". "Unable to read beyond the end of the stream."	LocalTests_TerminalApp	C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets	2106	

Starting an incremental build at that point then succeeds. This has been happening since well before yesterday so I don't think it's the problem, but it might be.

Output-Build.zip

@zb140 commented on GitHub (Sep 20, 2019): Thanks for the quick response! My Visual Studio version is 16.3.0 Preview 1. I didn't previously realize I was using a preview version, so I guess that might be related. I can try to switch to a released version and see if that helps. I've also attached the diagnostic level build log (zipped for file size). It's in two parts because the build actually doesn't succeed the first time. When I build from a fresh checkout it builds for a while then errors out with: ```none Severity Code Description Project File Line Suppression State Error MSB3272 There was a problem reading the implementation file "C:\Users\zb\stuff\Terminal\x64\Release\TerminalAppLib\TerminalAppLib.lib". "Unable to read beyond the end of the stream." LocalTests_TerminalApp C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2106 ``` Starting an incremental build at that point then succeeds. This has been happening since well before yesterday so I don't think it's the problem, but it might be. [Output-Build.zip](https://github.com/microsoft/terminal/files/3636778/Output-Build.zip)
Author
Owner

@zb140 commented on GitHub (Sep 20, 2019):

I just had a chance to look at #2625 and yeah, this definitely looks highly similar, although oddly my build does include the fix for that one.

@zb140 commented on GitHub (Sep 20, 2019): I just had a chance to look at #2625 and yeah, this definitely looks highly similar, although oddly my build does include the fix for that one.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 20, 2019):

It definitely looks like the same issue from the logs. Have you tried after "preview 1"?

@DHowett-MSFT commented on GitHub (Sep 20, 2019): It definitely looks like the same issue from the logs. Have you tried after "preview 1"?
Author
Owner

@zb140 commented on GitHub (Sep 21, 2019):

Updating to Preview 4 did indeed fix it. Sorry for the noise 😄

@zb140 commented on GitHub (Sep 21, 2019): Updating to Preview 4 did indeed fix it. Sorry for the noise 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3955