Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crash - Try using VS2022 developer command prompt #12918

Closed
mikedice opened this issue Apr 16, 2022 · 4 comments
Closed

App Crash - Try using VS2022 developer command prompt #12918

mikedice opened this issue Apr 16, 2022 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered

Comments

@mikedice
Copy link

mikedice commented Apr 16, 2022

Windows Terminal version

1.12.10733.0

Windows build number

10.0.22000.613

Other Software

Visual studio 2022 64 bit edition

Steps to reproduce

I integrated the VS2022 dev command prompt by adding the settings blurb below

            {
                "backgroundImage": "C:\\Users\\mikedice\\OneDrive - Microsoft\\Pictures\\Dune Art\\78129.jpg",
                "backgroundImageOpacity": 0.29999999999999999,
                "commandline": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat",
                "font": 
                {
                    "size": 16
                },
                "foreground": "#16C60C",
                "guid": "{b3c68d96-cac9-4989-9f9c-ff61f248c02e}",
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "name": "IDK",
                "startingDirectory": "C:\\Users\\mikedice\\repos",
                "useAcrylic": false
            },

This is also the default profile

    "defaultProfile": "{b3c68d96-cac9-4989-9f9c-ff61f248c02e}",

Open Terminal
It shows the VS2022 command prompt intro banner for a couple of seconds
The Terminal App disappears. I assume the app crashed. I don't know where the logs are for this app.

If I change the defaultProfile to the GUID of one of my other configurations the app starts successfully. Now, though, if I try to start the "IDK" prompt that tab will disappear after showing the VS2022 command prompt intro banner briefly

Need to be able to use the VS2022 command prompt so I'll just use the old Windows console outside of terminal for now but, I won't be able to see my cool Dune background art :(

Expected Behavior

Can integrate VS 2022 command prompt into WIndows Terminal. I have been using the VS2019 command prompt in Windows Terminal for quite some time.

Actual Behavior

Cannot use VS2022 command prompt in WIndows Terminal. The terminal tab crashes.

@mikedice mikedice added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Apr 16, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 16, 2022
@mikedice
Copy link
Author

mikedice commented Apr 16, 2022

I attached the debugger - here is the output:

onecore\com\combase\objact\objact.cxx(4080)\combase.dll!00007FFFAB3B5105: (caller: 00007FFFAB3B1B12) ReturnHr(15) tid(df8) 80040154 Class not registered
onecore\com\combase\objact\objact.cxx(4080)\combase.dll!00007FFFAB3B5105: (caller: 00007FFFAB3B1B12) ReturnHr(16) tid(df8) 80040154 Class not registered
onecore\com\combase\objact\objact.cxx(4080)\combase.dll!00007FFFAB3B5105: (caller: 00007FFFAB3B1B12) ReturnHr(17) tid(df8) 80040154 Class not registered
Exception thrown at 0x00007FFFAA37466C in WindowsTerminal.exe: Microsoft C++ exception: std::out_of_range at memory location 0x000000DB4DFFF680.
Exception thrown at 0x00007FFFAA37466C in WindowsTerminal.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
C:\a\_work\1\s\src\renderer\uia\UiaRenderer.cpp(312)\Microsoft.Terminal.Control.dll!00007FFF8E84CB5A: (caller: 00007FFF8E79159F) LogHr(8) tid(41c4) 8000000B The operation attempted to access data outside the valid range
    Msg:[std::exception: invalid string_view position] 
Exception thrown at 0x00007FFFAA37466C in WindowsTerminal.exe: Microsoft C++ exception: std::out_of_range at memory location 0x000000DB4DFFF680.
Exception thrown at 0x00007FFFAA37466C in WindowsTerminal.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
C:\a\_work\1\s\src\renderer\uia\UiaRenderer.cpp(312)\Microsoft.Terminal.Control.dll!00007FFF8E84CB5A: (caller: 00007FFF8E79159F) LogHr(9) tid(41c4) 8000000B The operation attempted to access data outside the valid range
    Msg:[std::exception: invalid string_view position] 
The thread 0x29c0 has exited with code 0 (0x0).
The thread 0x7e8 has exited with code 0 (0x0).

@elsaco
Copy link

elsaco commented Apr 16, 2022

@mikedice you might want to change the command to LauchDevCmd.bat. Using your custom profile, background picture included, this is the output:

wt_vs_cmd

When using VsDevCmd.bat the terminal closes immediately after showing VS banner. Notice I'm using VS community edition not enterprise, but the startup script should be the same.

Profile used for testing:

            {
                "backgroundImage": "c:\\Users\\tux\\Downloads\\78129.jpg",
                "backgroundImageOpacity": 0.29999999999999999,
                "commandline": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\LaunchDevCmd.bat",
                "font": 
                {
                    "size": 16
                },
                "foreground": "#16C60C",
                "guid": "{9390ca34-9fba-495f-91b7-a6d2f6c56ac0}",
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "name": "IDK",
                "startingDirectory": "C:\\Users\\tux\\repos",
                "useAcrylic": false
            }

@mikedice
Copy link
Author

Thanks for looking and for the work around. The solution you provided above is working on my machine too.

@zadjii-msft
Copy link
Member

Glad you got this sorted out!

In 1.12 the Terminal should have also automatically detected your VS installs and created profiles for you. Did you not see those?

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered labels Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants