06-29-2009 03:33 AM
using CVI 9.0.1, the sample code attached causes a general protection fault on the second memcpy of the main function on my computer, when compiled in debug mode. when compiled in release mode, no problem... i don't know if it crashes on other computers. this code compiled and ran fine with gcc, visual studio and digital mars.
Solved! Go to Solution.
06-29-2009 04:07 AM
Do you still get the error if you remove the const qualifier from the sDanfossFactoryParams array?
JR
06-29-2009 06:38 AM
thanks jr, removing the const qualifier did the trick.
now i am left wondering why a const qualifier crashes the software while memcpy does define its second parameter as const.
06-29-2009 06:42 AM
My guess would be that there is some issue with the CVI debug framework around the memcpy() call. Maybe they have mixed up the source and destination parameter checking? Perhaps someone from NI could tell.
JR
06-29-2009 03:18 PM
This does seem like a bug in CVI's user protection code. I've created an internal bug report with ID 177188. I'll post an update here as soon as I find out some more details.
Thanks for reporting this.
Luis