Crash only occured when textures was stored in a gray scale GPU texture and was scaled down to fit inside the given limitation. In this case the original number of pixels were packed into the GPU buffer, not taken into account the scaled down image. This resulted in a buffer overflow.