Hi all! I have VB 4 32 bit code (I know, but we are small company!) that is only slightly modifed from exactly similar code (that works flawlessly) in another application-I added some file constants and definitions that this new app needs. Code mostly follows the examples provided by Pervasive API for using Visual Basic. I use an array of type string for the position blocks- the 22 entries of 128 bytes each is the biggest offender for space usage. Each file has it's own buffer defined, etc.
The application does data verification(not empty, valid for the tables/fields, etc) BEFORE doing any record commits. Record commits consist of updates in existing records and insertion of new records.
Issue: Performing the operations too many times w/o restarting the program caused error 28 out of stack space errors. Each operation consists usually of file updates at most on 4 records, at most I have seen up to 12 records.
Issue: Subsequent error code modifications to catch error 28 errors yield a program that simply DISAPPEARS at random, e.g. when closing a form after doing some file manipulations, updates or insertions; it is not visible in Task manager or via any other excellent process viewers(SysInternals) and can be restarted (with similar results )
The code compiles to less than 512K.
There is only one exit point for the entire program and it is only called from a main form when a specific button is clicked.
Begin, End Transaction are used to keep the files in sync, and Abort Transaction if any errors arise to roll back errors.
There is no explicit recursion. Have checked controls' Click() code and moved/removed code in an attempt to find/avoid the dreaded 'black hole recursion' that occurs when events are called that call events that call events that .... - I might still have some, but I put in a logging function (in EVERY routine!) and did not get anything that looked out of the place; everything opened/occurred/closed in normal sequence.
I DO use constants, but again the code is nearly identical to code in (an)other app(s) that never fails. I did attempt to remove these constants and use literals instead - same result.
Running compiled code or executing via the IDE gives the same results.
I have not yet attempted to step through the code line by line, and will do so ASAP, but am loath to do so as it would take probably as many hours to generate the error as I have already spent tracking down the problem!
Any ideas? This has already taken way too much of my time for what should be a relatively simple application.
The application does data verification(not empty, valid for the tables/fields, etc) BEFORE doing any record commits. Record commits consist of updates in existing records and insertion of new records.
Issue: Performing the operations too many times w/o restarting the program caused error 28 out of stack space errors. Each operation consists usually of file updates at most on 4 records, at most I have seen up to 12 records.
Issue: Subsequent error code modifications to catch error 28 errors yield a program that simply DISAPPEARS at random, e.g. when closing a form after doing some file manipulations, updates or insertions; it is not visible in Task manager or via any other excellent process viewers(SysInternals) and can be restarted (with similar results )
The code compiles to less than 512K.
There is only one exit point for the entire program and it is only called from a main form when a specific button is clicked.
Begin, End Transaction are used to keep the files in sync, and Abort Transaction if any errors arise to roll back errors.
There is no explicit recursion. Have checked controls' Click() code and moved/removed code in an attempt to find/avoid the dreaded 'black hole recursion' that occurs when events are called that call events that call events that .... - I might still have some, but I put in a logging function (in EVERY routine!) and did not get anything that looked out of the place; everything opened/occurred/closed in normal sequence.
I DO use constants, but again the code is nearly identical to code in (an)other app(s) that never fails. I did attempt to remove these constants and use literals instead - same result.
Running compiled code or executing via the IDE gives the same results.
I have not yet attempted to step through the code line by line, and will do so ASAP, but am loath to do so as it would take probably as many hours to generate the error as I have already spent tracking down the problem!
Any ideas? This has already taken way too much of my time for what should be a relatively simple application.