forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Crash using HELP facilities
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 653
Location: Morrison, CO, USA

PostPosted: Tue Oct 29, 2019 10:12 pm    Post subject: Reply with quote

Thinking that there may be a memory allocation issue, I cut the size of a couple of dimensions by a factor of 10. This dropped the executable size (as reported by the Task Manager) from 884 MB to 336 MB.

Now, The help file loads. None of the images are displayed, but the text is there.

It also appears that the lookup token cannot be dynamically created; it must be statically allocated.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6067
Location: Salford, UK

PostPosted: Tue Oct 29, 2019 10:42 pm    Post subject: Reply with quote

With the changes that I outlined, I don't get any "lock ups" when running your sample.

I am not sure what you mean by "dynamically created" but if you can provide an example then I might be able to comment.

I am wondering if you understand that C-MasterHelp.chm should also run independently. For example you can run it directly from Microsoft file Explorer by double clicking on it (the chm file). But the version that you provide in the download is not yet fully functional. You can run it and view the help contents etc. but when you select a topic, the topic is not displayed.

I would only attempt to access C-MasterHelp.chm from your Fortran program after getting it to work independently as a stand-alone "application". (Actually its not an executable but is compiled hypertext that presumably the OS passes to the same "reader" that is used by Windows Explorer etc..)
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 653
Location: Morrison, CO, USA

PostPosted: Tue Oct 29, 2019 11:28 pm    Post subject: Reply with quote

Hi Paul,

With the changes, and the test program, I don't get any lock-ups either.

But, these same commands and syntax (i.e. trailing NULL) still crash/lock when used in my full program. It works better (but not 100% successfully) if I drastically reduce my program size (static arrays).

I will use the USE_URL@ subroutine to get the help file displayed, and then the user can find the appropriate section. Or, I might be able to use the HH.EXE program. Still working on that last one, but Microsoft made it really hard.

The "dynamically" refers to the lookup token being passed as a character string. To this must be added a NULL, so if one just codes that in [//CHAR(0)], it is built on the stack (dynamically). That does not work. S, I have to create a static variable in that routine, and parse the token and add the NULL.

Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6067
Location: Salford, UK

PostPosted: Wed Oct 30, 2019 8:44 am    Post subject: Reply with quote

Bill

I have had another look at this but I have run out of time for now.

The following seems to work. I have also got it working with a simpler form but I am not sure that the simpler form is safe.

Code:
    character*260:: help_file='c-masterhelp.chm'
    character*24 verify,export,integrity,catalog
    verify = 'verify'//char(0)
    export = 'export'//char(0)
    integrity = 'integrity'//char(0)
    catalog = '"Catalog Search File"'//char(0)
    i = winio@('%ww[independent,not_fixed_size]&')
    i = winio@('%ca@&','Main Caption goes here')
    i = winio@('%mn[help[help1 - catalog]]&','HELP_LOOKUP',help_file,catalog)
    I = WINIO@('%mn[[help2 - verify]]&',     'HELP_LOOKUP',help_file,verify)
    I = WINIO@('%mn[[help3 - export]]&',     'HELP_LOOKUP',help_file,export)
    I = WINIO@('%mn[[help4 - integrity]]&',  'HELP_LOOKUP',help_file,integrity)
    i = winio@('%mn[[help5 - Full File]]&',  'HELP_CONTENTS',help_file)
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 653
Location: Morrison, CO, USA

PostPosted: Wed Oct 30, 2019 5:56 pm    Post subject: Reply with quote

Thanks, Paul, for the effort. Since I'm not a Windows expert, there is little more that I can do also.

I have not abandoned the CHM file, nor incorporation into my software. I will use "use_url()' to open the help file for the user until I can get it to run in the same address space as my application.

I have some other things to try, but, like you, I have run out of time for this problem. Still thinking about it, though!

Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6067
Location: Salford, UK

PostPosted: Thu Oct 31, 2019 8:34 am    Post subject: Reply with quote

I have added an alternative to the standard callback HELP_LOOKUP. The alternative which has the name HELPLOOKUP takes a character variable that does not need the terminating null.

This will be available in the next release of the DLLs.

I think that this resolves the issue as far as it concerns ClearWin+.
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 653
Location: Morrison, CO, USA

PostPosted: Thu Oct 31, 2019 2:57 pm    Post subject: Reply with quote

Thanks for your efforts, Paul.

An interesting factoid; HelpScribble will display the help file it is working on for you, but does so by running hh.exe with some command line processing of the file. I have yet to understand how they do this because the documentation I have on HH.EXE has yielded nothing of value (except how to decompile a CHM file). So, they run the help file in a separate address space.

I find that interesting.

Bill
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 653
Location: Morrison, CO, USA

PostPosted: Thu Oct 31, 2019 7:46 pm    Post subject: Reply with quote

Some of the problems I had with the test program were likely because the folder into which the Help File was placed was a mapped drive. And, you can't have a CHM file on a networked drive unless you undo the Microsoft Security in the registry. So there is that. I should have recognized this earlier.

As an FYI, my SW is run from a physical drive and the help file is also stored there, so I'm not running into that issue with my operational SW.

That said, there are still problems with the sample even when the file is on a regular drive. I get the same lock-ups, and the search does not yield the proper results.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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