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 1, 2  Next
 
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: 652
Location: Morrison, CO, USA

PostPosted: Sun Oct 27, 2019 2:54 pm    Post subject: Crash using HELP facilities Reply with quote

I have run into an intermittent error. I am running /CHECKMATE as I test the interfaces and coding.

I have incorporated HELP into my program, and am getting a crash message about the application running out of memory. It is occurring only when I click on my HELP menu item, and usually the third or fourth item clicked. That said, as a test, I opened HELP for 10 items, and didn't get a crash - thus the intermittent nature.

Looking at the task manager at the time of the crash, it indicates the program is consuming 864 MB. In my link step, my link options for memory are:
Quote:
/heap:12000000,6000000 /stack:9600000,4800000


Since it is only when I invoke HELP that the error is occurring, only a couple of options come to mind. One is that when HELP is decompressing the file, it might attempt allocate a great deal of memory, and the error occurs. Or, as I am building the windows, I have a temporary on the stack that I have included in a winio@() statement that shouldn't be there. (I have to watch out for that one!). I have known this to sometimes cause an issue with concurrent windows getting hammered at run-time.

Any insights one may have will be most appreciated.
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Sun Oct 27, 2019 5:07 pm    Post subject: Reply with quote

One other piece of information.

There seems to be an issue with the keyword sent to the HELP facility. For example, one of my keywords is "INDIVIDUAL LOG STRIP". This is a character constant supplied as an argument to the routine that builds the winio@() command to create the menu entry.

However, the string being processed by the HELP facility is:
Quote:
INDIVIDUAL LOG STRIPOption Selected=Q/st/sc=range=


The "extra" stuff are character constants used elsewhere in the program.

Some of the keywords work fine; this one did not.

Perhaps this kind of problem might be the cause of the crashes?
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Sun Oct 27, 2019 5:57 pm    Post subject: Reply with quote

The text of the crash is preceded with a big red "X" in a circle. Text reads:
Quote:
There is not enough memory available for this task. Quit one or more programs to increase available memory, then try again.


The Task Manager shows I'm using only 32% of my 32gb.

I think this is an OS message, not ClearWin+.
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2095
Location: South Pole, Antarctica

PostPosted: Mon Oct 28, 2019 3:33 am    Post subject: Reply with quote

Bill,
1) Are you using 32bit FTN95 not 64bit one?
2) Are you using mixed language programming?
Back to top
View user's profile Send private message
wahorger



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

PostPosted: Mon Oct 28, 2019 5:19 am    Post subject: Reply with quote

Dan,

1. Yes, 32-bit.
2. Yes. Coordinate transformation/conversion, report generation (PDF creation) All are compiled using SCC.

Unasked:
a. Same problems occur with /CHECKMATE and /RELEASE.
b. Using /stack and /heap in the SLINK step can cause "odd behaviors". Thought it might be an issue.....

Insights?
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2095
Location: South Pole, Antarctica

PostPosted: Mon Oct 28, 2019 5:44 am    Post subject: Reply with quote

1) if you started playing game with the devil (stack) and his wife (heap) you are done. Just dump effing 32bs forever. Use 32 just temporally for debugging unknown for 64bit compiler bug or if SDBG64 shows wrong line.

2) never use two compilers in the same program
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Oct 28, 2019 9:13 am    Post subject: Reply with quote

Quote:
I have incorporated HELP into my program


Can you expand on this statement?

The immediate ClearWin+ options are to use %ht or %wb. An alternative is to create a compiled html file (like ftn95.chm) and access it from your program.
Back to top
View user's profile Send private message
wahorger



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

PostPosted: Mon Oct 28, 2019 3:40 pm    Post subject: Reply with quote

Paul, sorry I was not clear.

I have both the %th as well as the callback form
Quote:
i.e. winio@('%mn[Help[Help]]','HELP_LOOKUP',HELP_FILE,TOKEN)


I use HelpScribble to create the CHM file. After the compile of the help file, there are no errors listed.

The crash I get does not invoke the Salford traceback, either in /CHECKMATE or /RELEASE.

There are other symptoms that can occur when the help file is finally opened. But one step at a time!
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Mon Oct 28, 2019 3:43 pm    Post subject: Reply with quote

All the problems are using the compiled .CHM file.
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: Mon Oct 28, 2019 4:52 pm    Post subject: Reply with quote

Is it possible to create a sample program and put a sample chm file on DropBox?
Back to top
View user's profile Send private message
wahorger



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

PostPosted: Mon Oct 28, 2019 5:15 pm    Post subject: Reply with quote

I'll see if I can get it to happen with a sample. When I was playing around to understand how it all worked, I did that, but only used a very small, extremely simple CHM file.

That said, will work on it and post the links here.
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Mon Oct 28, 2019 5:49 pm    Post subject: Reply with quote

I have a sample prepared. It does not exhibit all the symptoms I've seen, but it does show some of the most puzzling.

The link to DropBox is: https://www.dropbox.com/s/mpyrw85wzdqpeik/HTMLHELPCHM.zip?dl=0

I have included the entire Plato project file as well. In the small program, I've included some additional comments about the keyword lookup and what the CHM file has for matches.

There are 5 menu callbacks.
help1 will cause a dialog to be displayed that there are multiple topics available and ask that you choose one for display. This locks up, and I have to use the task manager to kill the program.

help2 will show bring up the help file, but the Index box will show the word "verify" a bunch of spaces and an undefined character string.

help3 will show "export verify " and the character string.

help4 will show "integrity export verify " and the character string.

help5 will display the CHM file from its beginning.

The CHM file is still in process of being edited and built, but does compile with no errors from its source.
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 5:17 pm    Post subject: Reply with quote

In this context the keyword strings must be null terminated. For example in your program...

Code:
verify//char(0)


Also strings containing spaces must be within quotes. For example in your program...

Code:
'"Catalog Search File"'//char(0)


According to the Microsoft documentation, a list of keyworks may be used provided they are separated by semi-colons.
Back to top
View user's profile Send private message
wahorger



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

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

Paul, this is awesome. I had stumbled onto the null-termination when I saw the multiple items problem, but was unaware of the quoting of a string with spaces.

One question: If the appending of the char(0) is done in a function/sub-routine, when does this "bind"? Stated another way, does this new string need to remain in statically allocated memory (not on the stack)?

I'm still puzzled by the "HELP_CONTENTS" lock-up.

More TBA, yes?
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Tue Oct 29, 2019 7:16 pm    Post subject: Reply with quote

Well, some success. I walked down through the menu selections one at a time, and here are the results.

help 1: Using double quotes shows (in the Index field) the string enclosed in double-quotes.

help2: Index field tab still shows the first selection, the Search tab shows the word export (my last manual search).

help3: Index field tab still shows the first selection, the Search tab shows the word export.

help4: Index tab shows the word integrity, and the index item installation is selected.

help 5: Goes to the Content tab and selects the first entry.

While the help file was open, I tried to do a Search using the double quoted term (without the double quotes). It found multiple topics as I expected.

In my application, however, the results after making the double-quote change are still not useful. No matter what I do, the display of the help file locks up, and the task has to be killed.

I am letting the stack and heap default during the link step.
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 1, 2  Next
Page 1 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