segmentation-fault

Is it a problem to turn off power to a running QSerialPort?

瘦欲@ 提交于 2019-12-11 17:42:05
问题 I'm developing an application with several serial ports. Each of these ports is handled by a different thread and has its own QSerialPort object. From a hardware point of view, they are connected hierarchicaly, meaning that there is one main device connected to the PC with a usb cable (1 COM port), to this main device there are several other devices connected, each of them having its own COM port. The main device can turn on/off the power supply to these child ports. In the application, the

AddressSanitiser: SEGV on unknown address

你。 提交于 2019-12-11 16:52:40
问题 I am getting the error SEGV on unknown address while running my program. I am pretty sure it is coming from fgets() but i am not quite sure why. Before this, I was using scanf() and it was working fine. the input was going into the array just fine, but I had to use fgets() for the program to detect an input of a new line. Can anyone help me understand why I am getting this error and suggest a way to fix this problem? #include <stdio.h> #include <stdlib.h> int main(void) { int x = -1; int y =

bytes were returned when we access the structure member and Segmentation fault occurs when printing structure variable address [duplicate]

纵然是瞬间 提交于 2019-12-11 15:53:23
问题 This question already has answers here : Crash or “segmentation fault” when data is copied/scanned/read to an uninitialized pointer (5 answers) Closed last year . I created one struct and assigned one pointer variable to that structure. When I tried to print the address of that variable it prints correctly. After assign value to one of the member of the structure using this pointer structure variable, when i tried to print the address of the pointer variable I got segmentation fault .

Not so Useful Error — Segmentation Fault (Core Dump) in Homework Assignment

喜你入骨 提交于 2019-12-11 15:11:56
问题 When compiling a program containing this particular function, /* * Function read_integer * * @Parameter CHAR* stringInt * * Parameter contains a string representing a struct integer. * Tokenizes the string by each character, converts each char * into an integer, and constructs a backwards linked list out * of the digits. * * @Return STRUCT* Integer */ struct integer* read_integer( char* stringInt ) { int i, n; struct integer *curr, *head; int numDigits = strlen( stringInt ); // Find the

Wrote a function for a prewritten main and received a seg fault that I can't spot

你离开我真会死。 提交于 2019-12-11 14:52:19
问题 Heres my code and I can't figure out why I keep getting a segmentation fault when I run the main. The main was prewritten and I didn't manipulate it. The function compiles without error and the data file that is scanned in exists in the directory. double getMin(char csvfile[], char column[]) { FILE *csvFile=fopen(csvfile, "r"); int i=isValidColumn(*column); if(i==0) return -1.0; char line[3001]; fgets(line, 3001, csvFile); double min=100.0; char *start=line; int chapter=0; int count=0; int

Is it possible in C to always make a segfault at 1 over the array size?

别等时光非礼了梦想. 提交于 2019-12-11 14:13:24
问题 Suppose you allocate some array arr size n as follows: int arr[n]; // Allocated fine printf("%d", arr[n]); // Segfault if possible Is there such a number n that exists whereby I can always trigger a segfault on the printf line? This could be specific to some OS. I know its undefined behavior, and I know when accessing it and changing it out of bounds will affect another area of memory that will (likely) cause me major problems later on. My professor said that it will not always segfault, and

How do I replace/update the version of the expat library used by Apache?

独自空忆成欢 提交于 2019-12-11 14:12:06
问题 (Disclaimer: I just started using Linux and don't have much experience with configuring Apache and Python.) I have a rather common issue that is explained in more depth here http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary. Basically, I'm 99% sure that my main issue is that my Apache is using version 1.95.7 of the expat library, whereas my Python is using version 2.0.1 of the expat library; thus, when I use them together I get a segmentation fault. As is explained in the link at

Segmentation Fault Error in C

让人想犯罪 __ 提交于 2019-12-11 14:06:57
问题 Hi i'm a new programmer for C, i get a segmentation fault in my linked list program, i was wondering if anyone could help me out. I've posted my code below... If you need furthure information I will post it. Thanks. #include "list.h" //+------------------------------------------------------------- //+ CREATE NODE //+ //+ Allocate memory for a node of type struct node and //+ initialize it with d. Return a pointer to the new node. //+------------------------------------------------------------

R / igraph : any call to get/set vertex attribute within a depth-first-search callback causes a segfault

前提是你 提交于 2019-12-11 14:05:26
问题 I'm finding that any call to get/set vertex attribute using the igraph library within callback causes a segfault in R. For example, the trivial callback from a segment of code: dfsCallBack <- function(graph, data, extra) { cat("in:", paste(collapse=", ", data), "\n") distFromRoot <- data[2] vertexID <- data[1] set.vertex.attribute(graph, 0, name = 'color', value = 'blue') FALSE } graph.dfs(g, 1, in.callback = dfsCallBack) Produces this error: graph.dfs(g, 1, in.callback = dfsCallBack) in: 0,

Qt GraphicWebView Segmentation fault (sigsegv) when loading cesiumJS with Natural earth

こ雲淡風輕ζ 提交于 2019-12-11 13:52:38
问题 I created a Qt widget project and added a webEngine or webKit. On webEngine or webKit I set the url to a localhost and loaded the CesiumJS default HelloWorld.html. JUST IT. When I selected "natural earth" as map, the application has trhow a SIGSEGV error (segmentation fault). What in Qt can throw this error? how can i avoid this. Is there any webView configuration (memory limit, Local Storage, etc)? This is my Main.qml import QtQuick 2.5 import QtQuick.Window 2.2 import QtWebEngine 1.1 Window