View previous topic :: View next topic |
Author |
Message |
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Fri Oct 16, 2009 4:21 pm Post subject: Version 5.40 Problem? |
|
|
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:
3) 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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Fri Oct 16, 2009 7:01 pm Post subject: |
|
|
I will need more information. A html file with topic HELPPMPRINT maybe. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Sat Oct 17, 2009 8:12 am Post subject: |
|
|
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. |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Sat Oct 17, 2009 8:31 am Post subject: |
|
|
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> |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Mon Oct 19, 2009 7:27 am Post subject: |
|
|
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.
Code: | 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
|
|
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Mon Oct 19, 2009 11:44 am Post subject: |
|
|
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]&')
ii=winio@('%mn[&Help]&',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[]&')
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 |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Tue Oct 27, 2009 9:40 am Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Tue Oct 27, 2009 6:22 pm Post subject: |
|
|
The fix will almost certainly be limited to salflibc.dll.
Hopefully I will be able to take a look at this later this week. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8037 Location: Salford, UK
|
Posted: Mon Nov 02, 2009 3:08 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
BILLDOWS
Joined: 22 Jul 2005 Posts: 86 Location: Swansea, UK
|
Posted: Mon Nov 02, 2009 3:52 pm Post subject: |
|
|
Paul,
Many thanks - and sorry about my slack programming (that worked with the old SALFLIB) .
|
|
Back to top |
|
|
|