04-22-2010 02:45 PM
I am writing a labwindows driver, but having issues with the environment itself. I am able to compile the .c file for the driver, and my panels are working. I am having problems with labwindows recompiling the .c file even though nothing has changed. It is a random problem that I have seen before, but never managed to get around. The problem shows up in a variety of instances.
I.E. While in interactive execution, I can click on another application on the taskbar (internet explorer, email, etc.) and labwindows displays a message that the c file is being recompiled. Nothing in the file changed! Why does it try and recompile when it is simply losing focus? This is 'random'. Just when I think I have found a way to reliably reproduce the issue, it quits recompiling when I switch applications. I have tried playing with the build options, but haven't had any repeatable success. I even tried to enable the -o option, but is still recompiles the file. (maybe -o won't work on a driver since it won't build without a main?) I have even had issues with calling printf in a function during interactive execution. It recompiles the c file for no apparent reason right after the stdio window prints the message. At this point, the stdio window closes, and labwindows pops up the compiling message again. It kills my interactive session, and I have to redeclare all of my variables to continue checking out my driver.
I see the same issue randomly when I go back to the project from another application. (Click on labwindows in the taskbar, and it immediately compiles the c file.)
I have seen this in other projects, and it appears that the issue is limited to instrument drivers. When labwindows pops up the message that it is compiling files it is almost always a driver that is loaded as an instrument. I played with unloading the instrument but leaving the .fp in the project, but I don't think that worked. (It has been awhile since I tried to figure this out.) When working on a driver, it would be difficult to unload the .fp or not load the instrument anyway.
(I just clicked on labwindows in the taskbar to see if I left anything out. Labwindows popped up the message that it was compiling the c file. It appears that I can go back and forth between the labwindows icon in the taskbar and the cvi icon ~15-20 times and then labwindows will recompile the file. I even walked away from my computer for a couple of minutes, and it compiled when I came back and clicked on the labwindows icon.)
I am running labwindows 9.1 (but have seen this on 8 also)
The files are on a network drive.
(Could it be mcaffee or some network security stuff confusing labwindows?)
04-24-2010 03:09 PM
To add to this ...
I've noticed in CVI 2009 that if I have a workspace with multiple projects, simply changing the active project will often cause the newly active project to mark some or all of the source files in it as needing a recompile, when, of course, nothing could have changed as yet.
It doesn't seem to correlate with a edit window being open or active for one of the files in the newly active project ...
I wouldn't care about this except that it makes me wonder about build order when creating a distribution, as I noted in a separate thread.
04-27-2010 12:10 PM
Hello All,
This is interesting behavior, I have not noticed it before so let me try to reproduce this and look into the situation.
Thanks,
Anna K
Applications Engineer
04-27-2010 12:53 PM
04-27-2010 01:27 PM
04-28-2010 03:23 PM
Hello All,
I have not been able to reproduce this yet. Can you tell me about the machine you are running on? What OS? Does the same occur when switching between other applications and CVI? Do you have other applications running at the same time? Does anything stand out about your project? Does it occur with all code?
Thanks,
04-29-2010 08:55 AM
My pc is currently running Windows XP sp3.
I first saw this issue when I went from LabWindows 7.1? to 8.1? I am sure that I had the issue in 8.1
I was able to reproduce the issue in production on a pc running windows 2000. (Which is what I had at my desk previously, and had seen the issue.)
I asked another member of the test engineering group, and I am not the only one seeing the issue.
One of the earlier replies mentioned the auto save feature. When I went to production to see if I could reproduce the problem there, I opened CVI and explorer. I wanted to check the time-date stamp on the .c file that keeps recompiling. The time-date stamp was a day old, and did not change when the period of time for auto save was passed. (It probably would if I made changes but didn't save the file?) I was able to switch back and forth between the explorer window and cvi, and the file would recompile. I played with turning off the auto save, enabling the build status window, making the -o option compatible with cvi 5.0, displaying the build status column, etc. It appeared at one point that it had quit recompiling when switching between applications. I went back to my desk, and tried to match the settings, but never reached the same conclusion.
There is not anything special about the project I am working on. It is a labwindows driver for a pxi module. There are only three files in the project, the .c .h and .fp. The .c file keeps getting recompiled at seemingly random times. It is especially frustrating during interactive execution while testing my code/function panels. If I switch to another application and back, I almost always have to start over because compiling the file closes the interactive execution. I have to redeclare all of the variables, and re-run any of the setup panels that are required. (I have to open the DRM, load the module fpga/dac, and then I can run the panel I am actually trying to test.) I have similar problems when trying to troubleshoot with printf statements, as it seems to recompile when focus switches to the stdio window. I have resorted to a test project, where I can add the function calls and skip having to do any work via interactive execution.
I haven't been able to find anyone outside of where I work reporting the same issue. Maybe it has something to do with IT/viruscan/etc. It is definately a strange issue.
(I have switched back to CVI several times while writing this, and the .c filed recompiled about 20% of the time. At one point, I had left the build options dialog open when switching back and forth. I did not change any options, but the .c file recompiled when I closed the options window?)
Occasionally, when I see what appears to be the recompile message flash up, my interactive execution does not halt. I.E. I don't have to redeclare my variables. It is sometimes hard to see what the message says, you just see a dialog box pop up and disapear really quickly.
04-29-2010 10:02 AM
I tried one more thing. I set my screensaver interval to 1 minute. I closed almost all applications. I ran a function panel that required two variables to be declared. I waited until the screensaver came on. (No login required to get back to the application, just move the mouse.) The message popped up that a2d.c was being compiled. I ran the function panel again, and got an error because my variables are no longer declared. Absolutely nothing changed, focus was lost due to the screesaver coming on, and the file recompiled? I will attach sceen captures of the panel, and my build options.
05-10-2010 04:32 PM
Hello,
1. It looks like only one of your C files is affected based on the screen shots. Though it sounds like other files have displayed this behavior in the past, is this correct?
2. Is this file saved on your local machine? Is it in a shared network directory?
3. Would it be possible to provide us with a log file of the environment?
To do this, run <CVI2009>\bin\ConfigCVILogging.exe, configure it as follows - then send us the file.
Thanks so much!
05-11-2010 09:38 AM
1. Yes, this happens with multiple files and projects. This appears to happen with files that are associated with a labwindows driver. I.E. C files that are associated with an instument or .fp file that is loaded in the project.
2. The files are on a networked drive. I have not tried copying the files local.
3. I configured the CVI logging as suggested, but I don't see a log file created in the directory specified. Is there an additional step required?