View previous topic :: View next topic |
Author |
Message |
Ralf
Joined: 30 Aug 2007 Posts: 50 Location: munich
|
Posted: Fri Jul 20, 2018 12:55 pm Post subject: editable list view control |
|
|
I am struggling with program crashes when using a 64bit executable with editable list views. I have tracked down the Problem to the SRC-Compiler in conjunction with a user supplied manifest.
See the following simple program:
Code: |
winapp
!=================
Program Test_Listview
!=================
integer,dimension(2) :: isel
character(len=20),dimension(0:1) :: items
integer :: winio@
integer :: iw
items(0) = '|Header'
items(1) = '|Test'
iw = winio@ ('%ca[Test lv]&')
iw = winio@ ('%lv[edit_cells]',200,100,items,2,isel,1)
stop
end
|
This program runs fine without linking a resource file. but when I link a resource file using the clrwin.manifest file (copied from the FTN95 manual),
I get a program crash as soon as I leave a cell from the listview (etc. by pressing the tab-key).
When I use a resource file without the line:
Code: |
1 24 clrwin.manifest
|
I don't get any crashes
Last edited by Ralf on Fri Jul 20, 2018 1:17 pm; edited 1 time in total |
|
Back to top |
|
|
Ralf
Joined: 30 Aug 2007 Posts: 50 Location: munich
|
Posted: Fri Jul 20, 2018 1:16 pm Post subject: |
|
|
This is the error message:
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Sat Jul 21, 2018 8:13 am Post subject: |
|
|
I am not clear as to whether a manifest makes any difference under 64 bits. If it does then the manifest takes a different form.
See for example, ftn95.chm under "x64 platform" and "Introduction to 64 bit FTN95". |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Sat Jul 21, 2018 9:45 pm Post subject: |
|
|
Oddly, the manifest referred to mentions 'Win32'.
Eddie |
|
Back to top |
|
|
Ralf
Joined: 30 Aug 2007 Posts: 50 Location: munich
|
Posted: Mon Jul 23, 2018 8:23 am Post subject: |
|
|
Paul,
I would like to use the manifest, since without this I get an old Win95 style for buttons and other controls.
I use exactly the example from ftn95.chm "Introduction to 64 bit FTN95".
If I try to change attribute values (like "ia64" for processorArchitecture) according to the Microsoft documentation (https://docs.microsoft.com/de-de/windows/desktop/SbsCs/assembly-manifests) the program does'nt start at all with different error Messages.
@Eddie : win32 is the only possible value for the type attribute according to the Microsoft pages. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Mon Jul 23, 2018 10:26 am Post subject: |
|
|
Hi Ralf,
That's interesting. I never understood manifests, as they are described in a language that I don't speak - even though it purports to be English!
A good number of years ago, I discovered somewhere the default.manifest, and I have used it as a mantra to ward off evil Win95 demons and give me a later look and feel without the bad vibes- but then I only have need for the 32-bit version.
My (limited) understanding of such things suggests that ia64 is a bad choice, as I think FTN95/64 uses the other (x64) option.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Jul 23, 2018 2:07 pm Post subject: |
|
|
Ralf
The key is to change from
processorArchitecture="X86"
to
processorArchitecture="*"
within <dependentAssembly>.
"*" appears to work for both "X86" and "x64". |
|
Back to top |
|
|
Ralf
Joined: 30 Aug 2007 Posts: 50 Location: munich
|
Posted: Mon Jul 23, 2018 2:31 pm Post subject: |
|
|
Paul,
that's what I actually use. I took the clrwin.manifest-example from ftn95.chm:
Code: |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
</assembly>
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Jul 23, 2018 7:10 pm Post subject: |
|
|
Ralf
It worked OK for me. I will check it again tomorrow. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Jul 23, 2018 7:35 pm Post subject: |
|
|
Ralf
If you run SRC externally then you need /r on the command line.
Then load the .res file when linking with SLINK64. |
|
Back to top |
|
|
Ralf
Joined: 30 Aug 2007 Posts: 50 Location: munich
|
Posted: Wed Jul 25, 2018 10:46 am Post subject: |
|
|
Paul
this is exactly what I do.
These are all the files, that I use for building the sample program:
Source-file "testlv.f95" :
Code: | winapp
!=======================================================================
Program Test_Listview
!=======================================================================
integer,dimension(2) :: isel
character(len=20),dimension(0:1) :: items
integer :: winio@
integer :: iw
items(0) = '|Header'
items(1) = '|Test'
iw = winio@ ('%ca[Test lv]&')
iw = winio@ ('%lv[edit_cells]',200,100,items,2,isel,1)
stop
end |
Resource-file "tlv.rc":
Code: | 1 24 clrwin.manifest |
makefile "make_testlv.bat" for building the program:
Code: | src tlv.rc /r
ftn95 /64 testlv.f95
slink64 @lw |
link-file "lw" :
Code: | lo testlv
lo tlv.res
windows
file Test_lv |
clrwin.manifest is the same as posted on Monday.
Starting the program, editing the cell with contents "Test" and exiting the cell by pressing the tab-key produces the crash with the error message posted above.
When I compile and link the same source as 32bit, the program runs fine.
I am using version 8.30 on a PC with Windows 10 Enterprise |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Wed Jul 25, 2018 5:19 pm Post subject: |
|
|
Ralf
I have managed to generate an error condition. I did not activate the cell as you now describe.
I will make a note that it needs investigating. The failure occurs within the Windows API so it might be difficult to fix. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Aug 06, 2018 1:50 pm Post subject: |
|
|
Ralf
I now have a potential fix for this failure. It is a fix that needs verifying in that it could do more than fix the failure by perhaps stopping other legitimate activity.
Here is a link to a clearwin64.dll specifically for this issue with the potential fix applied.
https://www.dropbox.com/s/4tf2m46kelcowdj/newDLLs25.zip?dl=0 |
|
Back to top |
|
|
|