|
Post by Jo on Feb 25, 2024 13:27:29 GMT -5
I hate unreproducible errors and I hate to report such errors, but I think you should know about. And maybe someone has any idea ...
Today I tested a short FM-Macro and I had 3 SPFLiteCrash, but the next execution completed without error. The macro ends with SPF_Post_Do("(Home)(EraseEOL)FF " + anytext )
SPFLite V(3.0.24045) @ 2024-02-25 18:42 SPFLite has encountered an execution exception (C0000005) Last Interactions were: . . . . K=ENTER K=HOME K=ERASEEOL K=ENTER P=FF anytext
Module Back Trace: 01 MAINCDOKEYSTRING 00 REALPBMAIN
|
|
|
Post by George on Feb 25, 2024 13:40:30 GMT -5
Jo: How about:
Send me the macro. Try assigning the new primitive (CmdLog) to a key and invoking it, before testing. and sending me the log it creates (whether it crashes or not). The log is in the SPFLite Home Data folder.
George
|
|
|
Post by Robert on Feb 25, 2024 14:02:15 GMT -5
Jo, is your syntax for SPF_Post_Do accurate and correct? If "anytext" is a variable, then unless you did something like,
anytext = "anytext"
then the trace contents of "P=FF anytext" seems unlikely.
If you have 'fudged' the output for privacy reasons, maybe you could rerun with some dummy but actual data.
Not sure if this helps, but maybe it would clarify things.
R
|
|
|
Post by Jo on Feb 25, 2024 14:13:19 GMT -5
|
|
|
Post by George on Feb 25, 2024 14:35:52 GMT -5
Jo: The macro seems to run fine here (assuming I understand its purpose properly)
What does it do differently for REX files, I'm not sure about that part.
George
|
|
|
Post by Robert on Feb 25, 2024 16:03:10 GMT -5
Jo, could you show the ChkSpfVers.Macro too?
Also, I am puzzled by the final line, Halt(fail,Get_MacName$, "should run as LineCommand")
It seems based on the logic, this line will always execute. It would be more typical to put a check for this much earlier, right after you check for Is_FM, like: If False Is_Line_Cmd then Halt(fail,Get_MacName$, "should run as LineCommand")
R
|
|
|
Post by Robert on Feb 25, 2024 16:24:42 GMT -5
Jo, I have some questions about the macro.
1. It seems you are using the macro to find if the name of the file itself is found within the text of the file. So, you are trying to find "ABC" in file ABC.TXT. Is that right?
2. Since you are going through a list of files in FM and are in a loop, it seems that you will be issuing SPF_Post_Do possibly more than once. I am not aware of this function supporting multiple calls to it before the macro it is in exits. George, could you comment on this? If SPF_Post_Do can be called more than once in a single macro, is some kind of delimiter between calls to it needed, like $CRLF or (Home) (Enter) or something? After all, you could end up issuing multiple FF primary commands in FM. Is that what you intended?
R
|
|
|
Post by George on Feb 25, 2024 16:45:44 GMT -5
Robert: Without checking, Post_Do should just stack the commands on a FIFO basis.
|
|
|
Post by Jo on Feb 28, 2024 6:36:40 GMT -5
now, the FIND macro runs fine, as it did before I added the .REX check. First version scans all files in the actual filelist to find the selected filename. This is fine for any #include,%include, ... to find modules using the selected file. The .REX was added to find only the base part of then name, since a rexx call instruction or function call uses only the base part of the file (.REX is assumed).
The ChkSpfVers.Macro is a more historic macro. I still have some XP-systems with SPFLite V1,Rel 8 and I wanted to use the same macros as in V1 Rel 11 with FM-macros and now with V2. Therefore, then ChkSpfVers.Macro did grow over time. And it was very useful when FM-Macros started to exist.
Robert, the last line is here to catch the case where no line is selected. You can use FIND as a primary command and select a line with s or z or whatever. Or you use FIND as linecommand.
In the last 3 days I had no crash. And I did not change any macros. So, maybe the crashes resulted from a previous macro-error (syntax, or undeclared variable, or ...).
|
|