1

I have a VB6 app that loads initially (for a small prompt to enter a license key, only on the first time). It works fine on my machine (windows 7).

I had complaints of it crashing on someone else's machine (both xp and 7), so I made a Windows XP virtual machine. I installed it on the virtual machine, it crashed. I wanted to see where it crashed so I installed Visual Studio on the virtual machine so that I would get a debug prompt. When I ran the program again, it worked.

I am more familiar with C++ and had these kinds of problems, so I figured it was some sort of runtime issue.

I found this VB6 SP6 Redistributable Runtime:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24417

I installed that, and it still wouldn't run.

Any ideas where to go from here?

Edit:

I have tried depends.exe, it only shows MSJava, which I've heard I can ignore. Does depends.exe also show things like .ocx (Active X controllers?) that are required?

Also, from the cmd prompt, %errorlevel% doesn't seem to get populated. Is that a VB6 things, or does that indicate that this is truely a crash and not a user exit?

Chad Mourning
  • 608
  • 2
  • 12
  • 25
  • Turn on Dr Watson error crash reporting in a VM or other PC which doesn't have Visual Studio and when you get it to crash analyze the crash dump. It should tell you which function it crashed in. Also, check your compilation settings. Make sure all the safe settings are turned on like bounds checking and so on. – Shane Wealti Jan 03 '12 at 20:32
  • Do you have a manifest in your executable? Does it work any better without it? – Deanna Jan 03 '12 at 20:57
  • Try checking Windows event logs. – jac Jan 03 '12 at 23:31
  • Can you be more specific than "it crashes", or does it literally just disappear with no indication on screen or in the event log? – tcarvin Jan 04 '12 at 12:46

5 Answers5

2

Open the Visual Basic project and check both "References" and "Components" under the "Project" menu.

Since it is crashing with the VB runtime installed it is likely a component that you have referenced in the project that either does not exist (or is not registered) on the client under test.

This should be a simple fix.

Warren Rox
  • 655
  • 2
  • 8
  • 23
  • Yes this was the case for me. In the project was referenced "Microsoft office 14.0 access database engine object" but in the system was installed ""Microsoft office 16.0 access database engine object". After installing the previous versione crashes disappeared. – Luciano Sep 18 '20 at 09:16
1

I had the same problem on my windows 7 computer. I have uninstalled everything, changed my windows theme to Windows Classic.

I changed following properties of VB setup file. Right click on setup.exe and go to properties and in compatibility tab change the compatibility mode to windows XP SP2. And in settings uncheck the following check boxes.

  • Disable Visual themes
  • Disable Desktop composition
  • Disable display scaling on high DPI settings.
  • Run this program as an administrator

And have completed installation.

Followed by installing VB 6 service pack 6 from here. http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24417

Hope it helps.

Ram K
  • 76
  • 5
0

It may require something else other than just the runtime, have you tried viewing it with dependency walker http://www.dependencywalker.com/ on the machine that it crashes on?

It should quickly point out any missing references.

Sabre
  • 2,350
  • 2
  • 18
  • 25
  • I tried Depends.exe, but it only showed MSJava missing, which I've read I should just ignore. – Chad Mourning Jan 03 '12 at 20:43
  • it is possible still that it references something, have you tried creating a package of the application, have a look at the files included with the runtime package and how you should create a PDW package to distribute. http://support.microsoft.com/kb/192461 It could be looking for something else that does not exist on the machine other than a reference, like a hardcoded path to a file / reg key that exists elsewhere or not at all on the target machine. – Sabre Jan 03 '12 at 20:47
0

Maybe try again, create a new VM, but install the remote debugger instead of the full VS.

Rocklan
  • 7,888
  • 3
  • 34
  • 49
0

You should create an installer for your application. There may be more dependencies than just the VB6 runtime. A good installation tool will detect at least some of necessary dependencies for you. Have a look at this question or this question

Community
  • 1
  • 1
MarkJ
  • 30,070
  • 5
  • 68
  • 111