App Crash - Try using VS2022 developer command prompt #17258

Closed
opened 2026-01-31 05:36:58 +00:00 by claunia · 4 comments
Owner

Originally created by @mikedice on GitHub (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.

Originally created by @mikedice on GitHub (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 ```json { "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.
Author
Owner

@mikedice commented on GitHub (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).
@mikedice commented on GitHub (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). ```
Author
Owner

@elsaco commented on GitHub (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
            }
@elsaco commented on GitHub (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](https://user-images.githubusercontent.com/3933920/163688108-522b5bd4-5c48-478e-b656-e50bcd6d92d6.png) 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 } ```
Author
Owner

@mikedice commented on GitHub (Apr 17, 2022):

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

@mikedice commented on GitHub (Apr 17, 2022): Thanks for looking and for the work around. The solution you provided above is working on my machine too.
Author
Owner

@zadjii-msft commented on GitHub (Apr 18, 2022):

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 commented on GitHub (Apr 18, 2022): Glad you got this sorted out! In 1.12 the Terminal should have also [automatically detected your VS installs](https://github.com/microsoft/terminal/pull/7774) and created profiles for you. Did you not see those?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17258