I'm working on an application which builds and runs fine in Win32. However, in x64, it builds but crashes on run. Looking at the code and narrowing down the problem, if I comment out the call to the below function, it runs with no problem.
void vec3_copy (double* v1, const double* v2) {
v1[0] = v2[0]; v1[1] = v2[1]; v1[2] = v2[2];
}
I'm building in Visual Studio 2008 with the C/C++ compiler. All updates have been installed. Any ideas?
EDIT 1 (to answer comments):
The pointers should be valid, as in Win32, it runs fine. No code is change and a different path is not taken, unless the pointer are somewhat modified because its x64 (will look into this).
Unfortunately, there is no information about the crash. In Windows 7, it simply saying that it is looking for a solution to the problem, finds nothing, and returns in the command prompt. In the event viewer, I was able to find the following information:
Faulting application name: DRR_C.exe, version: 0.0.0.0, time stamp: 0x4b7a1ee1
Faulting module name: DRR_C.exe, version: 0.0.0.0, time stamp: 0x4b7a1ee1
Exception code: 0xc0000005
Fault offset: 0x0000000000003950
Faulting process id: 0x16a4
Faulting application start time: 0x01caaec078a9c84a
Faulting application path: D:\Development\gpu\dev\DRR_C\x64\Debug\DRR_C.exe
Faulting module path: D:\Development\gpu\dev\DRR_C\x64\Debug\DRR_C.exe
EDIT 2 (to answer more comments):
Modified the line to,
memcpy(v1, v2, 3 * sizeof(double));
New error info has the same exception code and fault offset.