views:

142

answers:

1

Hi Everyone,

I know that this subject has been done to death on news groups and there are forum posts for Africa - but I wanted the option of you experts on stack overflow :)

Our VB6 app occasionally just vanishes while the user is doing things and doesn't give any sort of error nor is it in the PC's error log!

I was wondering if anyone has heard of this before on VB6 and what you did to fix it?

I thought perhaps changing all the code from native code to pcode might offer greater stability?


Extra info:

  • We're using Mdac 2.8
  • True DB Grid 6.0e

Notes added in edits:

  • Our Application is very large with 113 separate components and 120MB compiled size (that's with no embedded pictures or anything)
  • Our presentation layer creates the objects on the fly so everything is late bound.
  • I don't really care about the local performance of the VB6 app since it doesn't really do any serious processing as far as I can see so the performance is completely bottlenecked by our Oracle Database in the data centre 80 miles from 300 users - nightmare!
+1  A: 

It makes a difference. But not in favor of one or the other. Because two methods are not exactly the same they can produce different results with edge cases.

Understand also that the problem I am describe are compiler issues not mistakes on the programmer's part. So you want to really make sure this is the issue. We check this by comparing changes with the last known good version.

The issue we ran into is that for some of our larger projects a small change in code will cause errors (or the app just disappears). This happens when the binary is used.

When this rare circumstance occurs the only way to fix is reorder the lines of code or insert dummy lines like i = i. Anything that will force the compiler to emit a different sequence of assembly or pcode. Then the problem goes away.

There been a few instances where we do this, successfully compile, change it back, and successfully compile back. What we think happen in this case is that registry changes enough to force a slightly different set of binary/pcode to be emitted.

You also may want to clean your registry and your local temp folder.

My experience is that this may happen once every 1000 to 500 compiles of a large project with multiple references.

As a personal comment when this occurs the cause and solution are seemly nonsensical and makes me want to break out the voodoo doll and do a rain dance.

RS Conley