access violation on load

Hi guys, have you ever experienced a random access violation on load ? I mean I have a code that works pretty well but sometimes, it will throw a bunch of access violations.
Parallel Nsight Debug

CUDA Memory Checker detected 64 threads caused an access violation:
Launch Parameters
CUcontext = 03f59540
CUstream = 00000000
CUmodule = 0dc0e880
CUfunction = 195fea20
FunctionName = KernelForestTotal
gridDim = {3703,1,1}
blockDim = {512,1,1}
sharedSize = 32000
Parameters (raw):
0x0ba45800 0x00000002 0x08000000 0x00000002
0x0b820000 0x00000002 0x1c3e0000 0x00000002
0x0b824c00 0x00000002 0x18000000 0x00000002
0x0b920000 0x00000002 0x0ba20000 0x00000002
0x0bb20000 0x00000002 0x0bb20200 0x00000002
0x0000000a 0x00000e77 0x000090ad 0x000012c0
0x38d1b717 0x0000000a

I tried to debug it with Nsight ( under win7, 64 bits) but this debugger seems to be quite useless, as it turns out that when there is a bug or a crash all the current variables around the bug area will not keep their value, and on top of it, if I include tests like ( if (myvariable<0) then ), the tests will not behave correctly ( the test will be executed even if myvariable>0). I might have forgotten to use some options when compiling or something like that because frankly NSight seems to be the most useless tool I’ve ever used. Could you pls point me in the right direction ?
all the best

I think you have out of array bound in either global memory or shared memory.
Try to disable each memory access to localize out-of-array-bound

Thanks for your advice ! I finally managed to get around this random silly bug, it was really stupid, I indexed an array with a short, and sometimes it went above 32767… my bad, but I really love this forum where you can ask for help when you are totally depressed and without an idea about what’s going on !