11-02-2017 09:32 AM
I have been working on a program and it works perfectly in the CVI environment during debug mode but when I am using the release mode to run the program(after installation or in the CVI environment) it crashes in a certain function that reads from a CSV file. I have added to the release all the files that I used for the CSV part. When I debug the crush I don't get any clue about the problem. Did anyone encounter this kind of problem?
11-02-2017 10:51 AM
I don't remember any plausible reason for this odd behaviour.
The usual checks in these cases are to verify that there aren't parts of code excluded in release mode or tailored differently between debug and release mode by means of #ifdef _CVI_DEBUG_ clause or BeingDebuggedByCVI () instruction. Check also that all variables are properly initialized before being used: the release mode behaves differently in this respect from the debug mode.
Additionally, if the program crashes is possible that some item is stored in the system log: check with system Event Viewer and verify the informations added by the OS.
11-02-2017 11:41 AM - edited 11-02-2017 11:42 AM
I seem to remember that in debug mode variables are initialized automatically while this probably is not the case in release mode - so it might be that in release mode the string contains some strange / unexpected characters - so I would support Robertos suggestion of checking initialization.
11-03-2017 02:25 AM
I would also suggest to output some meaningful data to the debug console with DebugPrintf() or OutputDebugString() commands, to be trapped by DebugView utility from Microsoft: even in case of program crash, messages trapped by the utility will permit you to examine the data you have printed to the debug console.
01-27-2023 09:22 AM - edited 01-27-2023 09:39 AM
Wolfgang: I tried to give you a kudos but it wouldn't let me.
Your reply helped me significantly. I had some serial communication that would work in debug mode but would give me nothing in release mode. After reading your reply, I added initialization to my char arrays and it works in release.
01-30-2023 12:48 AM
you are welcome, I am happy I could assist 😊