JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Fri Feb 02, 2018 5:16 am Post subject: |
|
|
Paul,
I have looked into the problem and I think I can say.
# there is a stack corruption, as the return to the menu hangs; changing the return status =0,1 or 2 has no effect.
# removing export_image@ does not change the error, so not the problem.
# my routine to generate the .png file name is causing the problem.
On closer inspection, the code is a bit ugly, with a lack of iostat= options, then deleting then re-opening a file. As bad as it is, I thing Ver 8.20 fails with this. I shall change to using INQUIRE to test for file existence and see what happens. Code: | subroutine get_next_dump_file (file_nn, file_name, prefix, ext)
!
! develop a screen dump file name
!
integer*4 file_nn
character file_name*(*), prefix*(*), ext*4
integer*4 lu, get_file_unit
external get_file_unit
!
lu = get_file_unit (90)
close (unit=lu)
!
11 file_nn = file_nn + 1
if (file_nn > 999) return
!
if (len_trim (prefix) > 0) then
write (file_name, '(a,i3.3,a)') trim(prefix) // 'dump', file_nn, ext
else
write (file_name, '(a,i3.3,a)') 'dump', file_nn, ext
end if
open (unit=lu, file=file_name, status='new', err=11)
close (unit=lu, status='delete')
end subroutine get_next_dump_file
|
The above fails with Ver 8.20 but not 8.10, while the new code works !
INQUIRE (FILE=file_name, EXIST=exist, OPENED=opened, IOSTAT=iostat)
John |
|