05-18-2019 05:32 PM
Hello!
I have a strange bug with File dialog Express VI (LabVIEW 2015).
My app asks a user for a file (what to open or where to save). And this Express VI works.
But at the one moment the dialog window stops appear. Instead of this VI returns error 43 ("Operation cancelled by user.") But the user didn'd do nothing.
And from this moment File dialog didn'd appears until restart LV/app.
Here the video:
What is it? and how to fix it?
05-18-2019 11:32 PM - edited 05-18-2019 11:33 PM
Did you notice the first error that occurs is #7 "File not Found"? Does the path exist?
Why would you execute the error case on File not Found?
Then you proceed to do a File Dialog on a non-existent path.
Perhaps the problem is with the Greek characters. Is it possible the OS can't handle them?
05-19-2019 03:46 AM
Hi, RavensFan!
I see the error 7, this is the reason of the file dialog.
- in DB I have filename, which I want to process.
- if file not founded (err 7), the app asks the user, where the file now (file dialog)
Cyrillic is not a problem.
File dialog works some time, BUT from one moment (I don't find relation with user's actions) it begins to return the error 43.
Here another code sample.
And from the moment of "err 43" any instances of this express VI starts to return the err 43 untill LV/app restart
05-19-2019 04:53 AM - edited 05-19-2019 05:00 AM
Inside the error case test that the directory you use as start path actually exists and if not then backtrack to a directory that actually does!
Also non ASCII 7-bit characters in LabVIEW paths can only work in Windows if the OS has the according language support installed AND is configured to use that specific locale too. Otherwise very strange things can happen with paths.
I believe the File Dialog Express VI did at some point start to remember the last selected file path and used the parent directory as start path if no valid start path was passed into. But you can convert the Express VI into a normal VI by trying to open the Express VI and then debug its operation normally.
05-19-2019 05:45 AM
Of course I use Cyrillic because my windows has properly configuration.
And Cyrillic in path usually works good. But I'll test in english-only letters.
@rolfk wrote:
I believe the File Dialog Express VI did at some point start to remember the last selected file path and used the parent directory as start path if no valid start path was passed into. But you can convert the Express VI into a normal VI by trying to open the Express VI and then debug its operation normally.
Also I've tried file dialog VI which exists inside of the express VI. Result the same
05-19-2019 05:14 PM
More information.
I've modified file dialog VI:
now I have detailed information. So, here 2 last actions
0:42:16 20.05.2019; prompt: ; selMode: new or existing file; path: <Not A Path>; defname: ; errIn: FALSE; code: 0; sourse : ; selPath: C:\Users\User\Desktop\22.png; cancel: FALSE; pattern: *.png; Plabel: ; errOut: FALSE; code: 0; sourse : ; chain: file_dialog.vi -> save_control_image.vi -> data_analise_trecks3D.vi -> data_analise_trecks3D.vi.ACBRProxyCaller.E7E00116 ; dt: 3,29 0:42:50 20.05.2019; prompt: Программа не нашла файл "camera1[2018-10-09(13-28-20)_2018-10-09(13-46-20)].avi". Укажите, где он сейчас располагается; selMode: existing file; path: <Not A Path>; defname: camera1[2018-10-09(13-28-20)_2018-10-09(13-46-20)].avi; errIn: FALSE; code: 0; sourse : ; selPath: <Not A Path>; cancel: TRUE; pattern: ; Plabel: ; errOut: TRUE; code: 43; sourse : file_dialog.vi->correct_check_and_ask_file.vi->corrects.vi->corrects.vi.ACBRProxyCaller.E8C0010E .ACBRProxyCaller.E8C0010E; chain: file_dialog.vi -> correct_check_and_ask_file.vi -> corrects.vi -> corrects.vi.ACBRProxyCaller.E8C0010E ; dt: 0,01
1) the user've selected a file for export C:\Usersselect\User\Desktop\22.png. Operation time 3,2s
2) the app have not found a file "camera1[2018-10-09(13-28-20)_2018-10-09(13-46-20)].avi" and have asked the user for path. But operation time 0,01s And I didn't see the file dialog
BTW. may be problem in relation with NI vision, because I can't repeat this error in independent VI. Only in full app.