c0000005 when closing table 
Author Message
 c0000005 when closing table

Hi!

Normally c0000005-errors occur, when you have  objects that could
not been DESTROY()ed properly.

I now have a small app with no visual objects at all, just doing some
data processing (a simulation). Its win98 and vfp7 sp1

The c0000005-errors always occured  when closing some table with
USE IN <tablename>. I put a FLUSH before that but it didn't help
much against the error. It helped only in getting no corrupted cdx files.

Then I monitored some SYS()-Calls for memory use, like SYS(12),
SYS(23), SYS(24), SYS(1001), SYS(1011), SYS(1016) and last not
lease SYS(1104).

As to be expected
SYS(12) raimained 655360
SYS(23) and SYS(24) remained 0
SYS(1001) remained 1073741824
SYS(1011) starts at about 1500 and stays there (number of memory
handles)
SYS(1016) starts at about 400,000 (that's the memory used through
userdefined objects) and rises in the init of some data.

When the simulation part begins SYS(1016) is about 600,000. Then it
degrades slowly, although I'm still adding data during simulation.
Perhaps through the use of SYS(1104) from that point on.

At some point SYS(1016) is staying, eg 550000. and then after 1-4
loops the app will throw the c0000005 exception.

SYS(1104) will then mostly be >0 (144). Sometimes it even gets 0 again,
sometimes it rises up almost 9000. I don't know what this means.

BUT NOW THE PUNCHLINE:
When the c0000005 error initially occured when closing some tables
with USE IN <tablename> it now always occurs when calling
SYS(1104) (I positioned the SYS-Calls right before the USE IN ...
statements where the error used to occur).

I don't expect that someone can explain this, but what should I try
before rewriting some code?

SYS(3500,1,1000000) didn't help. Stopping AntiVirus Software
also didn't help.

Bye, Olaf.



Tue, 18 Oct 2005 01:47:29 GMT  
 c0000005 when closing table
Hi Olaf:

Does the table have an index?  If so, delete the index and recreate the
index.  Do not use the REINDEX command.

Have you tried creating a new table (don't use COPY STRU TO command) and
then appending the data from the current table into the new table?

If this code is in a program file, delete the .FXP file.  If the code is in
a form, issue a COMPILE FORM <form_name> command. If you are using a
project, create a new project.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
   http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
   http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
   - VFP5 Mainstream Support retires June 30th, 2003
   - VFP6 Mainstream Support retires Sep. 30th, 2003

Quote:
>Hi!
>Normally c0000005-errors occur, when you have  objects that could
>not been DESTROY()ed properly.
>I now have a small app with no visual objects at all, just doing some
>data processing (a simulation). Its win98 and vfp7 sp1
>The c0000005-errors always occured  when closing some table with
>USE IN <tablename>. I put a FLUSH before that but it didn't help
>much against the error. It helped only in getting no corrupted cdx files.
>Then I monitored some SYS()-Calls for memory use, like SYS(12),
>SYS(23), SYS(24), SYS(1001), SYS(1011), SYS(1016) and last not
>lease SYS(1104).
>As to be expected
>SYS(12) raimained 655360
>SYS(23) and SYS(24) remained 0
>SYS(1001) remained 1073741824
>SYS(1011) starts at about 1500 and stays there (number of memory
>handles)
>SYS(1016) starts at about 400,000 (that's the memory used through
>userdefined objects) and rises in the init of some data.
>When the simulation part begins SYS(1016) is about 600,000. Then it
>degrades slowly, although I'm still adding data during simulation.
>Perhaps through the use of SYS(1104) from that point on.
>At some point SYS(1016) is staying, eg 550000. and then after 1-4
>loops the app will throw the c0000005 exception.
>SYS(1104) will then mostly be >0 (144). Sometimes it even gets 0 again,
>sometimes it rises up almost 9000. I don't know what this means.
>BUT NOW THE PUNCHLINE:
>When the c0000005 error initially occured when closing some tables
>with USE IN <tablename> it now always occurs when calling
>SYS(1104) (I positioned the SYS-Calls right before the USE IN ...
>statements where the error used to occur).
>I don't expect that someone can explain this, but what should I try
>before rewriting some code?
>SYS(3500,1,1000000) didn't help. Stopping AntiVirus Software
>also didn't help.
>Bye, Olaf.



Tue, 18 Oct 2005 03:55:39 GMT  
 c0000005 when closing table
Hi Lee!

The app creates data from scratch, so I need an empty database at the
beginning.
I do it programmatically with DELETE ALL/PACK in the tables.
I had bad experiences with ZAP.

Now I created a script with gendbc.prg and create the wole database again.
Nevertheless the problem stays.

I've tried a compile of the whole project (compiling all components, not
just
changes ones)

I didn't try to recreate the whole project though.

I've commented some source and got it running, then uncommented until I got
to the point. I now know the table responsible for the error. I limited the
number
of records in this table and that worked, too. But I don't know why this
helped...

Thanks for your help!
Bye, Olaf.



Tue, 18 Oct 2005 05:07:02 GMT  
 c0000005 when closing table
Hi, Olaf Doschke!
You wrote  on Thu, 1 May 2003 23:07:02 +0200:

Can you create simple example that will show this behaviour? Add some random
data generating code and post it here.

WBR, Igor



Wed, 19 Oct 2005 06:23:33 GMT  
 c0000005 when closing table
Hi Igor!

Quote:
> Can you create simple example that will show this behaviour? Add some
random
> data generating code and post it here.

I already answered but don't see my post here...

To make it short: It was a problem with either Win98 SE
or that special computer, as the program runs without
exception on my WinXP HE notebook.

I cannot create a small sample, I would have to post the
whole project. Although this is quite small I'd rather not
do it, it's closed source...

Also I don't think it is reproducible, so this won't be an
example for any bugfix of a c5-exception error.

Bye, Olaf.



Fri, 21 Oct 2005 15:03:25 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Closing project manager closes open tables -why?

2. can't close tables with FOR loop

3. Close tables opened by query ?

4. Closing VFP tables through ODBC.

5. closing tables opened by select-sql

6. Closing tables after running queries

7. close a single table

8. How to close View base tables ?

9. Closing Tables

10. Need help closing or deleteing a single table

11. Use not closing table

12. How do I close one table?

 

 
Powered by phpBB® Forum Software