Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error C0000005
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00595224
Message ID:
00595274
Views:
34
>>>>>>I have a form that is called from the .Click event of a command button on another form. Sometimes this works fine and sometimes I get a Fatal Error C0000005 when the DO FORM occurs. The form being called is a large multi-paged scrollable form, if that matters. I am using VFP6 SP5.
>>>>>>
>>>>>>Any ideas or known issues on what may be causing this to occur?
>>>>>
>>>>>Does this message show, which method gives you the error? Do you have all objects in this form in design time or you add them as necessary in run-time (delayed instantiation)?
>>>>
>>>>Nadya,
>>>>
>>>>Yes, it tells me that the .Click event is where the error is being encountered on line 72. Line 72 contains the DO FORM. As for the objects, they are all there at design time. There is no delayed instantiation.
>>>
>>>Do you have code in Load/Init methods of this form? Can you temporary remove pageframe from this form and test, if it resolves this problem?
>>
>>Yes, there is code in Load/Init methods of this form. The Load creates 8 cursors and runs SQL-SELECTS to populate these. The Init opens a table of lookup values and populates the choices for 11 comboboxes using .AddItem()
>>
>>Removing the pageframe would be a bit of a hassle. What are your thoughts in regards to this?
>
>My thoughts are: we need to narrow down the cause of the problem. Usually the recommended method is to remove piece by piece objects (methods) from the form until find the offending one. Also I think, what there is no need to have all objects at all pages in design time. It slows down the form loading time and may lead to other problems. I would leave objects on the first page and save as a class each other page. Then I would instantiate this container class in run-time once the page is activated. I use this technique in several of my forms with success.
>
>Another thought: Do you have memo field and edit box in any of the pages? It may be source of the problem. We found this bug while ago, I'll give you thread reference.
>
>Here is the recent thread, in which I mentioned this old thread: Forum: Visual FoxPro Category: Forms & Form designer Title: Re: Refresh() method and fatal error Thread #591606 Message #591616

Yes, I have several pages that have an edit box with a memo as it's controlsource. I didn't get what the solution was in that thread. Was it to force the "binding" in the pages Activate() events?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform