Well... The problem seems to be very narrowed down. When I got rid of my cout and wrote with fprintf to a file, it did not segfault. I guess...
Alright, I get your point. I stripped the program down to what you suggested and ran it with my large (60,000 lines) rawdata.txt file. The...
It does not seem to segfault as fast on the Mac but that does not help me much
i have run it on Mac. I have tried it without threads and it makes no difference. I answered all of your questions.
also, the format of the file is as follows: 1906,20000D81 1907,20000AF5 1908,20000B49 1909,20000A95 190A,20000AE9 190B,20000BC5 190C,20000C51...
So, /dev/ttyT8S0 is a file which reads from a COM port so the file has no end. It varies as to how long it takes for the segfault but never...
; So, if that is the answer to your question... I am still getting a segfault after reading a lot of values from the file. The new code is as...
So this means the line should look as follows: char *index ?? Thanks.
I tried changing the line to char index[256] ; and when I tried compiling, my strtok returns a char* not an array.
Alright, I have played with more options and now have this. It is still giving a seg fault void * read_file(void*){ FILE * oar1 ; oar1 =...
Alright I did everything from point 2 you mentioned. Same result. The segfault happens after about 20 seconds of reading the file. Yes, 16 is...
Sorry about that. void * read_file(void*){ FILE * oar1 ; oar1 = fopen("/dev/ttyT8S0","r"); char *ptrr = new char[16] ; char *index = new...
Alright, this function is in a thread which is reading lines from a file which will never be longer than 16 chars. inside the while(1) loop, if I...
Separate names with a comma.