Solved

Visual basic has encountered a problem and needs to close. We are sorry for the inconvenience

Posted on 2010-08-30
20
249 Views
Last Modified: 2012-05-10
Hi,

Every time I do a breakpoint and then after I see the content I stop the debugger, VB gives me this error.

Any idea?
0
Comment
Question by:DistillingExperts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 10
20 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33557731
Possibly something is corrupt. Try to reinstall, or, if necessary, uninstall/reinstall.
0
 

Author Comment

by:DistillingExperts
ID: 33559186
I did that but didn't work.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33559196
Does it happen only on one project, or any project you do? Have you tried starting a simple Hello World project to see if the same happens?
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:DistillingExperts
ID: 33559293
Others projects work. However, couldn't fix the problem yet.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33559324
Try copying the code (only the code), create a new project, insert the same objects and paste the code. It's possible that your project file became corrupted, or even the resources file. If you do that and it stops happening, you know that's the reason.
Also, it might be worth running a chkdsk, just in case some drive malfunction caused the corruption.
0
 

Author Comment

by:DistillingExperts
ID: 33559489
I opened it in another folder extracting from the version control and got the same error.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33559549
I'm inclined to think it's one of the project files that got corrupted. Seeing as it only happens on that project, I would delete and start over. You may copy the VBA code, as that isn't likely to be the cause, rather a form, resource, control, etc.
0
 

Author Comment

by:DistillingExperts
ID: 33559586
But it worked before and in the source control should be fine as I never did a check-in. I don't think it is corrupted, even though it seems.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33559690
Well, I found some more tests for you to do. First, download microsoft's process explorer and check for any "foreign" or useless processes. Also, try to monitor your VBA process to see if you can find out what is crashing it.
Also, and this may seem silly, try opening the project through File->Open Project and testing, then double clicking the file and testing.
Also try to unload any add-ins you might have.
0
 

Author Comment

by:DistillingExperts
ID: 33567932
How can I monitor my VBA process? The only thing it started in the Process Explorer is dwwin (Dr. Watson).
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33568027
You have to select the VB handling process, then on the lower window check handles or dll's loaded. Try to see anything unusual that you don't see on other projects.
If you can't see the lower pane, you can activate it in: View->Show Lower Pane (shortcut key: Ctrl+L)
To see lower pane on DLL mode, View->Lower Pane View->DLLs (shortcut key: Ctrl+D)
To see handles, View->Lower Pane View->Handles (shortcut key: Ctrl+H)

Try to see if you can pinpoint what is causing the crash.
0
 

Author Comment

by:DistillingExperts
ID: 33568592
I did all you have said but still cannot find the point where it crashes. The only thing I know is that only happens in the Forms breakpoints, not in the modules ones.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33568639
Well, other than it being a corrupted control/resource file/etc, I don't really know what could be causing it.
As I said, you could know for sure that's what it is if you create the project again and implement everything again (manually, not importing). It will be a lot of effort (depending on project size), but if your project generates that error, there's no trusting the computations it's making anyway.
0
 

Author Comment

by:DistillingExperts
ID: 33568962
It only breaks on the debug. Really no more info?
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33569004
I ran out of ideas. Ask for attention, and get added to more areas. Add the XP area (I'm assuming it's your OS, if not, add that one), at least. Maybe the Mod will have other ideas.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33569007
That is, ideas for areas. :)
0
 

Author Comment

by:DistillingExperts
ID: 33569065
You know what scared me.. only you answered out of all the people here. It seems that only you are specialist the another ones just look into the google.
0
 

Author Comment

by:DistillingExperts
ID: 33569329
Does it give you any hint on what my problem might be?
http://forum.codejock.com/forum_posts.asp?TID=10773
0
 
LVL 18

Accepted Solution

by:
Cluskitt earned 500 total points
ID: 33570210
I was the only one that answered, probably because it's a very unusual case and one more focused on the OS than the language itself. Usually experts that monitor the VB6 area are more into coding than IT maintenance.

As for the link, it's still too generalized. Some were the code that crashed it, others had a different problem. Each with his own solution. I don't really know what could be causing it, especially since you say it only happens on that project and none else. I assume you tried the solutions in there, so there really isn't much I can add that I haven't said already.

I do advise you to add some areas to your question, so different types of expert can join in. The XP/Vista/7 area seems like a good place to start.
0
 

Author Closing Comment

by:DistillingExperts
ID: 33570784
I will close this one and open another with more details. Thanks a lot.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

742 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