Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I have tried searching for this online, but I haven't had any luck. I'm hoping there are some theories here. We were able to get our code to crash on this line:
pipe = popen(cmd, "w");
cmd has recently been allocated, but the allocation was checked to verify that it wasn't null and inspecting the core file reveals that it is indeed a valid string. I'm curious what else would cause popen to segfault if the parameters passed in are valid ? Will popen segfault if there are no more available file descriptors on the system? Are there any other things I can look into for why this might've failed?
Thanks.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
I've been working on some C++ code that a friend has written and I get the following error that I have never seen before when compiling with gcc11.1:
enter image description here
enter image description here
Generally speaking, what does this error mean? What should I be looking for when this type of error occurs?
I have tried to compile with several versions of gcc, but without much success
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
}
but when I run it it says segmentation fault and apart from that, I don't know if the code is correct.
You have a j++ at line 18 that was almost certainly supposed to be a g++. Also, your x+=g; on line 19 is probably supposed to be an x++. You only want to add one each time.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
WildcardFileFilter wavFiles = WildcardFileFilter("*.wav", "", "wavFiles");
fileChooser = new FileBrowserComponent(
FileBrowserComponent::FileChooserFlags::openMode
| FileBrowserComponent::FileChooserFlags::canSelectFiles
| FileBrowserComponent::FileChooserFlags::canSelectDirectories,
File("/Users/harrygardiner/Desktop"), &wavFiles, nullptr);
I'm trying to isolate .wav files in my audio application but it keeps telling me I have bad access problems, why is this?
Your wavFiles lives on the Stack. fileChooser is probably outliving wavFiles and then tries to access it resulting in undefined behaviour.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
So I'm brand new to c++ and just started the beginner class. The professor has given us the exact prompt to put into the program and I am still receiving an error. I have checked over and over for any small flaws such as spacing or random ";" that a lot of people seem to do, but still no results. Can anyone see anything wrong with what I have down?
Remove asterisk (*) right below "//Purpose of this program ..." and try it again.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I got a segmentation fault when trying to use one cpp file and tried to locate the error using Valgrind, but I'm confused.
Since the code is very large, I will only post a short portion of it below:
It looks like you are running valgrind on the compiler. Unless you are trying to debug the compiler, you should be running valgrind on your application instead:
valgrind --leak-check=yes ./MyApp
(replace ./MyApp with the appropriate executable name and arguments, of course)
(Explanation: valgrind is a run-time analysis tool; it takes your application as input. It is not a compiler tool like some of the other debugging tools that are out there)