LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Dialog can return incorrect path when selecting Windows special folders

I found an interesting bug when writing an application today. Basically the File Dialog express VI can return the wrong path if selecting special folders in some circumstances. This bug seems especially tough to track down, but I think I managed to figure it out. Steps to reproduce using LabVIEW 8.6.1 on Windows XP:


  1. Use LabVIEW's File > Open... command to open any VI that is not located directly on your desktop. You MUST use the File > Open... command as this will set the working directory for the dialog box.
  2. Close the VI (all we cared about was ensuring the working directory was set).
  3. Create a new VI.
  4. Place the File Dialog express VI onto the diagram (Programming > File I/O > Advanced File Functions > File Dialog).
  5. Configure the express VI to select a folder and an existing item, leave the selection enabled to limit to a single item.
    config.png
  6. Create an indicator to show the returned path from the dialog.
  7. Run the VI. Navigate to either your Desktop via the large button on the left, or the pull down menu up top.
  8. Click the "Current Folder" button.
  9. Observe how the VI returns whatever the original location of the dialog box was, not the desktop directory.
I have not confirmed this bug on other operating systems but following the steps above reproduces it on my system.
Message 1 of 18
(4,299 Views)
I reproduced this on my XP system as well.....also tried it under Vista64 and it works as expected.
0 Kudos
Message 2 of 18
(4,289 Views)
Hrmm..  I tried this on both 8.6.1 and 2009 on Windows XP and could not replicate the problem you were having.  Both times the selected path output was the correct folder that represented the Desktop.
0 Kudos
Message 3 of 18
(4,261 Views)

David,

I'm using 8.6.1 (full development suite) on my XP system also and am able to get the same result as kegghead.
0 Kudos
Message 4 of 18
(4,244 Views)

I was using the Professional version, 8.6.1 on XP SP3.

 

On my home system, Professional 8.6 on Vista 64 SP 1 it works as expected.

Message Edited by kegghead on 08-04-2009 08:23 AM
0 Kudos
Message 5 of 18
(4,222 Views)
I tried it on 3 machines, 2 with Professional 8.6.1f1, one with Profressional 8.6.1, all XP SP3 and did NOT see the problem.
0 Kudos
Message 6 of 18
(4,211 Views)

Hi Kegghead,

 

Are you using 8.6.1f1?  This patch does not specifically address this problem but some small change might have happened behind the scenes.   I wonder if installing this fixes the problem, because I as well have f1 and don't see the problem you are having.

0 Kudos
Message 7 of 18
(4,197 Views)
I had not been using the f1 patch, but have since applied it. The problem persists.
0 Kudos
Message 8 of 18
(4,183 Views)
This is a very unusual problem you are having.  I tried it on another PC in the office and it did not show the problem you are experiencing.  Are you able to replicate this every time, or only occasionally?  Are you able to see this on other computers?  Do you see this same problem using other software on the computer?  Do you have the most recent updates from Microsoft?  Perhaps the answer to these questions can help shed some light on the problem at hand.
0 Kudos
Message 9 of 18
(4,146 Views)
I followed the steps.  LV 8.6.1f1 on Vista 64 bit Home premium.  It returned my desktop folder like I would expect.
0 Kudos
Message 10 of 18
(4,136 Views)