segmentation-fault

Android MultiDex - A/libc(28851): Fatal signal 11 (SIGSEGV), thread 29117 (pool-16-thread-)

巧了我就是萌 提交于 2019-12-11 13:18:14
问题 I am getting this error in my app but only on some devices. So far only a few crashes have been reported. I recently enabled multiDex support and since then it crashes on some of the pre-lollipop devices. A/libc(28851): Fatal signal 11 (SIGSEGV), thread 29117 (pool-16-thread-) There is no other information given in the logcat. I saw some other posts on SO but they are different and don't apply to my case. I guess it has to do with memory usage ? 来源: https://stackoverflow.com/questions

Curious segfault when using Python CTypes union with 4 structs but not less

时光总嘲笑我的痴心妄想 提交于 2019-12-11 13:08:37
问题 I'm running into a curious segfault when trying to interface to a library using Python CTypes. I'm running Python 3.4.0-0ubuntu2 on Kubuntu Trusty 64 bit. The segfault occurs when I use 4 anonymous struct s within a union but not when I use 3 or less, which is most curious. It also occurs only when I try to return a union back to Python in fn2 but not when I just send it from Python in fn1 . The code with 3 struct s which does not segfault: lib.c: #include <stdio.h> typedef union { int data[3

Error while accessing element of array in struct

落爺英雄遲暮 提交于 2019-12-11 13:04:01
问题 I'm trying to write an "ArrayList" program (Similar to the Java ArrayList) that will expand automaticly using realloc, so that the programmer won't have to worry about storage space in arrays. This is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #define ARR_DEFAULT_SIZE 20 #define INCR 10 #define ARRTYPE char // Files using this #undef this macro and provide their own type typedef struct { ARRTYPE *arr; long size; long nextincr; } arrlst; arrlst *nlst

what is root cause of 'child pid 10708 exit signal Segmentation fault (11)' error?

爷,独闯天下 提交于 2019-12-11 12:16:59
问题 I am getting more and more child pid 10708 exit signal Segmentation fault (11) errors. what is the root cause of it and how to fix it ? Is php ini memory is associated with this? I am using apache2 server with php. Thanks in advance. 回答1: It is entirely possible that your memory_limit variable in your php.ini may cause this problem. It certainly did in my case. By lowering the memory_limit , I was able to resolve these errors. 回答2: The root cause is generally that the code is doing something

Segmentation fault occurs in the program sometimes, but not always. How do I correct it?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 11:55:21
问题 My program compiles without any error, and it also executes fine for some inputs. But when I give an upper bound input, the .exe file stops working, and no dump file is created. Please help me out on this one. #include<stdio.h> #include<stdlib.h> #define SIZE 200000 double finval = 32766; void addf(double st); void rec(double** tam, long src, long des, double n, double sum); void op(long u, long v, double** tam, long src, long dest, double n); int main() { double n, m, q; long c, t, i, j, s,

Destructor not working in C++ for anonymous object?

喜你入骨 提交于 2019-12-11 11:43:20
问题 My friend told me C++ allows us to call a member function even if the instance is destroyed from memory. So I write the code below to verify it, but why the value of a can be extracted even after the object was destroyed? I thought there would be a segment fault. #include <iostream> class Foo{ public: Foo(int a = 0){ std::cout << "created" << std::endl; this->a = a; } ~Foo(){ std::cout << "destroyed" << std::endl; } Foo *f(){ std::cout << "a=" << a << std::endl; return this; } private: int a;

I get segmentation fault (core dumped) when I tried to run program with struct

元气小坏坏 提交于 2019-12-11 11:20:11
问题 I need to read a file and store the data from the file into a structure. The first line of the file contains the size of the array of structs that i have to dynamically allocate. 4 12/04/2010 Interview went well I think, though was told to wear shoes. 18/04/2010 Doc advised me to concentrate on something... I forget. 03/05/2010 Was asked today if I was an art exhibit. 19/05/2010 Apparently mudcakes not made of mud, or angry wasps. I am to run my code perfectly in Windows but when I run in

Segmentation Fault with complex regex - Regex.h

走远了吗. 提交于 2019-12-11 11:02:33
问题 I'm trying to find URLs within a large block of text regex_t reg; const char *regex="REGEXGOESHERE"; regmatch_t matches[16]; //Read data into variable filecontent regcomp(&reg, regex, REG_EXTENDED); int offset=0; int j; int found=0; int start,end; while( regexec(&reg, filecontent+offset, 16, matches, 0) == 0) { printf("\n\n"); start = matches[0].rm_so+offset; end = matches[0].rm_eo-1+offset; printf("regex /%s/ at bytes %d-%d\n", regex, start, end); for (j=start; j<=end; j++) { printf("%c"

Segmentation fault (core dumped) runtime error in C

浪尽此生 提交于 2019-12-11 09:52:38
问题 Hi so I am new to C and just wrote my first program in the language and keep getting the segmentation fault error when I try to run it. I'm sure there are multiple small mistakes I have made throughout the code. I have gone through it and I can't figure out where my mistake is. Here is my code: // $Id: crpn.c,v 1.1 2013-10-22 13:28:04-07 - - $ #include <assert.h> #include <libgen.h> #include <stdio.h> #include <stdlib.h> int exit_status = EXIT_SUCCESS; #define EMPTY (-1) #define SIZE 16

SIGSEGV in background thread NSRunLoop runMode:beforeDate:

旧时模样 提交于 2019-12-11 09:08:45
问题 I am using background threads with following pattern: // Defined in .h-file as ivar BOOL backgroundThreadIsAlive; // .m file static NSThread *backgroundThread = nil; - (id)init { if (self = [super init]) { if (backgroundThread == nil) { backgroundThreadIsAlive = YES; backgroundThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMain:) object:nil]; [backgroundThread start]; } } return self; } - (void)threadMain:(id)data { NSRunLoop *runloop = [NSRunLoop currentRunLoop];