Without posting the whole code here, it's hard to tell where there's the error, it would be better if you copy your project(for safety) and then remove all code that's unrelated to the problem, until your code is that small with the problem, to post it or to find the error yourself....
I myself had sometimes errors i wasn't able to find a solution for, so i tried to make a small project with minimized code but still with the error to upload to the forum and often i was able to find the problem because of this!
cheers