|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Mon Dec 16, 2013 9:21 am Post subject: export_image@ problem |
|
|
I have recently installed FTN95 Ver 7.0
I am getting an access violation on the second call to export_image@,
where the file name has a .png suffix.
Actually the first returns an error code = 0; not sure why this would happen
.png DUMP file dump019.png
Size : 1468 x 943 (error= 0)
Code: | Subroutine Dump_jpg_func (message, prefix, ext)
!
! dumps a jpg file from active selected region
!
! use mswin
include <clearwin.ins>
!
character message*(*), prefix*(*), ext*4
!
integer*4 error_jpg, file_nn, nx, ny
character file_jpg*80
data file_nn / 0 /
!
! develop a screen dump file name
!
call get_next_dump_file (file_nn, file_jpg, prefix, ext)
if (file_nn > 999) then
error_jpg = -999
goto 100
end if
write (*,*) 'Dumping screen to ',trim (file_jpg)
!
error_jpg = export_image@ (file_jpg)
!
100 call get_graphical_resolution@ ( nx, ny )
write (98,1000) ext,file_jpg, nx, ny, error_jpg
1000 format (a,' DUMP file ',a, &
' Size : ',i0,' x ',i0,' (error=',i4,')')
!
if (error_jpg > 0) then
message = ext//' dump to '//file_jpg
else if (error_jpg == -999) then
message = 'Unable to open '//file_jpg
else
message = 'Unable to use '//file_jpg
end if
!
end subroutine Dump_jpg_func
|
I shall revert to Ver 6.36, built on 1st April 13 and see if the problem occurred then.
John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Dec 16, 2013 10:57 am Post subject: |
|
|
I have had a look at the code for export_image@ and it does not test for an active graphics selection when exporting png files. This would cause an access violation when there is no graphics region selected. I have fixed this bug and will aim upload a new salflibc.dll later today.
If this does not fix everything then I would need more (or less) information.
More, if I am to use the code above. Less if you can provide a small working program. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Mon Dec 16, 2013 12:02 pm Post subject: |
|
|
Paul,
I am doing a screen dump from an active %gr window. It is unlikely that the screen is not selected. I can select a background graphics region but that was not the case with the test today. I do the screen dump using a menu option.
Is it possible to have an error code related to the error ?
At the moment the only error codes appear to be 0 or -999, although I'm not sure of the history of these error tests I am using.
After installing Ver 7.0 I started to get this error on the second or third screen, so I then recompiled the graphics library and the program. The error now occurs on the first screen dump.
I will try two options of:
a) recompiling all libraries with Ver 7.0, then
b) recompiling all libraries with Ver 6.3 + ver 6.37 .dll and .lib
I think it was the ver 6.37 dll from April that first allowed dumps of .png file formats.
John |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Mon Dec 16, 2013 1:19 pm Post subject: |
|
|
Pail,
I have re-booted and tried a) : recompile everything and now can not reproduce the error !!
So, until I can show the error again, consider this problem closed.
Lately I have been including more reporting to the output window, via write (*,*). This does not clash with the graphics window and will allow me to check the return status of export_image@.
Thanks for your advice,
John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Dec 16, 2013 1:27 pm Post subject: |
|
|
I have uploaded a new salflibc.dll to http://www.silverfrost.com/beta/salflibc.exe
If this does not help, can you let me have a working sample program that illustrates the problem?
Functions of this kind only return 1 for success or 0 for failure.
If it was working for you before then I will be able to fix it for you when you send me some code. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Tue Dec 17, 2013 11:53 pm Post subject: |
|
|
Paul,
Thanks for the update. I will download the version you have posted and try it.
My success with the recompile was short lived, as the problem has re-occurred. Again it was on the second dump, after a first successful dump.
There are a few other areas I need to check so I will get back to you with better advice.
I do have a screen dump of the error, which I will email, together with a load map which might help with the error addresses. If it gives a clear indication of the problem, it might help but otherwise I'll try to get better information on the problem.
John |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Thu Dec 19, 2013 5:30 am Post subject: |
|
|
Paul,
I did some further changes to my program to check some variables that could cause problems and reloaded the program.
The same error occured.
this used salflibc.dll 7/9/2013
I then downloaded your update, dated 18/12/2013
The problem now does not occur, as I dumped 4 times without any problems. There were no error messages being reported, until I exited the program.
I will send you a load map and the screen dump of the errors with the Sep-13 .dll and the exit error with Dec-13 .dll. It might provide an indication of where the error occurred with the Ver 7.0.
Thanks very much for your help.
John |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|