Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stack space and memory woes

Status
Not open for further replies.

andyjdavis

Programmer
Aug 10, 2000
23
AU
I am developing a VB application that has problems.&nbsp;&nbsp;Half the time it is run it runs fine, the other half it brings up a &quot;out of stack space error&quot;.&nbsp;&nbsp;It also periodically throws up Illegal Operation orriginating in a DLL that is not my creation.<br><br>The application is not particularly memory hungry and only crashes as one of the form_unload events is being processed (possibly as the memory is being deallocated)&nbsp;&nbsp;Is the memory assigned to data controls and recordsets automatically reclaimed?&nbsp;&nbsp;Why does the error only appear as the application closes? Any ideas.<br>Thanks for any help in advance.
 
Sometimes the stack error results when a sub ends up calling itself, ending in never-ending recursion. Let's say a text box Change event modifies the contents of the text box. Take a good look at the way your app unloads its forms.<br><br>Just a thought.<br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Can you give us an example of the code? What API call did you try to make when the our of stack error occured.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John Stephens
 
The errors seem to originate in CRYSTL32.OCX, product version 4.6.1.0, file version 4.6.3.7.14. This came with VB5. Is it possible to download a newer version of the file from somewhere? Would that help?

The only call made to a crystal report control is
crystalReport1.Action=1
to generate a report, all of which work correctly. If none of the reports are generated no errors will be caused. Several of the reports have to be generated for an error to occur.

Is it necessary to explicitly close recordsets and data controls? I have now done this in an attempt to cut memory usage and prevent the stack error. Could this actually be causing an error? ie:
recordset.close
located in the form unload event or within the close button where applicable.

There are no recursive calls to my knowledge. However I am now checking for this. Thanks for the suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top