Main Board > Language

Potential problem in multifile.pvc

(1/1)

James Zukowski:
While testing/preparing to use split files, I ran into a situation with an embedded io routine. In multifile.pvc, the Do_Pre_Write routine does its thing until it gets to:

--- Code: ---if IoType=1 then write lock record (Chnl[_Found_chnl],key=_key$)_rec$ else write lock record (Chnl[_Found_chnl])_rec$
!
if and(_opt,64)=64 then gosub Extract_Update else extract release (lfa); gosub Extract_Free

--- End code ---
Our embedded io routine does some post-write processing. This is called by the write lock record directive. It opens a reference file, reads it, then closes it. (There may also be some additional writing, based on results of this read.) Since _opt is 0, the next code line tries an extract release for lfa, but lfa was not the Chnl[_Found_chnl] in the write line. Changing lfa to Chnl[_Found_chnl] in the extract release line works fine in this situation.

However, there are other references to extracts and lfa elsewhere that I haven't gone through yet. These may be affected by post-read and post-write routines in embedded io routines.

Thought you'd like to know...

Navigation

[0] Message Index

Go to full version