13,606 questions
0 votes
0 answers
166 views
Can a segfault occur if you are doing iterator arithmetic ops beyond limits?
it -> a random valid vector iterator const int kLookAheadIndex -> a random number auto it_ahead = std::max(it - kLookAheadIndex, path.cbegin()); // get a look-ahead point to look at I know ...
-4 votes
0 answers
102 views
SIGSEV signal after method call - How do pointers work after pass-by-reference?
While implementing a Dijkstra-Search on a Graph, I call a seperate method to perform the search, handing it a pointer to my nodes and direct values for start/endpoint and array size. Notably,t he ...
-5 votes
1 answer
137 views
Why is this C++ program giving a "Segmentation Error" on line 84? [closed]
I'm doing an assignment for an engineering course I'm taking, and I'm testing my code as I go along. For some reason, it gives an error when I compare an array element to a value passed into my ...
0 votes
1 answer
92 views
C++ segmentation fault when throwing in ordered OMP parallel for
the code below crashes with terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >' Aborted ...
-5 votes
2 answers
273 views
How to try catch finally in c
I want to try catch the free(hello); so that the free(world); can still be executed for freeing all allocated memory in the main program. int main() { const char *hello = "Hello World"; ...
3 votes
5 answers
264 views
Why does strlen(NULL) cause a compile-time warning, while my custom ft_strlen(NULL) only crashes at runtime?
I'm trying to reimplement the standard strlen function in C, and I'm closely replicating its behavior. I defined my function based on standard C declaration for strlen: size_t ft_strlen(const char *s);...
3 votes
1 answer
103 views
I am getting segmentation fault on this x86 assembly program
So i am trying to write basic string to integer function in x86 asm. I know there is a problem in my function str2int but i don't know which state causes error. #string2integer.s .data number: .long 0 ...
0 votes
0 answers
54 views
SIGSEGV in boost::stacktrace::frame::source_line when accessing thread_local storage on macOS 15 Clang 17 intel; Boost bug or Clang bug or macOS bug?
We have a C++20 library that compiles several Boost modules and statically links their object files into our shared library. One of those modules is Boost.Stacktrace. We compile this library, and a ...
0 votes
0 answers
87 views
Experimenting with EncryptMessage win32 function getting segmentation fault
I want to test the EncryptMessage and DecryptMessage functions to encrypt and decrypt a simple string using my machine's (current process's) credentials. But I am getting a segmentation fault: ...
0 votes
2 answers
118 views
Basic Quill logging example segfaults?
I'm trying to run the basic console Quill logging library example found here: #include "quill/Backend.h" #include "quill/Frontend.h" #include "quill/LogMacros.h" #include ...
3 votes
3 answers
144 views
How to alter the datatype of a Column?
I want to change the data type of a column of a table in a DuckDB Database. With query2_c= ALTER TABLE populationShort ALTER Year SET DATA TYPE DATE; (C Language Binding) I get Segmentation fault (...
0 votes
1 answer
57 views
SIGSEGV in new FxCanvas
I am trying to create a java FX based visual in an editor. As a first step I tried to create an FXCanvas like this: public class ModelEditorView extends EditorPart { public static String ID = &...
0 votes
0 answers
38 views
Freeze after logging in on specific user gnome 48.0 on fedora
After logging in system freezes (nothing works, only reboot helps). In dmesg I found that: [ 6761.970234] gnome-shell[8652]: segfault at 0 ip 00007fa0b4e93e24 sp 00007ffdfeb10a90 error 4 in libgio-2.0....
4 votes
1 answer
106 views
Segfault due to conflicting types in independent compilation units (g++)
I came across an issue that leads to a segfault and I'm totally in the dark as to why this is happening. I managed to recreate the issue in a fairly minimal working example, see below. I was trying to ...
0 votes
0 answers
90 views
Segmentation Fault : Using LVGL on Raspberry Pi
I have been developing a head's up display for a formula student car: void fill_bar(lv_obj_t *canvas_obj, lv_coord_t center_x, lv_coord_t center_y, lv_coord_t radius1, lv_coord_t radius2,...