Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C000008E (GPF) using Windows 2000 and VFP6.0 SP3
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00458867
Message ID:
00459287
Views:
23
Hi!

I interpreted it correctly. The sequense of events when form opens is following:

Form.LOAD event
All controls and subcontrols initialize (INIT calls)
|- c_code.assdbtns1.init -> c_code.assdbtns1.NavRefresh() -> Grid.Refresh()
at this point grid might not exist. Even when it exists, form is not opened visually and any extra refreshes may make a serious blow on application - crash.
Form INIT event

I propose following:

Form.LOAD event
All controls and subcontrols initialize (INIT calls)
|- c_code.assdbtns1.init -> c_code.assdbtns1.NavRefresh() XXXXXX -> Grid.Refresh() - not called
Form INIT event
Form Show or Ativate event -> c_code.assdbtns1.NavRefresh() -> Grid.Refresh() - works ok.

Do you see where problem and solution now?

>Hi,
>
>you interpreted the error message wrong. It shows the program stack. So the Init-Event (which is the
>last one) calls NavRefresh() and NavRefresh() calls Grid.Refresh().
>To be absolutely sure I checked that Form.Init is only called once.
>
>In the meantime I found that C000008E is "STATUS_FLOAT_DIVIDE_BY_ZERO".
>We just tried to diable the numeric co-processor. Some time ago VFP had
>problems with this.
>
>Andreas
>
>
>>Init method - is the problem. Init of _code.assdbtns1 called BEFORE Init of the form. Thus, form is not initialized - some of its controls are not initialized too. Grid itself might be not initialized too at that moment, so you can even get error 'object does not exists' or something like that. Error handling at that moment oftenly cause GPF crash.
>>
>>If you just cannot remove c_code.assdbtns1.navrefresh method call from c_code.assdbtns1.init method, see following.
>>
>>One of the popular ways to avoid such things - do not do anything related to painting on the form before form INIT method called. If you do not want to rewrite objects model (that is a lot of work), you can patch your code by using a flag property of form. Add flag (lInitialized) property to the form and setup it to .F. In the c_code.assdbtns1.navrefresh method before call of any otehr objects and refresh methods check if this flag is .T., if not - do nothing. In the Init method of form set this flag to .T. to indicate that all controls of form initialized and ready for work.
>>
>>It is good idea to add this flag and setting it to .T. in the Init of the form in the base class for the form, so this useful functionality will be available to all forms in your application.
>>
>>>Hi,
>>>
>>>I upgraded to SP4 - but no effect.
>>>We do not use Active X only standard VFP.
>>>The exact error:
>>>Fatal error: Exceptioncode = C000008E
>>>Called from c_code.assdbtns1.navrefresh line 130
>>>Called from c_code.assdbtns1.init line 14
>>>
>>>Both lines are shown.
>>>The form is an adaption of the standard generated forms of VFP3.0.
>>>Line 130 is:
>>> THISFORM.ASSDPageframe1.Page1.ASSDGrid1.Refresh()
>>>Line 14 is:
>>> THIS.NavRefresh()
>>>
>>>There is some code in the Refresh-Method of our grid class. But this code is conditional
>>>and in the form with the error it is not executed.
>>>The class library is OK, no custom column classes.
>>>
>>>Andreas
>>>
>>>>Are you sure this command does not cause any other routines calls? When you have code in refresh method of any control inside of grid, it will be called too.
>>>>
>>>>If this is the last line of code executed before crash, the resons might be:
>>>>
>>>>When some ActiveX control tied to grid controls or placed somewhere on the form, make a try of _VFP.AutoYield property and SYS(2333) funstion.
>>>>
>>>>When you use custom column class, you can get weird results, include crashes. The same weird results you can get when vcx/scx file is corrupted.
>>>>
>>>>When you have some controls in grid that use unusual approached to display data (for example, containers in grid cell), or you have intensive use of dynamic* properties of columns, you can also get weird results in some cases.
>>>>
>>>>Last 2 items require some tuning of grid class
>>>>
>>>>
>>>>>>Can you tell exact code line when crash occurs?
>>>>>The error occurs in a line of code with
>>>>>THISFORM.grid1.Refresh()
>>>>>
>>>>>>>our software has been working well using WinNT, Win95/98 for years (VFP6.0 SP3).
>>>>>>>With Windows 2000 (SP1) sometimes occurs an general protection fault
>>>>>>>C000008E. That means running a form leads immediately to the error about
>>>>>>>every 50th-100th try. The error message states that the error occurs in the refresh event of
>>>>>>>a grid. Any suggestions. Thanks.
>>>>>>>
>>>>>>>Andreas
>>>>>>>
>>>>>>>P.S.: the list of bug fixes in VFP6.0 SP4 states nothing about Windows 2000 problems.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform