FAQ Database Discussion Community


Qt OpenCV - SIGSEGV when displaying transformed frames

c++,qt,opencv,sigsegv
I have an app that has to pull frames from video, transform one a little, transform one a lot, and simultaneously display them in GUI. In a worker thread, there's an OpenCV loop: while(1) { cv::VideoCapture kalibrowanyPlik; kalibrowanyPlik.open(kalibracja.toStdString()); //open file from url int maxFrames = kalibrowanyPlik.get(CV_CAP_PROP_FRAME_COUNT); for(int i=0; i<maxFrames; i++)...

How to tell valgrind to ignore SIGSEGV

jni,valgrind,sigsegv
I have a C++/JNI program that runs fine standalone but exits with SIGSEGV when run with valgrind. I've verified that the signal is thrown from the exact same spot as when running the program in the gdb debugger. In the context of gdb the issue is well explained here: Strange...

c struct pointer array allocate sigsegv

c,arrays,pointers,struct,sigsegv
I'm new to c and I have the following problem: after executing this part of the code TypeDefStruct tdss[10]; for(...) { TypeDefStruct *tds = (TypeDefStruct*)malloc(sizeof(TypeDefStruct)); strcpy(&tds->data, charPointerArray[index]) // works (not original code) memcpy((void*) &tdss[index], (void*) &tds, sizeof(TypeDefStruct)); // new free(tds); // new } an error occurs here TypeDefStruct *tds =...

signal() : any performance impact?

c++,c,exception,signals,sigsegv
I need to catch SIGABRT, SIGSEGV and SIGILL to present the user a proper critical error message when something out of my control fails and the program need to exit. However my program does a lot of realtime computing, so performance is important. Does signal() ( http://www.cplusplus.com/reference/csignal/signal/ ) cause any...

SIGSEGV when trying to acces member of pointer after it was filled by function

c++,pointers,sigsegv
The answer is probably stupidly easy, but I have stared at this code for quiet a while now and I simply can't find the solution. Here is my problem. I have a pointer to a base class. Then I call a function to find an element in a vector of...

STL list segmentation fault on push_back

c++,list,stl,sigsegv
I'm having a problem when using STL's list. I'm loading a digraph in format #of_tests #of_vertexes #of_edges #vertex1 > #vertex2 #vertex3 > #vertex4 ... But I get a SIGSEGV on first call of push_back on my adjacency lists, and I'm really baffled - the array of lists is initialized, so...

Segmentation Fault after 5th scanf

c,scanf,sigsegv
This code gives a Segmentation Fault at the exact 5th line of input. If n<5 or in the debugger everything is fine. scanf("%d %d",&n,&x); m=(int**)malloc(n*sizeof(int)); for(i=0;i<n;i++) { m[i]=(int*)malloc(2*sizeof(int)); } for(i=0;i<n;i++) { scanf("%d %d",&m[i][0],&m[i][1]); }` ...

How to avoid SIGSEGV Errors on FPC compiler?

arrays,lazarus,freepascal,sigsegv
I'm currently having several problems with access violations in the program I'm building for my programming course. It is being build in pascal (the language used by the course) and using the Lazarus IDE (similar to Delphi but open). As far as I know, Access Violations, or SIGSEGV errors, occurs...

log4cpp: two problems about SIGSEGV

c++,sigsegv
I am working on a cpp project under Linux and I want to build a log system to write down some important information into a file. So I use this libraty: log4cpp Here is my code about log4cpp: // class Log head file class Log { public: explicit Log(const char...

GDB and LLDB “swallow” status set by child process in OS X

gdb,fork,osx-yosemite,lldb,sigsegv
Given the following code: #include <stdio.h> #include <signal.h> #include <unistd.h> #include <sys/wait.h> int main(int ac, char** av) { int status; pid_t cpid = fork(); if(0 == cpid) { /* Child */ return *(volatile int*) 0; /* exits with signal 11 */ } else { /* Parent */ do { waitpid(cpid,...