Cygwin Exception : open stack dump file
Asked Answered
P

6

9

I am developing in C language a linux command interpreter on windows 7, using Cygwin. My code was compiling and running correctly, until I get this error:

cygwin_exception::open_stackdumpfile:Dumping stack trace to jstack dump
Purpurin answered 14/9, 2014 at 20:48 Comment(0)
B
7

I find that I get this error when I try passing a value into a function when the funtion is expecting a pointer.

For example:

int arr[] = {1, 2, 3};
int i = 3;
memmove(i, arr, 3);

This code will get a cygwin_exception::open_stackdumpfile because you are passing int i, which is a value, into a function which is expecting a memory address.

However, this is based purely off of my experience and it is certainly possible that there are other causes for this error.

Bravado answered 28/11, 2014 at 20:3 Comment(0)
D
2

I just had this problem today. I found out that there was another cygwin session (shell) running in the background. Its possible that they affected each others memory locations/allocation. Once I killed them both, opened a new one, and everything back to normal! I hope it helps

Dunstan answered 9/10, 2014 at 20:11 Comment(1)
I found the same issue, all cygwin terminals registered a runnin bash.exe, however there was an extra sh.exe running.Senatorial
P
1

I had this error trying to use memcpy(). The problem was that I was trying to copy an array into a non-initialized pointer.

The error code:

int array[] = {1, 2, 3, 4, 5};
int *arrPtr = array;
int *mem_ptr = NULL;                           // this row
memcpy(mem_ptr, array, 5 * sizeof(int));

How I solved:

int array[] = {1, 2, 3, 4, 5};
int *arrPtr = array;
int *mem_ptr = malloc(sizeof(int) * 5);       // this row
memcpy(mem_ptr, array, 5 * sizeof(int));
Pompeii answered 6/12, 2020 at 18:27 Comment(0)
S
0

This applies to ConEmu and maybe other Windows-based terminal emulators, you might need to set your "scroll back" or "buffer height" to something less than 2000.

The actual number depends on width of your terminal. For me, the maximized window has 240 characters across, which can support around 3200 lines of "scroll back" before cygwin apps start crashing.

I am able to test this by running ls -l -R / | head -n 2000 or similar outputs on a clean terminal, and induce cygwin apps to crash.

Sibelle answered 22/4, 2018 at 22:0 Comment(0)
P
0

I have similar problem when concatenating char arrays with strcpy and strcat

const char *host = "http://myaddress";
const char *uri = "/api/devices/";
const char *changes = "getChanges?";
const char *token = "token=something";
char *link;

strcpy(link, host);
strcat(link, uri);
strcat(link, changes);
strcat(link, token);
puts(link);

The problem occured when strcpy was executing. I solved it by changing char *link as char link[50]

Putscher answered 22/12, 2019 at 10:3 Comment(0)
C
-1

I was getting this error in the followin ex:

v=d/t;

both t and d were declared as int; d was calculated;

I forgot to express the way we get(calculate) t. this was bringing me to that type of error.

Cordeliacordelie answered 18/9, 2019 at 20:34 Comment(1)
Please take a moment to read through the editing help in the help center. Formatting on Stack Overflow is different than other sites.Ease

© 2022 - 2024 — McMap. All rights reserved.