06-08-2012 02:59 PM
I am in the process of smoothing out the wrinkles in a large LabVIEW program that I've converted from LV 7.0 to LV 2011SP1. I've also moved from WinXP to Windows 7. I get why there are file permission errors and I understand what the issues are in regard to moving from XP to 7. What I would really like, is for the error message to tell me WHAT file is having the issue. There are entirely too many file accesses in this program, I am not the originator, and it's been painful. A more explicit error message, a log file, or some other cool trick to find what file is having the issue would be super. While I'm asking for stuff, a call stack or at least the name of the VI this code calls would be wonderful, as nothing at all calls New File directly.
06-08-2012 03:58 PM
Have you tried the Desktop Execution Trace Toolkit?
06-08-2012 04:09 PM
I use a subVI to log errors to a file. I treat it like an action engine. At the beginning of the program, I initialize it with the path to where I want the log file to be. Then I populate this subVI throughout my program in all the various loops I have running. I use the Other Info input to put something descriptive, like "DAQ Loop" "UI Loop" "Master State Machine Loop".
This could be adapted to take information like the file path and convert it to a string to save as well.
06-08-2012 04:11 PM - edited 06-08-2012 04:12 PM
You can always build a VI that adds extra data to the error if there is one. Then feed the filename you are working with into the extra data.
You can use Call Chain.vi from the Application Control palette to give you the chain of VIs the got you where you are in the code. It "returns the chain of callers from the current VI to the top-level VI." (From the context help for Call Chain.vi).
Rob
06-08-2012 04:30 PM
How are you currently handling the error? The file you tried to access should be part of the string in the error cluster.
06-11-2012 08:27 AM
The thing is there are LOTS of these file accesses, the error handling is non-existent/very bad, and I have enough problems navigating the multiple block diagrams that are 3-4 screens high by about 8 screens wide. I didn't create this, I'm fixing it up as time permits, I just want decent error messages because navigation is super painful. It could take weeks just to add in the error messages and that's about the timeframe I have for all the bug fixes that need to happen.
I will check out the toolkit suggested.
06-11-2012 09:00 AM
Are the files all in one directory?
I know when I tried accessing files on an external hard drive from Windows 7 that was recently installed on one laptop, I ran into file permission problems.
06-11-2012 09:03 AM
Possibly, but part of the problem is that the app is trying to write files under the Program Files tree, which isn't permitted for most users. I need to change that directory, which I have in a lot of places, but there are several files and it's been hard to track them down. I'm needing a search string.
06-11-2012 09:31 AM
In Win7 you're not allowed to save to c:\ or Program files by default, which is a common usage in old programs.
/Y