Solved

Slightly Odd Behavior

Posted on 2002-07-02
10
146 Views
Last Modified: 2010-05-02
Hello.

This is rather a difficult question to ask.  Basically we have an application we created.  With this application it asks for a user id and password, the script confirms it and then opens a form.  All this works wonderful on all machines.

Then one day we decide to add some code deeper in the program.  Now on two machines it asks for the user id and password and just hangs.  On all other machines it works fine.  We did not touch the code that has to do with the log on.

The program was written in VB 6.0 and is run on NT workstations without VB installed.  As I said, it worked fine until this change was made.

We have reinstalled the application still to no avail.  Does anybody at all have any ideas?

I know this one is difficult.

Thanks,

nnaxor
0
Comment
Question by:nnaxor
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 7124895
You should add some debugging code to the application, to follow what happens.
If you can access the PC's where the problem occurs with not problem, I would suggest to use message boxes, but what i would do is this:

Public Sub EnterFunction (fName as string)
open app.path & "\debugging.log" for output as #1
print #1, fname & vbtab & "Entering"
close #1
End Sub

Public Sub ExitFunction (fName as string)
open app.path & "\debugging.log" for output as #1
print #1, fname & vbtab & "Exiting"
close #1
End Sub

Then, for all your (relevant) functions, add the EnterFunction at the beginning and the Exitfunction at the end of the Sub/Function ...

I Would put the above code even in a standard module, and include a flag which could be set at startup:


Public Sub Main ()
  If Command$ like "*/DEBUGGING* then
    blnDebugging = true
  end if
  ...
 
End Sub

and check that flag in the EnterFunction and ExitFunction before writing to the file.

With the output of this file, you can see in which function the problem occurs.


Now, I guess that the problem is an errorhandler that has runs into an error and calls itself...

CHeers
0
 
LVL 5

Expert Comment

by:Julian_K
ID: 7124916
Well... remove all "On Error" statements and check where it hangs ;-)

I suggest you writing a small DLL for run-time logging.
The easiest way is to open a text file and in the beginning of each procedure/function to write to this file the name (eventually the parameters).
When the program hangs, you can view the text file and get more info on where exactly it hangs, and what parameters were recieved, etc. It's not a lot of work.
0
 
LVL 1

Author Comment

by:nnaxor
ID: 7124935
That makes sense and seems like a good idea, however, the problem we have is that it only happens on two machines.  The other dozen or so it works fine on.  This would seem more like a machine related problem rather then the program.  Unless I am missing something.  Because it was working on those machines before.  It is on a network drive and we actually install the app on those pcs.  I'm not sure how debugging on a single machine will make any difference.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 5

Expert Comment

by:Julian_K
ID: 7124942
angelIII, you're faster :-)
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7124947
Debugging will SHOW you the difference you can't see right now. It will tell you in which procedure the code hangs -> you will only have few lines to read and try to imagine what the problem could be. Something HAS changed, you don't know -> You DEBUG !!!
CHeers
0
 
LVL 1

Author Comment

by:nnaxor
ID: 7124960
That makes sense and seems like a good idea, however, the problem we have is that it only happens on two machines.  The other dozen or so it works fine on.  This would seem more like a machine related problem rather then the program.  Unless I am missing something.  Because it was working on those machines before.  It is on a network drive and we actually install the app on those pcs.  I'm not sure how debugging on a single machine will make any difference.
0
 
LVL 1

Author Comment

by:nnaxor
ID: 7124968
Sorry about the double post.  You are both entirely correct.  The machines that are not working are not close by and so before beginning the trek there I wanted to confirm there was nothing else it could be.  As it seemed machine related.  We will do as suggested as soon as we can get to those machines.  Thanks much and let's hope this helps.
0
 
LVL 1

Author Comment

by:nnaxor
ID: 7125017
BINGO - you guys so rule - no wonder it is called experts-exchange <grin>.

Okay now we get an error:

430 Class does not support Automation or does not support expected interface.

Angellll?
0
 
LVL 1

Author Comment

by:nnaxor
ID: 7125389
Thanks much.  As this helped to diagnois so we could find the problem, I will go ahead and close out this question and start another one now that I know what the problem is.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7126029
Hi,
Glad we could help you by pushing you :-)

430: you probably have
* a binary installed that is not installed with the correct version

When you know on which line the error occurs, you know the class that it expects, and compare the version of the development PC with the one on the PC where the problem occurs.

CHeers
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

724 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