probably the problem with incorrect memory size allocated in some place causing memory overruns...

Try to find out what part of the code is causing GPF (or by commenting out some parts, or debugging, or adding traces)