Silverfrost Forums

Welcome to our forums

export_image@ problem

16 Dec 2013 8:21 #13476

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)

    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

16 Dec 2013 9:57 #13477

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.

16 Dec 2013 11:02 #13479

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:

  1. recompiling all libraries with Ver 7.0, then
  2. 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

16 Dec 2013 12:19 #13480

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

16 Dec 2013 12:27 #13481

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.

17 Dec 2013 10:53 #13483

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

19 Dec 2013 4:30 #13497

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

Please login to reply.