Ошибка shellexecuteex сбой код 3221225781

Issue Type: Performance Issue

Whenever i try to open terminal either via Ctrl+` or via Terminal option in the menu it gives the following error message and terminal won’t show up.

«C:WindowsSystem32WindowsPowerShellv1.0powershell.exe» terminated with exit code: 3221225781.

Few things to note:

  • It was working fine till yesterday around 11:30 PM 20th May 2022 IST.
  • Getting this issue from today morning around 8:00 AM 21st May 2022 IST.
  • Happed after an update (but not sure).

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.67.2 (user setup)
  • OS Version: Windows_NT x64 10.0.22000

VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:15:52.058Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info

Item Value
CPUs Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz (6 x 2904)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.94GB (10.68GB free)
Process Argv —crash-reporter-id 918b4482-ff12-441c-8c9b-f0a305735d24
Screen Reader no
VM 0%

Process Info

CPU %	Mem MB	   PID	Process
    1	    89	 14600	code main
    0	   145	  1056	   shared-process
    0	    70	  8304	     ptyHost
    0	    75	 13644	     fileWatcher
    0	   243	  1992	   window (resolvers.js - skribool-server - Visual Studio Code)
    2	   181	  2648	   extensionHost
    0	   161	 14052	     "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:UsersYashAppDataLocalProgramsMicrosoft VS Coderesourcesappextensionsnode_modulestypescriptlibtsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:UsersYashAppDataLocalTempvscode-typescript9108ef99a316a149c614tscancellation-6e99064f9f043985a590.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations c:UsersYash.vscodeextensionsvisualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
    0	    94	   408	       "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node "c:/Users/Yash/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/Yash/AppData/Local/Microsoft/TypeScript/4.6 --enableTelemetry --typesMapLocation "c:/Users/Yash/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typesMap.json" --validateDefaultNpmLocation
    1	   115	 14992	     "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:UsersYashAppDataLocalProgramsMicrosoft VS Coderesourcesappextensionsnode_modulestypescriptlibtsserver.js" --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName C:UsersYashAppDataLocalTempvscode-typescript9108ef99a316a149c614tscancellation-ff106fc9bd5ab3ae593f.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations c:UsersYash.vscodeextensionsvisualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
    1	    85	  3436	   issue-reporter
    1	    90	  6888	   gpu-process
    0	    39	  8620	   utility-network-service
    0	    26	  9304	   crashpad-handler

Workspace Info

|  Window (resolvers.js - skribool-server - Visual Studio Code)
|    Folder (skribool-server): 11 files
|      File types: js(5) json(2) gitignore(1)
|      Conf files: package.json(1);

Extensions (26)

Extension Author (truncated) Version
better-comments aar 3.0.0
dart-code Dar 3.40.0
flutter Dar 3.40.0
dart-data-class-generator dot 0.5.3
es7-react-js-snippets dsz 4.4.3
prettier-vscode esb 9.5.0
bloc Fel 6.6.0
code-runner for 0.11.7
json-to-dart hir 3.5.7
pubspec-assist jer 2.3.2
cmake-tools ms- 1.10.5
cpptools ms- 1.9.8
vsliveshare ms- 1.0.5561
vsliveshare-audio ms- 0.1.91
vsliveshare-pack ms- 0.4.0
awesome-flutter-snippets Nas 3.0.3
material-icon-theme PKi 4.17.0
java red 1.6.0
file-tree-generator Shi 1.1.1
cmake twx 0.0.17
vscodeintellicode Vis 1.2.21
vscode-java-debug vsc 0.40.1
vscode-java-dependency vsc 0.19.1
vscode-java-pack vsc 0.22.4
vscode-java-test vsc 0.35.0
vscode-maven vsc 0.35.1

(1 theme extensions excluded)

A/B Experiments

vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

Running npm start, npm run or npm run-script fails with npm ERR! errno 3221225781

My node is cleanly installed stable version 10.16.3 LTS with npm 6.9.0 on Windows 10. Everything is installed on the default path on C:.

My example is a minimal setup with the current file structure:

node_modules/ <empty>
index.js
package.json

The node_modules folder is empty.

The index.js:

console.log("Hello world..");

The package.json:

{
  "name": "testnpm",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  }
}

Running npm start

H:devjavascripttestnpm>npm start

> testnpm@1.0.0 start H:devjavascripttestnpm
> node index.js

npm ERR! code ELIFECYCLE
npm ERR! errno 3221225781
npm ERR! testnpm@1.0.0 start: `node index.js`
npm ERR! Exit status 3221225781
npm ERR!
npm ERR! Failed at the testnpm@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! <Path to logs>_logs2019-10-19T13_24_15_158Z-debug.log

The expected output would be «Hello World..» but fails as shown above.

Running the same command directly gives the expected result:

H:devjavascripttestnpm>node index.js
Hello world..

Here’s the log after failure:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle testnpm@1.0.0~prestart: testnpm@1.0.0
6 info lifecycle testnpm@1.0.0~start: testnpm@1.0.0
7 verbose lifecycle testnpm@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle testnpm@1.0.0~start: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;H:devjavascripttestnpmnode_modules.bin;...
9 verbose lifecycle testnpm@1.0.0~start: CWD: H:devjavascripttestnpm
10 silly lifecycle testnpm@1.0.0~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle testnpm@1.0.0~start: Returned: code: 3221225781  signal: null
12 info lifecycle testnpm@1.0.0~start: Failed to exec start script
13 verbose stack Error: testnpm@1.0.0 start: `node index.js`
13 verbose stack Exit status 3221225781
13 verbose stack     at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid testnpm@1.0.0
15 verbose cwd H:devjavascripttestnpm
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v10.16.3
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 3221225781
22 error testnpm@1.0.0 start: `node index.js`
22 error Exit status 3221225781
23 error Failed at the testnpm@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225781, true ]

To be clear, npm install and such works. Starting a script with node works fine too. The only thing not working is running any of the defined scripts in package.json with npm.

====================================

EDIT:

  1. Same error after updating npm with npm i -g npm
  2. Clue: Error code 3221225781 just happens to be the code for missing dll in .NET
  3. I’ve uninstalled all development libraries, IDE’s, distributables, and reinstalled only necessary according to install description from npm on github. Still same error.
  4. It works in Git Bash! But still same error in CMD and PowerShell. It made me suspect PATH, added all the Git Bash paths in CMD manually to try, and it’s still the same error.
  5. Did a FULL Reinstall of Windows, ran the node install which now installs chocolatey and that in turn installs the following dependencies:
 - chocolatey-dotnetfx.extension v1.0.1
 - python2 v2.7.17
 - kb3033929 v1.0.5
 - visualstudio2017buildtools v15.9.17.0
 - chocolatey-windowsupdate.extension v1.0.4
 - vcredist140 v14.23.27820
 - kb2999226 v1.0.20181019
 - visualstudio-installer v2.0.1
 - kb2919355 v1.0.20160915
 - chocolatey-core.extension v1.3.3
 - kb2919442 v1.0.20160915
 - visualstudio2017-workload-vctools v1.3.2
 - chocolatey-visualstudio.extension v1.8.1
 - dotnetfx v4.8.0.20190930
 - kb3035131 v1.0.3
  1. It now works, what the actual problem was will likely remain a mystery.

i’m trying to run a docker container on Windows 10 which should execute a windows executable (myprogram.exe). Below you find my dockerfile:

FROM microsoft/windowsservercore
COPY mydir/myprogram.exe /mydir/
CMD ["/mydir/myprogram.exe","someparameter"]

So i build the image with:
docker image build --tag myimage .
and run the container with:
docker run myimage
Unfortunately if I check the status of the container with:
docker ps -a I can see that the container has exited with

exit code 3221225781

, which seems to point to a missing dll.
To debug the problem I run the command:
docker run -it --name debug microsoft/windowsservercore cmd, stopped the container and copied the windows executable in the container file system :
docker cp myprogram.exe debug:c:/myprogram.exe
Now I start the container again using docker start -i debug and enter myprogram.exe myparameter. Unfortunately the program exits immediately (usually it runs about 30 sec) without any output, error code …
My only explanation for this behavior is that if some cmd program is missing some dll’s the corresponding error message is not included in the STDERR but rather in a message dialog. Apparently docker doesn’t support this feature???
So what is the best was to solve this problem. Using dependency walker to go through all dll’s needed is possible but would take some time and I’m looking for some more elegant solution.

asked Mar 21, 2018 at 17:53

airborne's user avatar

airborneairborne

3,5644 gold badges15 silver badges26 bronze badges

2

You need to install Visual C++ redistributable.

  1. Download the appropriate version of vc_redist.x64.exe and place it in the folder containing your Dockerfile
  2. Edit your Dockerfile so you preinstall VC++ redistributables when you build your image by adding:

    FROM mcr.microsoft.com/windows/sservercore

    WORKDIR c:mydir

    COPY «vc_redist.x64.exe» .

    RUN vc_redist.x64.exe /install /passive /norestart /log out.txt

    COPY mydir/myprogram.exe c:mydir

    CMD [«c:mydirmyprogram.exe»,»someparameter»]

Your application should run now.

Note: you need 64-bit build of VC++ redistributable and the appropriate version. You can find some download urls here

answered Oct 17, 2019 at 20:55

Cosmin Sontu's user avatar

Cosmin SontuCosmin Sontu

1,01411 silver badges16 bronze badges

This is quite an open-ended question, so it is not possible to give precise answer. Here are a few thoughts:

  1. This is your program that is missing a dependency. Presumably, you as the program author should be aware of what dependencies are required. You need to make sure to include them in your docker image, when you build it.
  2. You are creating your image based on Windows Core, which does not have the whole slew of UI components. This looks like the most obvious thing that could go wrong, given the symptoms. So what I would do is try and make sure that your program can run on Windows Core in principle. Which brings me to the next point.
  3. The most practical way to troubleshoot, in my opinion, is to remove Docker from the equation. You want to run your program on Windows Core. So setup a machine (physical or VM) with Windows Core inside and try to run your program there. There is a good chance that it won’t run with the same symptoms. If that’s the case, you now have reduced complexity, because you know that your problem has nothing to do with docker (or not).
  4. Finally, when you have your Windows Core machine up and running, you might be able to see a message box pop up with the error immediately (even on Core you can run some programs with UI can run, and message boxes are not an uncommon site), and failing that you can run sysinternals procmon/procexp even on Windows Core, so using those to locate missing dependencies could help. There is also Dependencies.

Note: by «Windows Core» in this answer I mean Core option of Windows Server

answered Aug 19, 2019 at 0:13

Andrew Savinykh's user avatar

Andrew SavinykhAndrew Savinykh

25.2k17 gold badges103 silver badges158 bronze badges

#c #windows #debugging #visual-studio-code #exit-code

Вопрос:

Как я уже упоминал выше, я не могу успешно запустить свой код. есть ли что-нибудь, что я могу изменить в своих настройках, чтобы запустить свою программу ?

извините, если мой вопрос не имеет смысла.____Я новичок ____

задачи.json

 {
    "version": "2.0.0",
    "tasks": [
      {
        "type": "shell",
        "label": "C/C  : g  .exe build active file",
        "command": "C:Program Filesmingw-w64x86_64-8.1.0-posix-seh-rt_v6-rev0mingw64bing  .exe",
        "args": ["-g", "${file}", "-o", "${fileDirname}${fileBasenameNoExtension}.exe"],
        "options": {
          "cwd": "${workspaceFolder}"
        },
        "problemMatcher": ["$gcc"],
        "group": {
          "kind": "build",
          "isDefault": true
        }
      }
    ]
  }
 

Я не могу даже отлаживать!

запуск.json

 {
    "version": "0.2.0",
    "configurations": [
      {
        "name": "g  .exe - Build and debug active file",
        "type": "cppdbg",
        "request": "launch",
        "program": "${fileDirname}${fileBasenameNoExtension}.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "C:Program Filesmingw-w64x86_64-8.1.0-posix-seh-rt_v6-rev0mingw64bingdb.exe",
        "setupCommands": [
          {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
          }
        ],
        "preLaunchTask": "C/C  : g  .exe build active file"
      }
    ]
  }
 

Комментарии:

1. 3221225781 декодер

2. Что, вероятно, означает, что ваша двоичная папка mingw не находится в переменной среды PATH.

При попытке установить программу на вашем компьютере с Windows, Если вы видите “ShellExecuteEx failed” в сопровождении различных кодов, то этот пост поможет вам.

Сопутствующие коды ошибок могут быть: 2, 5, 67, 255, 1155, 1460, 8235, 2147221003, и т.д. Эта ошибка обычно возникает, если установщик требует прав администратора, файл установки был поврежден или существует конфликт приложений.

ShellExecuteEx — это функция ОС, которая выполняет операцию над указанным файлом. Если операция завершится неудачно, вы получите эту ошибку.

  1. Запустите исполняемый файл от имени администратора
  2. Повторно загрузите или переустановите программу
  3. Запустить Средство Проверки Системных Файлов
  4. Сброс звуков по умолчанию.

Давайте подробно рассмотрим эти методы.

Попробуйте запустить приложение от имени администратора

Запуск приложений с правами администратора. Даже если приложение не удается запустить, попробуйте переустановить приложение с правами администратора. Просто щелкните правой кнопкой мыши на файле установщика и нажмите кнопку Запуск от имени администратора.

Запуск с правами администратора
Запуск с правами администратора

Загрузите установщик еще раз, а затем установите повторно

Иногда, когда вы загружаете любое приложение для установки, вы возможно столкнулись с ситуацией, когда программа установки не будет работать и приложение не будет установлено. Это может произойти из-за поврежденного или файла установщика.

Попробуйте загрузить то же самое с официального сайта приложения или любого доверенного источника. Также можно отключить антивирус на время установки и далее добавить приложение в исключения антивируса ( Внимание!!, вы должны быть уверены, что в этом файле нет вирусов или он из надежного источника)

Здесь вы можете приобрести ключ лицензии Windows 10 Pro 2020. Вы сразу же получаете ваш собственный уникальный ключ активации. После ввода лицензионного ключа вы начинаете использовать лицензионную операционную систему без ограничений, а также получать последующие пакеты обновлений, выпускаемые Microsoft.

Запустите сканирование SFC

Запуск сканирования SFC делается для замены потенциально поврежденных системных файлов. Таким образом, если ошибка возникает из-за поврежденного системного файла, то следующие шаги должны помочь вам исправить ошибку.

SFC scan не только находит проблемный системный файл, но и исправляет его.

Нажмите Клавишу Win + X . Откроется меню быстрого доступа.
Нажмите на Windows PowerShell (администратор) . Если вместо PowerShell отображается Командная строка, выберите пункт Командная строка (администратор) .

Windows PowerShell c правами администратора
Windows PowerShell c правами администратора

Выполните команду: sfc /scannow
Подождите несколько секунд, так как требуется время для завершения сканирования.
Если проблема в этом, то ошибка должна быть решена.

сканирование SFC.jpg
сканирование SFC.jpg

Но если есть действительно большая проблема, то вы можете столкнуться с сообщением, говорящим: «Windows Resource Protection нашел поврежденные файлы, но не смог исправить».

Вам просто нужно перезагрузить машину в безопасном режиме и снова запустить вышеуказанную команду.

Сброс системных звуков по умолчанию

Вы можете подумать, что как сброс системного звука по умолчанию может решить системную ошибку, такую как “ShellExecuteEx”? Но некоторые пользователи сообщили, как этот шаг решил их проблему.

Откройте диалоговое окно Выполнить, нажав клавишу Win + R.

И введите mmsys.cpl нажмите Enter.

Нажмите на вкладку Звуки. Выберите «По умолчанию» в звуковой схеме.

Нажмите на кнопку Применить, а затем на кнопку ОК.

Сброс системных звуков Windows 10
Сброс системных звуков Windows 10

Понравилась статья? Поделить с друзьями:
  • Ошибка shellexecuteex сбой код 255
  • Ошибка shellexecuteex failed code 2
  • Ошибка sfh на котле vaillant
  • Ошибка shell32 dll windows 98
  • Ошибка sfc scannow и повреждение windows 10