what could be the reasons of glXMakeCurrent giving segmentation fault?
There are myriad reasons, most of them implementation bugs tickled by bad input.
If you want help to solve this you would need to provide as a start: