locked
VFP Program crashes after more than 10th times of viewing report from browser RRS feed

  • Question

  • Hello and good day.

    My vfp program crashes when user viewed the report through browser for more than 10 times. Program is developed on VFP8 on Win 7 platform. The program resides in Windows server 2008 with 4GB RAM. User, however, uses WinXP to login into the vfp program.

    User will proceed to generate a report which displayed using BROWSER (OLE object). Program crashes with these error messages

    Fatal error: Exception code=C0000005 @ 25/06/2014 09:24:13 AM. Error log file: Y:\CENTER\VFP8Rerr.log
    Called from - frmvresult.browser1.init line 15 {y:\center\_webview.vct y:\center\_webview.vct}
    Called from - frminquiry.cmdresult.click line 2 {y:\center\inquiryx.sct y:\center\inquiryx.sct}
    Called from - patient.commandgroup1.command1.click line 2 {y:\center\patient.sct y:\center\patient.sct}
    Called from - _3xm0jnqps line 459 {Y:\CENTER\cmenu.mpr cmenu.mpx}
    Called from - ON... line 0 { }
    Called from - _43m0j6jfi.activate line 70 {y:\center\main.sct y:\center\main.sct}
    Called from - 3foo02m9 line 0 { y:\center\vclinic.exe}

    I have debug many times in the program but unable to find an error. It just happens after more than 10 times of viewing the report. Then program closes and user has to re-login and everything will be fine for the next 10 timess.

    Any advice is most appreciated!

    Wednesday, June 25, 2014 6:59 AM

Answers

  • A cause for 005 errors within VFP is the release of objects!

    Especially objects relating to processes outside of VFP.

    In this case it would be to the browser. 

    I suggest looking closely at how the browser and its associated objects are released. Doing a specific setting to Null before releasing them.  Also, before releasing, ensuring that all Close methods are called so that objects internal to the exterior processes are released correctly. 

    Overkill in this area does pay off!


    The English Bob

    Thursday, June 26, 2014 6:51 AM
    Answerer
  • My vfp program crashes when user viewed the report through browser for more than 10 times.

    C0000005 error is impossible to debug in VFP because it is generated by Windows OS. So you should use Visual Studio debugger.

    Did you test your code under VFP 9 SP2? It is more stable than VFP 8. And each attempt to fix VFP 8 behavior is waste of the time if newer software version is available.

    Also not everybody has the source code available so it could help if you provide it. OTOH, it does not help probably because C0000005 error is surely caused by some other part of your app or VFP 8 itself.

    So the recommendation from Ravindra is a good start. If it does not help then you could read following web search: https://www.google.com/search?newwindow=1&site=&source=hp&q=C0000005+foxpro&oq=C0000005+foxpro

    And if it does not help and VFP 8 is your only tool then the work around is to restart the application after the 9th report preview (you may do it in the background without user intervention).



    Wednesday, June 25, 2014 8:45 PM
  • Thanks Ravindra for your suggestion. However, I have tried the cache cleaning as well but to no avail. And yes, my frmvresult is a MODAL.
    Since this may related to the browser, maybe repairing the browser will help.

    remember make the reply as answer and vote the reply as helpful if it helps.

    Tuesday, July 1, 2014 9:40 AM

All replies

  • 1) Do the user has to close frmvresult before coming back to frminquiry? If the user can do it without closing, then the problem may occur. So frmvresult must be modal.

    2) Try to clear browser's cookies and temp files before frmvresult is displayed each time.

    I am not sure, but either of the two will help you. 

     

    Wednesday, June 25, 2014 12:32 PM
    Answerer
  • My vfp program crashes when user viewed the report through browser for more than 10 times.

    C0000005 error is impossible to debug in VFP because it is generated by Windows OS. So you should use Visual Studio debugger.

    Did you test your code under VFP 9 SP2? It is more stable than VFP 8. And each attempt to fix VFP 8 behavior is waste of the time if newer software version is available.

    Also not everybody has the source code available so it could help if you provide it. OTOH, it does not help probably because C0000005 error is surely caused by some other part of your app or VFP 8 itself.

    So the recommendation from Ravindra is a good start. If it does not help then you could read following web search: https://www.google.com/search?newwindow=1&site=&source=hp&q=C0000005+foxpro&oq=C0000005+foxpro

    And if it does not help and VFP 8 is your only tool then the work around is to restart the application after the 9th report preview (you may do it in the background without user intervention).



    Wednesday, June 25, 2014 8:45 PM
  • A cause for 005 errors within VFP is the release of objects!

    Especially objects relating to processes outside of VFP.

    In this case it would be to the browser. 

    I suggest looking closely at how the browser and its associated objects are released. Doing a specific setting to Null before releasing them.  Also, before releasing, ensuring that all Close methods are called so that objects internal to the exterior processes are released correctly. 

    Overkill in this area does pay off!


    The English Bob

    Thursday, June 26, 2014 6:51 AM
    Answerer
  • Thanks Ravindra for your suggestion. However, I have tried the cache cleaning as well but to no avail. And yes, my frmvresult is a MODAL.
    Monday, June 30, 2014 12:51 AM
  • Thanks Ravindra for your suggestion. However, I have tried the cache cleaning as well but to no avail. And yes, my frmvresult is a MODAL.
    Since this may related to the browser, maybe repairing the browser will help.

    remember make the reply as answer and vote the reply as helpful if it helps.

    Tuesday, July 1, 2014 9:40 AM