Solved

VB Crashes during test run

Posted on 2000-03-05
5
232 Views
Last Modified: 2010-05-02
I have added a Sheridan Data Grid to a VB program that worked fine up till now.

Now when I test run the program in the VB design mode, I get the error listed below. However, this error occurs on the second test run. VB crashes and I am brought back to the desktop.

How should I go about searching for the cause of this crash?

 VB5 caused an invalid page fault in
module MSVCRT.DLL at 0177:780015cc.
Registers:
EAX=0155000c CS=0177 EIP=780015cc EFLGS=00010206
EBX=0155000c SS=017f ESP=007feed4 EBP=007fef1c
ECX=0155000c DS=017f ESI=015543f8 FS=4fc7
EDX=007feeb4 ES=017f EDI=015543f8 GS=0000
Bytes at CS:EIP:
66 83 39 00 8d 41 02 74 0a 66 8b 10 40 40 66 85
Stack dump:
5f45bca7 0155000c 015543f8 015535d0 015543f4 2785b652 0155000c 007fef20 00000008 00000000 007f0000 5f418941 0155000c 007fef48 007fef4a 007fef8c  
0
Comment
Question by:edmac
5 Comments
 
LVL 6

Expert Comment

by:Jon_Raymond
ID: 2586403
0
 
LVL 4

Expert Comment

by:wylliker
ID: 2586564
Place break points throughout your event handlers and step through your code to try to find the line of code that produces this crash.

Then you can post the offending code and spark some useful (hopefully) questions from some of the experts.

You could also comment out code that specifically deals with the Sheridan control and see if you still have a problem.  At least you could relate it to your code for dealing with the control.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2588541
The high memory address 0177:780015cc.. implies that this MAY be a virtual memory error.

If you have a permanent windows swapfile make it larger.. If you don't have a permanent swapfile (and have the available disk space), maybe you should create one.. (Windows will perform better).

To create/update a permanent Swapfile, do the following..

Start.. Settings.. Control Panel.. System.. Performanc Tab.. Virtual Memory Button.. Click on the specify my own settings option. In BOTH the Min box AND the MAX box.. place the size you want the Swapfile to be.. (3 times the amount of physical memory you have, is a very general rule of thumb). If the values in MIN and MAX are the same.. the Swapfile will be permanent.. as such.. Windows will NOT have to expend the overhead finding / building Temporary swapfile areas.

Reboot your computer.. and then rerun your test.

0
 
LVL 4

Accepted Solution

by:
wylliker earned 200 total points
ID: 2588664
The error is in the C runtime library.  Chances are that it is caused by an uninitialized/invalid pointer.  Something that is being used either no longer exists - for example an object that had been set to Nothing, a null string, incorrect Property settings.

This also indicates that the problem is likely to be occuring internal to VB or a participating control (possibly the Sheridan Data Grid).

You should check the Sheridan web site to see if there are any updates for your control and/or any identified support issues that are similar.

The EDX register in the DUMP you supplied indicates a value before the ESP register. The address in ESP - through the address in EBP identify the stack space the called function (whatever that may be) which comprises the arguments and local variables for that function.


There could be many reasons - set the breakpoints and see what line causes the crash.
0
 

Author Comment

by:edmac
ID: 2594416
Thank You
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now