We've got a printer selection panel that we can flag to run in "Silent Mode" - a default selection is made, the open processing is executed, and returns to the calling program without displaying the actual panel.
Some of our calling programs will call this routine multiple times to create disk files instead of using an actual printer. While debugging some program mods, we noticed that one of our system files that gets opened for this panel doesn't seem to always be closed on exit, and sometimes dozens of channels are in opened for this single file.
The Pre-Display is to Perform ";Init_Prog"
The Post-Display (which in this case should not be used) is to Perform ";Start_Up"
The On Exit is to Perform ";Wrap_Up"
There are 2 system files opened in Init_Prog. If running in Silent Mode, the end of the Init_Prog routine GOSUBs to the open-printer routine, sets Cmd_Str$="END", then RETURNs.
The Wrap_Up simple closes the 2 system files, resets a global variable, and RETURNs.
The curious part of it all is that the 2 system are both opened and closed in adjacent lines, but only 1 seems to get closed -- most of the time. The channel variable names are PRT_FILE and FORM_FILE, with the latter being the one that seems to remain open.
For the debugging today, it seems to have been called about 1300 times, and left behind about 100-125 open files that should have been closed. Most of them were the FORM_FILE, with a handful of the PRT_FILE.
Has anyone run into anything like this before? Is there something that's not getting set correctly when bypassing the Display Panel process?
Thanks in advance for (1) reading through this, and (2) any suggestions you may have.
Some of our calling programs will call this routine multiple times to create disk files instead of using an actual printer. While debugging some program mods, we noticed that one of our system files that gets opened for this panel doesn't seem to always be closed on exit, and sometimes dozens of channels are in opened for this single file.
The Pre-Display is to Perform ";Init_Prog"
The Post-Display (which in this case should not be used) is to Perform ";Start_Up"
The On Exit is to Perform ";Wrap_Up"
There are 2 system files opened in Init_Prog. If running in Silent Mode, the end of the Init_Prog routine GOSUBs to the open-printer routine, sets Cmd_Str$="END", then RETURNs.
The Wrap_Up simple closes the 2 system files, resets a global variable, and RETURNs.
The curious part of it all is that the 2 system are both opened and closed in adjacent lines, but only 1 seems to get closed -- most of the time. The channel variable names are PRT_FILE and FORM_FILE, with the latter being the one that seems to remain open.
For the debugging today, it seems to have been called about 1300 times, and left behind about 100-125 open files that should have been closed. Most of them were the FORM_FILE, with a handful of the PRT_FILE.
Has anyone run into anything like this before? Is there something that's not getting set correctly when bypassing the Display Panel process?
Thanks in advance for (1) reading through this, and (2) any suggestions you may have.