I would probably first try to establish where the exact location is. Due to the asynchronous nature of GPU computing, the error is usually reported later. A while ago, I wrote a quick howto for this. 237 There some operations that may cause errors like this when used with invalid data, e.g. indexing functions when you demand an index that is outside the array.
Best regards
Thomas