[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB6 APP quiting at start up?

Posted on 2004-10-06
9
Medium Priority
?
163 Views
Last Modified: 2012-05-05
I have a VB6 app that I have been tweeking for quite some time.  All of a sudden either when I compile it and run it or just start it up from the code screen it abruptly ends.  If I start it in debug mode I will go so far and then click on the run button and then it loads.  I don't see anything that stands out that would cause this.  I am thinking maybe I inadvertently put some character in there that causes that but I don't see anything and it does compile.

Any ideas?  

0
Comment
Question by:sjmmajor
[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
9 Comments
 
LVL 3

Expert Comment

by:redfordb
ID: 12237160
You are gonna have to step through the program until the error occurs.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12237545
That is a common symptom in applications with use subclassing or hooks that have an error somewhere in them.  Are you using either of these techniques?

~IM
0
 
LVL 7

Expert Comment

by:a1programmer
ID: 12237894
Put some MsgBox calls in, and you can find out where it's crashing.



MsgBox "Program Started"
line of code

MsgBox "Step 1"

line of code
line of code

MsgBox "Step 2"

etc... ...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 15

Expert Comment

by:unknown_routine
ID: 12238008
Agree with Idle_Mind  and

in addition , in my experience this can happen if:

1: use of some API functions in general. trying to simulate multi threading.

2: Using poorly written C++ dlls ( are you using c++ dlls?)

3: using poorly developed  3rd  party activeX controls.


Now:

Note that removing this kind of bug is the hardest.

My suggestion is to:

Add logging  to every sub, function in your code.

so exatly before sub ends something like this:


open "c:\log.txt" for append as #1
print #1,"Procedure This_porcedue was successfull" & "|" & now( )

I know this method is tedious, but it is the only choice if  when you  disable the error handling
and still program crashes out without stopping at an error.














0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12238031
In the past, when my subclassed apps crashed on load, it was commonly because I missed a variable or type declaration and I had Option Explicit turned on.

~IM
0
 

Author Comment

by:sjmmajor
ID: 12239939
It will take me a day to be able to check.  Thanks for the ideas.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12240172

Or sometime

CopyMemory

will cause a problem
0
 
LVL 9

Accepted Solution

by:
Dang123 earned 500 total points
ID: 12240749

    You may also want to chack if you are calling anything (API, other modules, etc) that may not be returning fast enough when the program runs normaly but returns in time when you step through the code. I had that once.

0
 

Author Comment

by:sjmmajor
ID: 12259341
Thanks to all!  It actually ended up being the ADO refresh that was causing the problem.  It was trying to refresh the ADO before the form was loaded and it didn't like it.  Once I included the error handling for the ADO the problem cleared up.  
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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…
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…
Suggested Courses

649 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