First of all I'm running Vista 64 bit and VC2008 full
When I try to create any app using glut I can set it up so I can compile the app no problem but when I go to run it I always no matter what I do get an error saying: Unhandled exception at 0x00018bac in gluttest.exe: 0xC0000005: Access violation.
When I hit break it goes to gs_Support.c specifically this line: cookie = systime.ft_struct.dwLowDateTime;
within this batch of code: /* * Initialize the global cookie with an unpredictable value which is * different for each module in a process. Combine a number of sources * of randomness. */
GetSystemTimeAsFileTime(&systime.ft_struct); #if defined (_WIN64) cookie = systime.ft_scalar; #else /* defined (_WIN64) */ cookie = systime.ft_struct.dwLowDateTime; cookie ^= systime.ft_struct.dwHighDateTime; #endif /* defined (_WIN64) */
This is from my call stack: 00018bac() > gluttest.exe!__security_init_cookie() Line 131 C gluttest.exe!mainCRTStartup() Line 398 C kernel32.dll!76d5e3f3()
I get this even if I turn 'Buffer Security Check' to No (/GS -) I have also made sure that I have the Platform SDk installed with my glut and other files added to the appropriate lib, dll directories.
I have been battling this issue for months and am frustrated beyond all compare. If I work from my XP 32bit machine I don't run into this problem but now that I'm back in grad school I need to be able to work off my laptop and alas its the Vista 64bit OS which is giving me these nightmares.
This is a *very* strange problem. This code cannot cause an AV, it only references stack variables. Your call stack is very weird too, it shows a call made from line 131 of gs_support.c, but there is no call there. Switch to assembly and compare the code with mine:
yeah, yet I can get this 100% of the time regardless of how I try to start a new glut based project. Here's my disassembly window code. This problem has me so stumped and frustrated its not even funny. Happily if all else fails I can always jumo way back to good ole VC6 with no problems its just not the answer I want.
Really I'm the only one that has this problem and not just one but two different machines? Any hints, tips or clues to what even to try thinking about because I have tried everything I can think of.