segmentation-fault

Error when using Decision Trees in OpenCV 3.0.0-rc1

扶醉桌前 提交于 2021-02-19 06:01:15
问题 I am doing some machine learning in OpenCV and i'm using Decision Trees . I am currently using OpenCV 3.0.0-rc1 . Whenever i attempt to train Decision Trees with my training data and labels, i get either terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc or Segmentation fault Depending on what i put into setMaxDepth(); if the number is larger than 22, it's bad_alloc, else it's seg fault. Here's my source code: //import data Mat trainData=imread("/home

is boost::property_tree::ptree thread safe?

放肆的年华 提交于 2021-02-17 15:14:36
问题 I'm using boosts read_json in a couple of threads in a piece of code. A simplified breakdown of the call is below. I'm getting segfaults in one of the threads (and sometimes the other) and it's making me think that read_json is not thread safe (Or I'm just using it in a dumb way) void someclass::dojson() { using boost::property_tree::ptree; ptree pt; std::stringstream ss(json_data_string); read_json(ss,pt); } Now json_data_string is different between the two classes (it's just json data

Memcpy segfaulting with valid pointers

穿精又带淫゛_ 提交于 2021-02-17 02:16:08
问题 I'm using libcurl in my program, and running into a segfault. Before I filed a bug with the curl project, I thought I'd do a little debugging. What I found seemed very odd to me, and I haven't been able to make sense of it yet. First, the segfault traceback: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe77f6700 (LWP 592)] 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux

Memcpy segfaulting with valid pointers

房东的猫 提交于 2021-02-17 02:13:08
问题 I'm using libcurl in my program, and running into a segfault. Before I filed a bug with the curl project, I thought I'd do a little debugging. What I found seemed very odd to me, and I haven't been able to make sense of it yet. First, the segfault traceback: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe77f6700 (LWP 592)] 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff6a2ea5c in memcpy () from /lib/x86_64-linux

How to know the reason for JVM crashing with Segfault?

谁说胖子不能爱 提交于 2021-02-16 15:41:16
问题 We are seeing the JVM getting crashed at times with segfault. The only error we see in logs is as below. Anyone can suggest something by looking at the below error trace. # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fef7f1d3eb0, pid=42623, tid=0x00007feea62c8700 # # JRE version: OpenJDK Runtime Environment (8.0_222-b10) (build 1.8.0_222-b10) # Java VM: OpenJDK 64-Bit Server VM (25.222-b10 mixed mode linux-amd64 compressed oops) #

How to know the reason for JVM crashing with Segfault?

自作多情 提交于 2021-02-16 15:41:06
问题 We are seeing the JVM getting crashed at times with segfault. The only error we see in logs is as below. Anyone can suggest something by looking at the below error trace. # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fef7f1d3eb0, pid=42623, tid=0x00007feea62c8700 # # JRE version: OpenJDK Runtime Environment (8.0_222-b10) (build 1.8.0_222-b10) # Java VM: OpenJDK 64-Bit Server VM (25.222-b10 mixed mode linux-amd64 compressed oops) #

2D array seg fault in C

不打扰是莪最后的温柔 提交于 2021-02-13 17:40:20
问题 I am trying to de-reference the 2D array inside the function islandPerimeter . But I cannot understand why I am getting segfault for this. Can someone point out what exactly I am doing wrong? update: So this was a part of a problem from leetcode I was trying to solve.I now understand it is not 2D array but a pointer. I am still confused over the int**. can someone explain it? #include <stdio.h> int islandPerimeter(int** grid, int gridSize, int gridColSize) { int perimeter=0,points=4,i=0; for

EXC_BAD_ACCESS at main method declaration

六月ゝ 毕业季﹏ 提交于 2021-02-11 18:03:50
问题 I'm trying to get some old C++ code up and running. I've gotten it to compile without error, but it immediately segfaults when I run, without entering main. When I use gdb to find out where things are going wrong, I find the following: (gdb) run Starting program: /Users/dreens/Documents/OH/extrabuncher2/ParaOHSB Reading symbols for shared libraries +++. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00007fff5636581c

No segmentation fault for accessing out of bound memory

只谈情不闲聊 提交于 2021-02-11 14:19:36
问题 I'm not a good English speaker. so in my program I want to copy a text who exists in a txt file to an array. typedef struct Chaine { char * Lachaine; int Taille_C; } Chaine ; int main (void) { Chaine *Tab_Texte=NULL; Tab_Texte=(Chaine*)malloc(sizeof(Chaine)); FILE* Texte= NULL; Texte = fopen("chaines", "r"); fseek(Texte, 0, SEEK_END); Tab_Texte->Taille_C=ftell(Texte); fseek(Texte, 0, SEEK_SET); Tab_Texte->Lachaine=NULL; Tab_Texte->Lachaine=(char*)malloc(sizeof(char)*Tab_Texte->Taille_C);

Node app segfault on Heroku: std::bad_alloc and exit code 134

孤者浪人 提交于 2021-02-10 13:19:07
问题 I am having difficulty understanding this heroku stack trace. My app has been running very well both locally and in Heroku for a few years now. Yet I am suddenly plagued by immediate crashes on Heroku. Here is the stack trace: 2019-05-14T14:05:14.947049+00:00 heroku[web.1]: Starting process with command `yarn run server` 2019-05-14T14:05:17.599376+00:00 app[web.1]: yarn run v1.16.0 2019-05-14T14:05:17.680344+00:00 app[web.1]: $ babel-node src/server.js 2019-05-14T14:05:20.674637+00:00 app[web