CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Location
    Toronto
    Posts
    51

    application freezing

    I have a VB 6.0 application and it runs really good. However, there is an instance.. say one out of 100 times when the application freezes. It does not affect the system (win 2000) though and the user can still click the X in the corner and exit the application and start it up again and everything is fine.

    Is there something that could be causing this?
    Before a man can wake up and find himself famous, he must first wake up and find himself.

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867
    VB isn't my forte but I know that in most programming languages, this sort of problem is often caused by uninitialised variables - i.e. most of the time, the variable happens to initialise to a value that does no harm, but every now and then....

    In Visual C++ (which I use) the compiler throws up a warning if a variable is used without being initialised. I don't know what the situation is with Visual Basic - but the warnings aren't infallible anyway. You might just need to take a good, hard look to see if any varables are being used before they've been set to a sensible value.

  3. #3
    Join Date
    Oct 2003
    Location
    Philadelphia, PA
    Posts
    167
    VB doesn't require variable intialization.....did you try a debug stream or merely parsing out the suspect code with return statmenet to at least isolate the problem? It often is a memory issue!
    Mike Dershowitz
    [email protected]
    www.lexientcorp.com

  4. #4
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867
    Originally posted by mikedershowitz
    VB doesn't require variable intialization.....
    So what would happen if someone did this:-
    Code:
    Dim intXXX As Integer
    Dim intYYY As Integer
    
    intXXX = CallSomeFunc(intYYY)
    That kind of thing would probably cause an unexpected result in most computer languages.

  5. #5
    Join Date
    May 2003
    Location
    Toronto
    Posts
    51
    I cannot get the problem to recreate when I am running it in development mode in VB. It only happens after I install it on a PC. I do not know the area of code that is suspect. Is there a way that I can debug after an install?

    We well, I realized that the program does not actually freeze cause i can actually select something else to do. I can even select the same option again. It again does nothing. But the form still seems active.

    anyideas are welcome. My release date is today
    Before a man can wake up and find himself famous, he must first wake up and find himself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured