Issue Type: Bug
This occurs on my Node.js project as backend API. I’ve observed the pattern as:
- whenever it’s run as «Disable all breakpoints» or no breakpoints at all.
- then «Disable all breakpoints», «Enable all breakpoints» will run ok.
This is related to this «Unbound breakpoints»:
https://stackoverflow.com/questions/64589447/unbound-breakpoint-vs-code-chrome-angular/68323650#68323650
On a side note for this SO issue, I’m also running Angular v11 UI project. The way I discovered this not-hitting-breakpoint issue is most of work is on UI, and sometimes the debug execution not hitting any breakpoint at all, yet no errors printed on console, nor terminal, but execution at browser was not going anywhere, like died in the middle without any error. Meanwhile, all standalone browsers Chrome and Edge are running fine meaning they reach the expected result, not kind of execution seems lost (not hanging). After applying all fixes mentioned in this SO except «devtoolModuleFilenameTemplate: ‘[absolute-resource-path]'», UI project hits breakpoint always! Did I have this issue before? My memory is not before mid-June.
Because my API project is much smaller, so sometimes I simply disabled breakpoints, then this «Process exited with code 3221225477» came up.
I tried to do «code —crash-reporter-directory » following https://github.com/microsoft/vscode/wiki/Native-Crash-Issues. New dump folder contains only metadata and settings.dat, «reports» folder is empty so no dump file is available for report.
Thank you!
VS Code version: Code 1.59.0 (379476f, 2021-08-04T23:13:12.822Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 23.89GB (14.85GB free) |
Process Argv | —crash-reporter-directory C:UsersmeDocumentsCanDelVSCDump |
Screen Reader | no |
VM | 0% |
Extensions (10)
Extension | Author (truncated) | Version |
---|---|---|
openssl-configuration-file | gee | 0.0.1 |
vscode-pull-request-github | Git | 0.29.0 |
regionfolder | map | 1.0.15 |
python | ms- | 2021.3.680753044 |
vscode-pylance | ms- | 2021.8.0 |
jupyter | ms- | 2021.3.684299474 |
cpptools | ms- | 1.5.1 |
debugger-for-chrome | msj | 4.12.12 |
debugger-for-edge | msj | 1.0.15 |
sonarlint-vscode | Son | 2.0.0 |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt700cf:30270857
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlangct:30333562
binariesv615:30325510
vsccppwt:30329788
pythonvssor306:30344512
bridge0708:30335490
vstre464cf:30346473
AfoBaron 0 / 0 / 0 Регистрация: 27.03.2015 Сообщений: 2 |
||||
1 |
||||
27.03.2015, 21:42. Показов 18527. Ответов 2 Метки нет (Все метки)
При компиляции выходит ошибка return value 3221225477. Помогите исправить ошибку. Версия Dev C++ 5.9.2.Может ли ошибка быть из-за версии.
__________________
0 |
2549 / 1208 / 358 Регистрация: 30.11.2013 Сообщений: 3,826 |
|
27.03.2015, 21:45 |
2 |
в 9 строке используете i но она не инициализирована еще
1 |
0 / 0 / 0 Регистрация: 13.02.2018 Сообщений: 1 |
|
13.02.2018, 09:01 |
3 |
В двумерном массиве у тебя будит a*b элементов, а не a+b (то есть 9, а не 6).
0 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector <string> words;
void splitSent (string sent);int main ()
{
string sent;
cout << "Enter your sentence: " << endl;
getline (cin, sent);
splitSent (sent);string finalSent;
for (unsigned int i = 0; i < words.size(); i++)
{
if (words[i] == "i")
{
finalSent += "I ";
i++;
}
if (words[i] == "instructor")
{
finalSent += "name of prof ";
i++;
}
finalSent += words[i];
finalSent += " ";
}
cout << "Final sentence is: " << finalSent << "." << endl;return 0;
}void splitSent (string sent)
{
int Pos = 0; // Position
string word;
while (Pos < sent.length())
{
while ((Pos < sent.length()) && (sent[Pos] != ' '))
{
word += sent[Pos];
Pos++;
if (sent[Pos] == '.')
{
break;
}
};
words.push_back(word);
word = "";
Pos++;
}
}
Пока это моя программа, я пытаюсь заменить «я» на «я» и заменить «инструктор» именем моего проф. Однако каждый раз, когда в предложении более двух «я», я получаю сообщение об ошибке и не знаю почему. Я также получаю то же сообщение об ошибке, если в моем предложении есть слово «инструктор»
0
Решение
нет необходимости вручную увеличивать i
, Вот что for
петля делает кстати. Увеличивая i
вы превышаете размер вектора и, очевидно, получаете доступ к неопределенной памяти
string finalSent;
for (unsigned int i = 0; i < words.size(); i++)
{
if (words[i] == "i")
{
finalSent += "I ";
continue;
//i++;
}
if (words[i] == "instructor")
{
finalSent += "name of prof ";
continue;
//i++;
}
finalSent += words[i];
finalSent += " ";
}
1
Другие решения
Как Obicere упомянул в комментариях, вы, вероятно, получаете ошибку сегментации, потому что вы увеличиваете i
вручную, а затем попросить words[i]
, Вы, вероятно, получали только segfault, когда «i» или «инструктор» были в конце предложения, когда переменная i
было уже так высоко, как и должно быть. Но тогда ты сделал i++
, так i
был один больше, чем должно быть, и words[i]
просит элемент words
это прошло его конец. Вот как происходят сегфолты.
Вы должны быть более осторожными с вашим if
заявления и что происходит после них. Кстати, использование глобальных переменных — плохая идея. В этом случае вы не должны определять words
в верхней части вашего файла, но вы должны передать его по ссылке. Кроме того, хороший редактор (emacs или vim) может привести ваш код в порядок.
Я не совсем уверен, что вы хотели, поэтому я мог испортить управление потоком, но этот код должен быть намного ближе к тому, что вы хотите.
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void splitSent (string sent, vector<string>& words);
int main () {
string sent;
vector<string> words;
cout << "Enter your sentence: " << endl;
getline(cin, sent);
splitSent(sent, words);
string finalSent;
for (unsigned int i = 0; i<words.size(); i++) {
if (words[i] == "i") {
finalSent += "I";
} else if (words[i] == "instructor") {
finalSent += "name of prof";
} else {
finalSent += words[i];
}
if (i<words.size()-1) { // Don't put a space before the period
finalSent += " ";
}
}
finalSent += ".";
cout << "Final sentence is: " << finalSent << endl;
return 0;
}
void splitSent (string sent, vector<string>& words) {
int Pos = 0; // Position
string word;
while (Pos < sent.length()) {
while ((Pos < sent.length()) && (sent[Pos] != ' ')) {
word += sent[Pos];
Pos++;
if (sent[Pos] == '.') {
break;
}
}
words.push_back(word);
word = "";
Pos++;
}
}
0
- Forum
- General C++ Programming
- Process exited with value 3221225477
Process exited with value 3221225477
Hello, I’m kinda new to programming. I was asked to write a program about network flow. but when i try to run my code, it returns with an unexpected error and crashes. return value is given in the title. Do you know anyting about the issue?
Oh by the way, when i remove the line when i call the method below, it returns 0 as normal. Though the output is not what i want. I could really use some help.
Thanks in advance!
|
|
I can post my whole code if you want. Thanks!
Yes, please post more of the code. The part you’ve shown looks OK.
You may also want to use a debugger to find out where it is crashing and why.
visited.resize(graphSize);
I think this is your problem. This line should be inside of a function, so try moving it to one of the earlier lines in your main function.
That error probably means you are going out of bounds on your vector somewhere but it is hard to tell. I recommend you post more of your code.
I agree that resizing in global scope is a bad idea though.
Last edited on
If the TC really had that line in global scope, the program wouldn’t compile. I suspect that this is just trying to show the parts TC thinks is relevant.
^ That.
Maybe graphSize has a invalid size tho.
IRRELEVANT TO THE OP:
You cannot execute function calls on the global scope, unless you store the return value somewhere.
|
|
Last edited on
sorry for the inconvenience, i’m not resizing in global scope. it’s in a function. I also tried with iterator instead of for loop, result was the same. Anyway, here’s my full code:
|
|
does anyone know what this return value is about? i could really use some help
yes, I just realized that in line 136 there’s a useless «-1». now i change it to
graph.at(node).erase(graph.at(node).begin()+i);
instead of
graph.at(node).erase(graph.at(node).begin()+i-1);
it seems like i’ve fixed the problem. Still don’t understand why it returned 0 when i deleted makeUnvisited method below.
|
|
Again, thanks so much!
Last edited on
+1 for using a debugger to find out where it’s crashing and what the state of your memory is at that point.
One thing to bear in mind is that a vector of bool doesn’t behave exactly as a vector of any other type does, but uses a specialised implementation:
http://www.cplusplus.com/reference/vector/vector-bool/
I’m no expert in exactly what those differences are, but it may be that you’re doing something with that vector that would be appropriate for a normal vector, but not for vector<bool>.
EDIT: Ninja’d by shadow fiend, while I was interrupted in writing my reply.
Last edited on
so do you think it would be better for me to use a vector of int and store only 1’s and 0’s?
Well, if you’ve found the problem, and it was nothing to do with using a vector of bool, I don’t see any reason to change. The reason for having a specialisation for bool is to have increased memory efficiency. Unless you come across other problems relating to the specialisation, I’d say it’s best to keep it as it is.
|
|
it should be :
|
|
Topic archived. No new replies allowed.
#1
holodok
-
- Members
- 2 Сообщений:
Newbie
Отправлено 05 Январь 2012 — 20:14
Здравствуйте, хочу проконсультироваться о сообщении в утилите DrWebCureIt!
При попытке запустить утилиту DrWebCureIt! ее работа сразу останавливается и выдается сообщение о наличии вируса RC=3221225477. Сообщается, что вирус находится в папке карантина утилиты. Далее из утилиты можно только выйти. Перезапустить или изменить ее настройки нельзя. То же самое и в безопасном режиме. Папка карантина пуста.
Почитав в интернете и здесь на форуме темы повещенные RC=3221225477 не понимаю это сбой или вирус.
Использую файервол Комодо, антивирус Аваст и раз в неделю утилиту DrWebCureIt! Это связка используется несколько лет. Проблем не было.
Например вот тут говорится, что это сбой:
http://forum.drweb.c…77&fromsearch=1
а вот тут описывается метод лечения:
http://www.adminplanet.ru/t4286.html
Логи не выкладываю так как прошу только ответить на вопрос RC=3221225477 это вирус или сбой в работе программ. И где можно прочитать о лечении если это вирус.
Заранее спасибо.
- Наверх
#2
Aleksandra
Aleksandra
-
- Helpers
- 3 529 Сообщений:
VIP
Отправлено 05 Январь 2012 — 21:37
а вот тут описывается метод лечения:
http://www.adminplanet.ru/t4286.html
Кроме убиения легитимных файлов скриптами AVZ и использования третьесортных утилит типа MBAM я ничего в этой теме не увидела.
13.00.0 (04-04-2022 05:00:00) / Linux 5.10.0-18-amd64 x86_64; Debian GNU/Linux 11.5; glibc 2.31 / PostgreSQL 13.8
- Наверх
#3
Dmitry Shutov
Dmitry Shutov
-
- Virus Hunters
- 1 652 Сообщений:
Poster
Отправлено 05 Январь 2012 — 22:11
Здравствуйте, хочу проконсультироваться о сообщении в утилите DrWebCureIt!
При попытке запустить утилиту DrWebCureIt! ее работа сразу останавливается и выдается сообщение о наличии вируса RC=3221225477. Сообщается, что вирус находится в папке карантина утилиты. Далее из утилиты можно только выйти. Перезапустить или изменить ее настройки нельзя. То же самое и в безопасном режиме. Папка карантина пуста.
Почитав в интернете и здесь на форуме темы повещенные RC=3221225477 не понимаю это сбой или вирус.
Использую файервол Комодо, антивирус Аваст и раз в неделю утилиту DrWebCureIt! Это связка используется несколько лет. Проблем не было.
Например вот тут говорится, что это сбой:
http://forum.drweb.c…77&fromsearch=1
а вот тут описывается метод лечения:
http://www.adminplanet.ru/t4286.html
Логи не выкладываю так как прошу только ответить на вопрос RC=3221225477 это вирус или сбой в работе программ. И где можно прочитать о лечении если это вирус.
Заранее спасибо.
Это не вирус, об этом уже писали, при сканировании Кюритом, отключайте все щиты Аваста, Аваст стал блокировать Кюрит, все вопросы к разработчикам Аваста.
- Наверх
#4
holodok
holodok
-
- Members
- 2 Сообщений:
Newbie
Отправлено 06 Январь 2012 — 14:06
Это не вирус, об этом уже писали, при сканировании Кюритом, отключайте все щиты Аваста, Аваст стал блокировать Кюрит, все вопросы к разработчикам Аваста.
Спасибо за ответ.
- Наверх