c++ threads
hi
I'm having troubles to use threads at my c++ program. every time I'm trying to use thread the program throws "segmention fault" announcment... does anu one know what is the problem ?? thanks |
Run your program in a debugging (for example, "gdb").
When it dies, look at your stack traceback (for example, "where") Look backwards from the point of failure. PS: This post probably belonged in the "programming" forum. |
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
|
umm, code would obviously help us figure out the problem...
Telling us the thread library you're using would also be a help |
"Segmentation fault" means nothing more and nothing less than "your program tried to use a chunk of memory that was not assigned to it." That's a wild-behavior of the program which could happen for any number of reasons, none of which have anything to do with threading.
It is, however, somewhat more likely to be some kind of a timing problem. So maybe the very first thing to do is to establish that the threads really are being created... then start carefully debugging your code. Some things to consider:
It is fairly unrealistic to hand a program to a forum and say, "debug it for me! :rolleyes:", but if you can post moderate and specific snippets we may be able to help you more. |
All times are GMT -5. The time now is 01:18 PM. |