Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C0000005 on form startup
Message
From
18/07/2003 03:45:53
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00811055
Message ID:
00811401
Views:
18
I was able to narrow down the problem a bit... I added some code that logs execution of code into a file after form Init call. It writes log entries when form Init method starts and when it ends, and also it logs when Activate method fires and finishes.

It seems that the C0000005 crash happens always after Init has finished, but before Activate method fires (no log entries for Activate method after the crash).

What happens between Init and Activate methods in form's startup sequence?




>C0000005 is generally a memory access violation problem. An invalid pointer reference of memory access to a deallocated portion of memory.
>Hope that helps some.
>
>
>>Hello,
>>
>>I have encountered these c0000005 exceptions in my app. They are random and appear only on form startup (before a form has became visible ). They appear when starting different forms and with no regular pattern. Sometimes I'm able to open and close different forms about 30-40 times in rapid succession before Fatal Exception C0000005 shows up and crashes the program, sometimes second or third form opening causes this. It never comes up when testing form when it's visible and ready to use.
>>
>>The system I'm using WinXP SP1 with VFP7 Service Pack 1. I have tested it on WIN2000 machines too, but no difference there. My app uses foxpro native databases.
>>
>>All my forms are opened via menus. I am using menulib7.0 (downloaded from UT). The forms' dataenvironment are created programmatically in my form's Load Method, I have my own dataenvironment property on the form. I don't know if these things are related to this problem...
>>
>>Most of the time, everything works flawlessly. Menus work ok, dataenvironment loading works ok, the form as whole seems to work ok. But maybe after average 10-15 form startups I occasionally get this C0000005 and my app crashes.
>>
>>I've tried to delete foxuser.* files, reindexing, packing etc. but no luck.
>>
>>The vfp log shows every time this stack dump:
>>
>>Fatal error: Exception code=C0000005 @ 17.07.03 04:14:04 PM. Error log file: C:\Program Files\Common Files\Microsoft Shared\VFP\vfp7rerr.log
>> Called from - tkframe.doform line 3 {c:\foxdev\tk\tkhila\libs\tsgen.vct c:\foxdev\tk\tkhila\libs\tsgen.vct}
>> Called from - screen.menu.perustiedot.sopimukset.execute line 0 {C:\foxdev\tk\tkhila\ }
>> Called from - ON... line 0 { }
>> Called from - tkframe.do line 16 {c:\foxdev\tk\tkhila\libs\main.vct c:\foxdev\tk\tkhila\libs\main.vct}
>> Called from - main line 92 {C:\foxdev\tk\tkhila\progs\main.prg c:\foxdev\tk\tkhila\tkhila.exe}
>>
>>
>>That tkframe.doform line 3, which seems to be crash point, contains DO FORM command, which executes the form selected in my app's menu. But I have noticed that on some forms which create temporary index, I have seen "nnnn records indexed" message on vfp window before the crash, so some of the form code had been executed. I guess the dump cannot trace after DO FORM command?
>>
>>If someone has had similar problems, please help. Sorry about my English, but I'll try to specify issues here, if you got some questions...
>>
>>TIA,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform