View previous topic :: View next topic |
Author |
Message |
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Mon Aug 03, 2020 12:44 am Post subject: get_filtered_file closes application |
|
|
If I use get_filtered_file and then use the interface to delete an existing file, my application hangs for a few seconds, and my application closes, apparently before get_filtered_file returns. I am compiling in 32-bit (64-bit generates an allocate_backend_symbol error that I reported in a different post, but have not yet been able to isolate in a small program), and the compiler options do not seem to make a difference. Is there something I can do to stop the application closing? |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Mon Aug 03, 2020 4:14 am Post subject: |
|
|
Are you specifying "Must_Exist" or "Can_Exist"?
I have seen odd behavior using /CHECKMATE with file/folder operations. What are you using? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Mon Aug 03, 2020 6:57 am Post subject: |
|
|
simon
Can you supply a small working sample that replicates the behaviour? |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Wed Aug 05, 2020 9:29 pm Post subject: |
|
|
If I try to delete a file from the prompt using the following, it seems to stop before printing the message on the last line, but if I select a file or cancel or close the prompt using the X the message is printed. I have the same problem whether I use /CHECKMATE or not.
Code: | WinApp
Program p
!
Character(Len=256) :: ffile ! - selected file -
Character(Len=256) :: idir ! - input directory -
!
External :: get_filtered_file@
!
ffile = ' '
idir = '.\'
Call get_filtered_file@ ('Test', ffile, idir, (/'All'/), (/'*.*'/), 1, 1)
Print *, 'Test completed'
End Program p
|
I am running on Windows 10, and using FTN 8.61.0 built on 4 Feb 2020. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Thu Aug 06, 2020 7:43 am Post subject: |
|
|
Simon
Your program runs OK for me. I assume that you are using the Open/Save dialog to delete a file. I did not try to delete a protected file but it should not make any difference.
Perhaps you could post a video to show the failure.
You could try calling clearwin_option@("alt_open_save") but I doubt that it will make any difference. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Aug 06, 2020 9:19 pm Post subject: |
|
|
Simon,
It never occurred to me that you could delete a file from this dialog, but your test program works for me (32 bit v8.50 FTN95 with 64-bit Windows) whether I use the Del key or do a mouse right click to bring up a menu or close the dialog.
The error you report is not present on my PC.
When using this approach to select a file to Open, the dialog simply selects the file name and the file must be opened with a Fortran Open statement. Knowing that is why it probably didn't occur to me to use it to delete a file, thinking it might take something else to do the actual deletion.
You learn something every day!
Eddie |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Thu Aug 06, 2020 10:10 pm Post subject: |
|
|
Well Paul, your suggestion to try using the clearwin_option seems to have solved the problem!
To describe more carefully what I have been doing.
1. I run this programme
2. From the list of files, I select one using the right mouse button
3. From the pop-up menu I choose 'Delete'
4. The programme rather hesitantly deletes the selected file, sometimes showing a progress bar, but not always
5. The window then closes and the programme message fails to appear
I will find out how to to create a video, if that would still be useful. |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Fri Aug 07, 2020 3:00 am Post subject: |
|
|
Hi Eddie,
I am getting some users reporting this problem and others saying it works fine, so perhaps there is some key difference in the Operating System.
I discovered the ability to treat such open-file dialogues as if they were Windows Explorer from somebody who did not know about Explorer and thought that was the only way to manage files!
Best wishes,
Simon |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Fri Aug 07, 2020 6:36 am Post subject: |
|
|
Simon
Thanks. There is now no value in sending a video. Basically this has to be a Microsoft issue that can not be resolved via the current ClearWin+ coding (except by using the alternative mechanism). |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri Aug 07, 2020 12:16 pm Post subject: |
|
|
Paul,
With respect, I suggest that it might be worth keeping this one open, as others (not me, I might add) have noted this before. It may be a foible associated with anti-virus, or some other software, or just a setting within Windows. Whichever or whatever it is, it would be reassuring if the reason was known.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Fri Aug 07, 2020 12:31 pm Post subject: |
|
|
Eddie
I am not sure what you mean. I can't keep it open in the sense that an action is required from Silverfrost. This and similar posts will remain in place for guidance. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri Aug 07, 2020 1:25 pm Post subject: |
|
|
Hi Paul,
You are dead right that it seems meaningless it keep it open on your 'to do' list, and right that the Forum keeps the topic open for others.
However, I think that it would be worth seeing Simon's video, and he shouldn't be dissuaded from showing it.
Eddie |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Fri Aug 07, 2020 9:53 pm Post subject: |
|
|
I was unsure how to video the problem, and it was suggested I try using Xbox. That showed me compiling the programme, but failed to show the actual application running. So I then tried to record just the application, but now the problem seems to have gone away! I have some of my users still reporting the same issue, so I will see if I can get one of them to video it, but I will of course use the window_option@ solution to avoid this issue in future releases.
Many thanks for your suggestions. |
|
Back to top |
|
|
|