Segmentation fault at glTexSubImage2D

I am trying to debug one segmentation fault. my application is in C++ with opengl for displaying … once application is crashed i shoot bt command to see where is the issue:

PFA image for complete back trace of crash…
Backtrace doesnt give necesary information about crash it says crash is at glTexSubImage2D()… How do i further debug it ?

Any input is highly appreciated…

Check the parameters to glTexSubImage(). A segfault typically indicates that either the pointer is incorrect (e.g. passing the address of a pointer rather than its value) or it doesn’t point at sufficient memory based upon the values of the width, height, format and type parameters and the unpacking parameters set by glPixelStore() (in particular, GL_UNPACK_ALIGNMENT defaults to 4, which is a common pitfall).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.