Solved

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

Posted on 2010-08-30
20
244 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
  • 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 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

19 Experts available now in Live!

Get 1:1 Help Now