Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2004, 08:00 AM
Authorized User
 
Join Date: Jun 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual Basic Encountered a Problem and Needs to ..

I have a VB project that sometimes gives me an error message when I try to run the project - "Visual Basic encountered a problem and needs to close......". Sometimes the project runs without crushing. It is a database project with Oracle at the backend. Does someone know the solution of this problem.

Thanks
 
Old September 1st, 2004, 08:51 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Just from this information, it is difficult to say anything.
I can make only some guesses.

Is it a GPF (General protection failure) error ? If yes, it may be caused by one or more of the following problems.

1) Low memory. The codes may not be optimised.

2) Some third party components may be causing the problem. You will have to remove components one by one and test. It will take long time.

3) Windows may need a re-installation. Please try to install it on a new m/c with fresh windows installation.
 
Old September 1st, 2004, 12:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In addition to the previous suggestions (I will NOT go on reinstalling Windows...)
when projects get bigger and bigger, use many external libraries and a lot of memory, VB tends to loose its focus :) especially if you press the Stop button in the debugger (that kills the app without closing any allocates resources.) Let's not forget that VB is a Windows application like any others.
Save and restart VB often.
Open the vbp file in notepead and check if all references are correct.
Marco
 
Old September 1st, 2004, 01:11 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In addition I might add, make sure to set all objects to nothing before exiting the function (public objects before exiting the program). Make sure you have propper error handling in all functions (I have seen errors that snowballed into causing such an issue). You might also consider putting in a trace log (with a switch to shut it off, so it doesn't run at all times). This will allow you to track where the code is dying.

Yehuda
 
Old September 1st, 2004, 02:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

can i add some more behavior that cause this???
if you do an invalid call to an api ( like passing a string that is not set to the correct len)
or if you have a damaged .frx

HTH

Gonzalo





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in API programming in visual basic 2005 jatin Visual Basic 2005 Basics 2 March 16th, 2007 02:11 PM
printing problem with crystal report visual basic gajendrabang Crystal Reports 2 January 3rd, 2007 02:09 AM
FTP in Visual Studio 2005 Pro (Visual Basic) shoopes VB How-To 1 June 29th, 2006 02:08 PM
Printing problem in Visual Basic ! Urgent venkatesh_anmca Beginning VB 6 2 January 29th, 2005 02:22 AM
Visual basic.net problem Brettvan1 VB.NET 2002/2003 Basics 14 January 24th, 2005 01:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.