bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 14, 2022 8:47:36 GMT -5
I have F12 set to RETRIEVE
Some times, after a CHANGE command, F12 after won't retrieve the CHANGE. I'll see the other commands in the stack but not the CHANGE. Did the CHANGE command get left off the stack?
Unfortunately this doesn't happen always. The retrieve of CHANGE seems to work fine at the start of a session, but at some point additional CHANGE commands stop being retrieved. I haven't been able to determine a condition or pattern that triggers this.
FYI. I always abbreviate CHANGE as C. Minimum command length for RETRIEVE is set to 1 in Global Options. Thanks, Bob
|
|
|
Post by George on Feb 14, 2022 9:13:00 GMT -5
Hi Bob, Hmm, have to have a look. George
|
|
|
Post by George on Feb 14, 2022 12:41:19 GMT -5
Robert: I haven't been able to duplicate bobd's results (naturally, it never fails for me)
I did a total re-write of all the retrieve stuff a couple versions back, storing all data in a new Object to protect the integrity of access. I just have no more ideas, I'm stumped.
George
|
|
|
Post by George on Feb 14, 2022 16:10:26 GMT -5
Robert: And if I did, how would I even spot it?
The only places the Retrieve Object is referenced are where the command processor passes the command and says "Store this" and the RETRIEVE and CRETRIEV commands which ask for retrieval. I mean it really can't get much simpler. I'm not doubting there is something odd happening, people don't report stuff for no reason, but without some reasonable clues I'm left with staring at code which works 99% of the time. I test, and it works, reading code does not solve this.
George
|
|
|
Post by George on Feb 15, 2022 9:30:23 GMT -5
OK then users, I'm sure regular forum visitors read all the postings (we're not THAT busy).
So, what are others experiencing? If it's failing, any patterns? Any and all clues welcome.
|
|
|
Post by Stefan on Feb 15, 2022 10:47:54 GMT -5
bobd,
Grasping at straws... have you tried a RESET RETRIEVE command and see if you an spot a pattern as you repopulate the stack?
George,
RESET RETRIEVE
Does it just clear the entries from the stack or does it also validate that there are the correct (probably 50) entries in the [RDEFAULT] table? I note that neither CFGMAINT -IMPORT nor -EXPORT complain if the count and the number of actual lines/entries do not agree. Is it even an issue if the count (50) and the number of line/entries that follow do not match?
(v2.5.22014), RESET RETRIEVE doesn't work on FM screen. Any reason why it should only work in edit sessions?
|
|
bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 15, 2022 19:05:05 GMT -5
Good suggestion. I'll give it a try.
Bob
|
|
bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 16, 2022 14:54:59 GMT -5
I've done the RESET RETRIEVE and am trying to duplicate the problem (and find a pattern), but of course now it's not occurring. I'll keep trying.
Is it possible that clearing the stack fixes the problem, at least temporarily?
Bob
|
|
bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 17, 2022 9:31:44 GMT -5
Unfortunately the problem is still occurring after the RESET RETRIEVE. As I mentioned earlier, the RETRIEVE works fine at the start of a session but then doesn't later in the session. Thus far I am unable to determine a pattern or condition that triggers the error to start.
Bob
|
|
|
Post by George on Feb 17, 2022 11:46:30 GMT -5
When SPFLite starts, the previous retrieve stack is loaded. It doesn't matter how many are in the CFG file, it doesn't validate the control entry since it will handle a real number < or > 50. It either throws away those over 50 or inserts nulls if under 50. There is no top-of-stack or current-stack pointer saved in the CFG file, the retrieve pointer is always started at the 1st entry. RESET RETRIEVE simply nulls all 50 entries and resets the pointer to the top. Stefan: RESET RETRIEVE doesn't work in FM because the Command Table is simple minded and has RESET flagged as Edit only. The command vakidation table doesn't get down into operand level fine-tuning. There's really no such thing as the stack being "wrong" and staying wrong. It's a simple 50 item array, with one single pointer to the 'current' entry. Forward and backward retrieve simply INCR or DECR the pointer, handle wrap-arounds, and return the entry. New entries are always inserted at the top, and all others pushed down, with the 50th entry dropped from the end. The Retrieve object code is trivial, hardly worth putting into an Object structure. But if anyone can spot some stupidity in here, that would be great. _ObjRtr.inc (6.77 KB) George
|
|
|
Post by George on Feb 17, 2022 16:57:43 GMT -5
Robert: Hmm, yes, that looks like it may be dropping the 1st entry on initialization, a pretty dumb error. But even if it is dropped, that doesn't account for the failure to add entries later on.
And no, the table is never reloaded 9wy would it?). The call to add an entry is simply done in the main code evaluating what the command line contains. It is not dependent on WHAT the command is.
George
|
|
bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 18, 2022 9:09:12 GMT -5
I think I found something...
I have F5 set to RFIND, F6 set to RCHANGE, F12 set to RETRIEVE, and CTRL set to ENTER.
If I key in a CHANGE command and press CTRL, then F12 retrieves the CHANGE command.
But if I key in a CHANGE and press F5 instead of CTRL (to see where the CHANGE will occur), and maybe follow with F6 (to perform the CHANGE), then F12 doesn't retrieve the CHANGE command. It looks like it doesn't go into the stack.
Same thing happens if I key in a FIND then press F5 instead of CTRL, the FIND isn't in the stack.
-----------------------------------------------
Could it be that keyed in FIND and CHANGE commands don't go into the stack if they're triggered via RFIND/RCHANGE instead of ENTER?
So maybe it's not a problem with the stack, but an issue with RFIND and RCHANGE.
Hope this helps, Bob
|
|
|
Post by George on Feb 19, 2022 16:20:21 GMT -5
bobd: Good catch. I'll have to check that logic, but the ability to use RFIND to trigger a FIND ALL or CHANGE command is pretty hairy, I remember way, way back when I wrote it, it was pretty tricky. Sure sounds like you're pointing in the right direction
George
|
|
|
Post by George on Feb 19, 2022 16:43:17 GMT -5
bobd: OK, tracked it down. It has to do with how commands entered manually, and commands entered via a PFK key (with other commands present on the command line) are handled as far as Retrieve is concerned. (Yes, it gets very convoluted)
I think I've added yet another wrinkle to the logic to handle it. There's a new Beta, I'd appreciate some feedback.
George
|
|
bobd
Freshman Member
Posts: 10
|
Post by bobd on Feb 19, 2022 17:26:10 GMT -5
Thanks, George. I did some testing with the beta and the issue appears to be fixed. I'll do more testing but it's looking good!!
Thanks again, Bob
|
|