Silverfrost Forums

Welcome to our forums

Version 5.40 Problem?

16 Oct 2009 3:21 #5194

I have recently installed the latest version of the compiler (v5.40) on a 32 bit Vista machine and am experiencing a problem (in just one respect) with unedited programs that worked fine with V5.2.

  1. The programs compiled under 5.21 give the runtime error detailed below when run using the latest salflibc.dll

  2. The programs give the same error when compiled and run under v5.4 with (obviously) the latest salflibc.dll.

AS AN ADDITIONAL POINT:

  1. Programs compiled with the latest compiler and then run using the v5.21 salflibc.dll work fine.

The code involved loads a hypertext help window - this works fine - but when the window is closed the error reported below results.

Whilst I could spend time getting a somewhat smaller test program together it may be obvious that there is a basic error on my part or otherwise??

The Help routine called:

c Function for HELP c integer*4 function help_func() INCLUDE <WINDOWS.INS>

  external exithelp_func
  integer*4 exithelp_func

  integer*4 ii,iconforh

  character*12 bookmark
  common /bookit/ bookmark

c bookmark = 'HELPPMPRINT' c ii = winio@('%`bg[white]%ww[]&') ii = winio@('%ww[no_maxbox]%pv%mn[Exit Help]%80.20ht@%lw[owned]', 1 exithelp_func, bookmark, iconforh)

  help_func = 1L
  end

c integer*4 function exithelp_func() exithelp_func = 0L end c


On closing the window using Exit Help:

Access Violation

Instruction at address 00000000 attempted to read from location 00000000

Salford Exception Handler Failure to register registers dialog procedure Information will appear in a simple message box

Any assistance would be appreciated

Many Thanks

Bill

16 Oct 2009 6:01 #5198

I will need more information. A html file with topic HELPPMPRINT maybe.

17 Oct 2009 7:12 #5201

The problem will almost certainly be somewhere in the HTML markups. If you can isolate the problem for me then it should be fairly easy for me to fix salflibc.dll.

17 Oct 2009 7:31 #5202

UPDATED 9.15 SATURDAY 17th

Many thanks Paul - please find a cut down version that fails below. It would seem that it may not be HTML coding?

All the best

Bill


<HTML> <TITLE> HELP </TITLE>

<DOC name='HELPPMPRINT'>

Screen, Printer, File and Email Output

</HTML>

19 Oct 2009 6:27 #5211

I have created a program from the information that you have provided as listed below and this runs OK for me using version 5.4 of FTN95 and running under Windows 32bit XP. Can you confirm that this fails on your machine.

      program main
      include <windows.ins>
      integer help_func
      external help_func
      call add_hypertext_resource@('help')
      i = help_func()
      end
c Function for HELP 
c 
      integer*4 function help_func() 
      INCLUDE <WINDOWS.INS> 
      
      external exithelp_func 
      integer*4 exithelp_func 
      
      integer*4 ii,iconforh 
      
      character*12 bookmark 
      common /bookit/ bookmark 
c 
      bookmark = 'HELPPMPRINT' 
c 
      ii = winio@('%`bg[white]%ww[]&') 
      ii = winio@('%ww[no_maxbox]%pv%mn[ExitHelp]%80.20ht@%lw[owned]', 
     1             exithelp_func, bookmark, iconforh) 

      help_func = 1L 
      end 
c 
      integer*4 function exithelp_func() 
      exithelp_func = 0L 
      end 

      resources
      help HYPERTEXT h1.html
19 Oct 2009 10:44 #5213

Dear Paul,

Many thanks for the early morning response! I was just going to (try to)put together a 'mini' example.

I can confirm that the example you posted runs perfectly.

However, if I extend your example a bit as below selecting Help and then closing the Help box results in the failure as originally reported.

Many thanks for the quick response.. Bill

  program main 
  include <windows.ins> 
  integer help_func 
  external help_func

  integer*4 ii
  integer*4 exit10_func
  external exit10_func
   
  call add_hypertext_resource@('help') 

cc i = help_func()

  ii=winio@('%ww[no_sysmenu,no_minbox,maximise]&amp;')
  ii=winio@('%mn[&amp;Help]&amp;',help_func)
  ii=winio@('%^7bt[Finish]',exit10_func)
 
  end 

  integer*4 function help_func() 
  INCLUDE <WINDOWS.INS> 

  external exithelp_func 
  integer*4 exithelp_func 
  integer*4 ii,iconforh 
  character*12 bookmark 
  common /bookit/ bookmark 
  bookmark = 'HELPPMPRINT' 
  ii = winio@('%`bg[white]%ww[]&amp;') 
  ii = winio@('%ww[no_maxbox]%pv%mn[ExitHelp]%80.20ht@%lw[owned]', 
 1 exithelp_func, bookmark, iconforh) 
  help_func = 1L 
  end 

c integer*4 function exithelp_func() exithelp_func = 0L end

  integer*4 function exit10_func()
  INCLUDE <WINDOWS.INS>
  exit10_func = 0L
  end

  resources 
  help HYPERTEXT h1.html
27 Oct 2009 8:40 #5263

Dear Paul,

I assume this bug is now in your 'to do' tray when time permits. The current work-around of using a previous version of salflib.dll with v5.40 appears to work OK.

It would be most helpful to know if the eventual 'fix' is likely to be 'simply' be an updated version of salflib.dll or something impacting on the compiler itself??

Many Thanks, Bill

27 Oct 2009 5:22 #5266

The fix will almost certainly be limited to salflibc.dll. Hopefully I will be able to take a look at this later this week.

2 Nov 2009 2:08 #5304

This is an error in your code. You need to add the following line

save iconforh

This variable is being accessed when it is nolonger in scope.

2 Nov 2009 2:52 #5306

Paul,

Many thanks - and sorry about my slack programming (that worked with the old SALFLIB) .

😄

Please login to reply.