Runtime error 3221225477

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 &quot...

Issue Type: Bug

This occurs on my Node.js project as backend API. I’ve observed the pattern as:

  1. whenever it’s run as «Disable all breakpoints» or no breakpoints at all.
  2. 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.Может ли ошибка быть из-за версии.

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<stdio.h>
#include<conio.h>
int main() {
    int i,j;
    int a[3][3]= {3,5,2,16,8,9};
    int stroka=0;
    int stolb=0;
    for (j=0; j<3; j++) {
        stroka=stroka+a[i][j];
    }
    for(i=0; i<3; i++) {
        stolb=stolb+a[i][2];
    }
    printf("%d",stroka);
    printf("%d",stolb);
    getch();
}

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



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!

1
2
3
4
5
6
7
8
vector <bool> visited; // vector to determine each node is visited or not.
visited.resize(graphSize);

void makeUnvisited(){
	for(int j=0; j<visited.size(); j++){
		visited[j]=false;
	}
}

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.

1
2
3
4
5
6
// Example: You cannot do this:
strcpy(a,b);
// But you can do this:
char* p_random_name = strcpy(a,b);
// Or
char* p_random_name_2(strcpy(a,b));

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#include <iostream>
#include <vector>
#include <fstream>
#include <stack>

using namespace std;
int studentNum;
int courseNum;
int graphSize;
int tempN, tempC;
stack <int> nodeStack;
vector <int> courseQuotas;
vector <bool> visited(2);

class Student{
public:
	int name;
	int courseCount;
	vector <int> givenCourses;
	vector <int> wantedCourses;
public:	
	Student(){
		name=0;
	}
	Student(int x, int y){
		courseCount=y;
		name=x;
	}
	void addCourses(int x){
		wantedCourses.push_back(x);
	}
};
class Edge{
public:	
	int s,t,weight, marked;
	Edge(){
		s=0;
		t=0;
		weight=1;
		marked=-1;
	}
	Edge(int x, int y){
		s=x;
		t=y;
		weight=1;
		marked=-1;
	}
	Edge(int x, int y, int z){
		s=x;
		t=y;
		weight=z;
		marked=-1;
	}
	void changeMark(){
		marked=(-1)*marked;
	}
	Edge reverse(){
		return Edge(t, s, weight);		
	}
	Edge& operator=(const Edge &v){
		if(this!=&v){
			s=v.s;
			t=v.t;
			weight=v.weight;
			marked=v.marked;
		}
		return *this;
	}
	//Destructor
	~Edge(){

	}
};


vector <Student> students;
void readFile(){
	ifstream input;
	input.open("project4.gir");
	input >> studentNum;
	input >> courseNum;
	for(int i=0; i<studentNum; i++){
		input >> tempN;
		input >> tempC;
		students.push_back(Student(i, tempC));
		for(int j=0; j<tempN; j++){
			int course;
			input >> course;
			students.at(i).addCourses(course);
		}
	}
	for(int i=0; i<courseNum; i++){
		int quota;
		input >> quota;
		courseQuotas.push_back(quota);
	}
	graphSize=2+studentNum+courseNum;
	input.close();
}
vector < vector <Edge> > graph;
void createGraph(){
	graph.resize(graphSize);
	visited.resize(graphSize);
	for(int i=0; i<graphSize; i++){
		visited.at(i)=false;
	}
	for(int i=0; i<studentNum; i++){
		graph.at(0).push_back(Edge(0, i+1, 1));
		for(int j=0; j<students.at(i).wantedCourses.size(); j++){
			graph.at(i+1).push_back(Edge(i+1, studentNum+students.at(i).wantedCourses.at(j) , 1));
		}
	}
	for(int i=0; i<courseNum; i++){
		if(courseQuotas.at(i)!=0){
			graph.at(i+1+studentNum).push_back(Edge(i+1+studentNum, 1+studentNum+courseNum , courseQuotas.at(i)));
		}
	}
}
void dfs(int vertex){
	nodeStack.push(vertex);
	visited.at(vertex)=true;
	if(vertex==graphSize) return;
		while(!nodeStack.empty()){
			int node = nodeStack.top();
			nodeStack.pop();	
			if(visited.at(graphSize-1)) break;
			for(int i=0; i<graph.at(node).size(); i++){
				if(!visited.at(graph.at(node).at(i).t)){
					nodeStack.push(graph.at(node).at(i).t);
					visited.at(graph.at(node).at(i).t)=true;
					cout << "Going from " << graph.at(node).at(i).s << " to " << graph.at(node).at(i).t << endl;				
					if(i<=studentNum){
						Edge temp = graph.at(node).at(i).reverse();
						temp.changeMark();
						graph.at(graph.at(node).at(i).t).push_back(temp);
						graph.at(node).erase(graph.at(node).begin()+i-1);
					}
					break;
				}
			}
		}
		visited.at(graphSize-1)=false;
		cout << "----------------------------" << endl;
}
void makeUnvisited(){
	vector<bool>::iterator it;
	for(it=visited.begin(); it<visited.end(); it++){
		visited.at(*it)=false;
	}
}
int main(){
	readFile();
	createGraph();
	/*
	for(int i=0; i<graph.size()-1; i++){
		cout << "The edges from node " << i << ": " << endl;;
		for(int j=0; j<graph.at(i).size(); j++){
			cout << "	Source node: "<< graph.at(i).at(j).s << endl; 
			cout << "	Target node: "<< graph.at(i).at(j).t << endl; 
			cout << "	Weight of the edge: "<< graph.at(i).at(j).weight << endl; 
			cout << "		---" << endl;
		}
		cout << "--------------------------" << endl;
	}
	*/
	for(int i=0; i<studentNum; i++){
		dfs(0);
		makeUnvisited();
	}	
return 0;
}

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.

1
2
3
4
5
6
 void makeUnvisited(){
	vector<bool>::iterator it;
	for(it=visited.begin(); it<visited.end(); it++){
		visited.at(*it)=false;
	}
}

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.

1
2
3
4
5
6
 void makeUnvisited(){
	vector<bool>::iterator it;
	for(it=visited.begin(); it<visited.end(); it++){
		visited.at(*it)=false;
	}
}

it should be :

1
2
3
4
5
6
void makeUnvisited( )
{
    // replace auto w/ vector<bool>::iterator if you have not enabled -std=c++11
    for( auto it = visited.begin(); it != visited.end(); ++it )
        *it = false;
}

Topic archived. No new replies allowed.

#1

holodok

    Newbie

  • Members
  • 2 Сообщений:

Отправлено 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

    VIP

  • Helpers
  • 3 529 Сообщений:

Отправлено 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

    Poster

  • Virus Hunters
  • 1 652 Сообщений:

Отправлено 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

    Newbie

  • Members
  • 2 Сообщений:

Отправлено 06 Январь 2012 — 14:06

Это не вирус, об этом уже писали, при сканировании Кюритом, отключайте все щиты Аваста, Аваст стал блокировать Кюрит, все вопросы к разработчикам Аваста.

Спасибо за ответ.

  • Наверх


Понравилась статья? Поделить с друзьями:

Читайте также:

  • Runtime error 5981 application defined or object defined error как исправить
  • Runtime error 3163
  • Runtime error 217 at 00426cd2
  • Runtime error 316 415 внутренняя ошибка
  • Runtime error 217 at 00420f8b

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии