|
Post by mueh on Apr 15, 2021 3:09:07 GMT -5
George: After you fixed Robert's problem i checked the code what you changed and found another occurence in FUNCTION ClipboardGetFileName() AS STRING with an Mentry and no Mexit so i built a testcase and crash occures after 400 entries . ( SPFlite terminates shortly after popup window ) SPFLiteCrash.2021-04-1509-50-10.txt (9.13 KB) Thanks
|
|
|
Post by George on Apr 15, 2021 8:52:48 GMT -5
MUEH: That one has to have been there for ages, thank heavens it's in an infrequently used routine. How on earth did you spot it?
Whatever method you use I want to use it. It took me ages to narrow down my search using the old binary search and watching the trace counter.
George
|
|
|
Post by mueh on Apr 15, 2021 9:22:35 GMT -5
George: Since we have such a beautiful editor i'm using a do file to search for all FUNCTION SUB METHOD in Col 1 4 7 . I then did the find as shown in screen shot . If an Mentry is found and there is no MExit it must be a problem . Sorry that i looked in _TabData.inc only . I would have saved you much debugging time .
|
|
|
Post by George on Apr 15, 2021 10:15:24 GMT -5
mueh: Good method. Have to add MErrExit as well, many routines exit via issuing a message. Have to try that on a MEDIT of the whole source.
George
[UPDATE]
Used MUEH's method on a MEdit session of the whole SPFLite source.
Found 4 additional mismatched trace pairs, 3 of them the other way round - no MEntry but using MExit.
Thankfully they are all in very obscure routines, so minimal possible impact.
Many thanks to MUEH for his method.
[\UPDATE]
|
|
|
Post by George on Apr 15, 2021 11:26:43 GMT -5
Robert: Not sure I'd ever tackle such an item. While there can be only one MEntry, the exit can be via a variety of coding. (Mexit, MExitxxx, MErrExit and MLErrExit) as well as normal EXIT SUB|FUNCTION|METHOD or END SUB|FUNCTION|METHOD. All of them legitimate and not violating any standards.
Sounds a wonderful idea, but it's a significant piece of work.
George
|
|
|
Post by George on Apr 18, 2021 15:26:05 GMT -5
OK, I managed to get a Macro that does the MEntry/MExit validation done. It turned out to be a very worthwhile task. It turned up at least a half-dozen or more mismatches. A lot of them were in locations that would only be entered in some oddball error situations, but still, there's no way of knowing how big an impact these errors have had over the years. I will try and get a corrected version out shortly that incorporates the corrections. It still has one niggling false positive type finding, I'll eventually get that fixed in the macro. Meanwhile, just for curiosity, here's the macro. George MCheck.macro (3.64 KB)
|
|