03-17-2014 10:07 AM
Hello All
I have upgrade today from CVI2012 SP1 to CVI2013 SP1
I have complied & run a project that works fine on the previous version.
I am sad to report that CVI 2013 crashes immediately in release mode (on debug mode it runs)
The project is huge project about 70k lines with extensive SQL calls to *.mdb files using sql toolkit
I have determined that the crash occurs in simple FetchNext call
The PC is XP SP3
CVI 2013 SP1
SQL toolkit 2.2
Pls help (i do not want to roll back unless i have to)
Thanks for advance
gabel Daniel
Solved! Go to Solution.
03-18-2014 06:49 AM
Hello aplication_dev…,
Do you think you can send us the project using ftp.ni.com, so we can take a closer look?
Best regards,
= Nelu F. || National Instruments.
03-18-2014 07:00 AM
Hi
I have created small project that reproduces the bug
In debug everything runs OK
In release mode it crushes
pay attn to the msg box's , this way i could find the exact line in release (primitive but works...)
Gabel Daniel
03-18-2014 07:12 AM
Thank you for the project. We will investigate and get back to you soon.
Best regards,
= Nelu F. || National Instruments.
03-25-2014 04:35 AM
Hello aplication_dev…,
I have opened bug report #461207 to address this issue. Unfortunately, at this time there appears to be no other work-around, than to use the debug builds. This issue should be addressed soon.
Best regards,
= Nelu F. || National Instruments.
03-25-2014 08:35 AM
Thanks for the reply
Can you pls estimate when & how the bug will be fixed
My purpose for the question is do i roll back to 2012 or wait for the fix
Thanks
Gabel Daniel
03-25-2014 09:18 AM
Hello aplication_dev…,
At this moment it looks like we might fix it in the next version of LabWindows/CVI. As for the how, I cannot speculate. I can get back to you when I have more information.
Best regards,
= Nelu F. || National Instruments.
04-09-2014 03:19 PM
Hello aplication_dev…,
I think I might have another workaround for you. I discovered that replacing the function calls to "Bind_Money" with the function's code eliminates the crash in the project you've attached, for the Release configuration. Does this work for you?
Best regards,
= Nelu F. || National Instruments.
04-10-2014 12:03 AM
hello Nelu
Unfortunately i have already roll back to 2012, i will wait for SP2 hopefully NI will fix the bug
Thanks for the reply
Gabel Daniel
04-11-2014 01:36 AM
Hello aplication_dev…,
We have completed the investigation. It looks like the crash was caused by a user error in function Bind_Money. In that function a local variable is being bound to the library. After the function executes, the variable stops existing, but its address is saved by the library.
When calling DBFetchNext, the library tries to write the status of the request at the specified address. But the variable stat does not exist anymore. And, because it was a local variable, it was allocated on the stack. Thus, the library tries to modify a value on the stack that exists no more and this leads to the corruption of the stack and the crash.
The fact it doesn't crash in debug mode and with older versions appears to be coincidental.
The help for the binding functions states that the status parameter is a "pointer to the variable that receives the status value of the specified column when you fetch a record." It might not be that obvious that it has the same importance like the address that is being bound to the column, so we are going to modify the documentation to provide this information. Also, please note that you can't pass a NULL value to the binding function. I would suggest adding the status variable to the CURRENCY structure and use it to determine if the information returned was NULL or if it was truncated.
Please let us know if you encounter any other issues.
Best regards,
= Nelu F. || National Instruments.