In my program, I have a base class called “Geometry” which contains some pure virtual functions in it and one implementation of the class called “Sphere.” Whenever I run my program, the kernel never completes because “an illegal memory access was encountered.” Stepping through with the CUDA debugger, I’ve found that the crashing occurs when I call the pure virtual functions (accessed through a Geometry pointer). Is this because CUDA cannot properly handle vtables and is attempting to call a null function?
EDIT : The pointer to my sphere on the GPU shouldn’t be bad because I verified that it was copied correctly. However, whenever I add the Geometry pointer to the watch window in the debugger the following error message is shown: “Condition(false) in method: Nvda.CppExpressions.FrontEnd.TypeNodeConvertSymbolicsNodeToTypeChain(Nvda.Symbolics.ISymbolicsNode) device const _ZN3rex8GeometryE* device”. This is what is causing me to believe it is a problem with the pure virtual function call.