In the name of Allah(God) Hello I compiled the program on the following link: code.bsd64.org/browse/openbsd/HEAD/xenocara/dist/Mesa/progs/xdemos/sharedtex_mt.c It compiled properly but when I run the program, I recieved a run time error "Segmentation fault". I knew that the glXMakeCurrent function works properly and when the program wants to run fist GL function after glXMakeCurrent function makes run time error. I also knew if we write this program without threading, the program will work properly. Please, help me how to solve this problem Thanks in advance Hamed
Most of the time Segmentation fault comes when you are using a variable which has not be allocated a memory.
In the name of Allah Thanks Shabbir for your reply but your reply doesn't solve my problem because this code works properly if it is written without threading Please, answer the question with more details Thanks in advance Hamed
You have not asked the question with the needed details for me to answer to the great detail possible. Where does segmentation fault happens and in what condition ?
In the name of Allah Hello Thanks again for spending time to answer my question. Segmentation fault happens in Redraw function after glXMakeCurrent function works properly, glPushMatrix function I think or the one of above OpenGL function. I knew this problem happens when we use thread, if we don't use thread this problem won't happen. Thanks in advance Hamed