|
Post by mueh on Mar 8, 2021 8:24:00 GMT -5
George, V2.2.20191 Added option to the Pop-Up for a missing file type Profile to simply CANCEL out
of the file Open.
if CANCEL is done during Start of SPFLite an Empty Tab remains in task list .
If RMB is pressed following crash occures since END command is issued in this tab .
SPFLite V(2.4.21066)
SPFLite has encountered an execution exception (C0000005)
Last Interactions were:
P=END
Module Back Trace:
05 | DOPENDINGTABDELETES
04 | DOCMDINOTHERTAB
03 | DOCURSOR
02 | PCMDEDIT
01 | DOCURSOR
00 | REALPBMAIN
This Tab is already on Global Tab Del queue but during START DoPendingTabDeletes is not done .
Hiting any other key deletes the tab without crash since
SUB MainBUserMsg()
DoPendingTabDeletes ' Do any pending Tab deletes
does it .
No problem if edit is issued as a cmd .
Do you think it's worth to fix it by adding DoPendingTabDeletes after SPFLite start ?
I appreciate your thread "An interesting exercise" and have 2 questions
1. At what point do you write the trace entry ? (MEntry/MExit/Somewhere else)
2. Will you make it available to user ?
|
|
|
Post by George on Mar 8, 2021 10:13:22 GMT -5
MUEH: Adding DoPendingTabDeletes is fine, if there's nothing to do, it just exits anyway.
Trace is not done for all modules, for many it's just not worth it, so it's only present for larger blocks of code, mainly ones that perform calls to other modules. It can be a pain adding it to a module since you have to be sure to locate and tweak every exit from the code. e.g. IF condition THEN EXIT FUNCTION has to be IF condition THEN MExitFunc. And you can't just 'fall out' the END FUNCTION, you must make sure MExit is done first. If missed, the code works fine, but the trace stack gets totally messed up.
Make what available? The Trace ability? Please explain.
George
|
|
|
Post by mueh on Mar 9, 2021 2:34:19 GMT -5
George: Thanks for adding DoPendingTabDeletes in 2.4.21067 . It works on first start of SPFLite but fails on addtional starts . Maybe you have to add an additional call .
for 'make trace available to user' my question is How can i make that Module trace ? ( f.e. for this Problem also i know that DoPendingTabDeletes doesn't create trace entry .) Thanks
|
|
|
Post by George on Mar 9, 2021 12:14:17 GMT -5
MUEH: the added call is invoked whenever there are file(s) to be re-opened at startup, or if a file was passed on the command line. So I don't understand the 'fails on additional starts'. Trace can not be invoked dynamically, it is source code compiled with the rest of the code. And every one adds that teeny tiny bit of overhead. George
|
|
|
Post by mueh on Mar 9, 2021 12:27:04 GMT -5
George: To reproduce issue SPFLITE24 don't terminate it SPFLITE24 D:\mmm.mmm reply CANCEL for the non exitent Profile mmm and you see the empty tab . Thanks
|
|
|
Post by George on Mar 9, 2021 12:37:13 GMT -5
MUEH: And are you running with "Only 1 SPFLite running". I.E. the 2nd startup passes off the Open to the running SPFLite?
George
|
|
|
Post by mueh on Mar 9, 2021 12:39:35 GMT -5
George: Yes "Only 1 SPFLite running"
|
|
|
Post by George on Mar 9, 2021 13:31:17 GMT -5
MUEH: OK, added another one. When only 1 image is running, the new execution detects the running one and effectively sends a command to the old running copy via the COPYDATA call and then terminates itself. I added the extra line there where the COPYDATA message is processed. Seems to work OK.
George
|
|