dcsimg
Results 1 to 10 of 10

Thread: Strange vb6 compatibility issue

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    99

    Strange vb6 compatibility issue

    I have an old application, from 2008 - no source code.
    It will be replaced by somIthing new soon, before 2020 I hope.
    It kind of works in compatibility mode but there is the following strange issue we observed yesterday:

    I 'm asking the program to compute a certain time average using some data.
    It gives me the answer 1.14.88 (which means 74.88 seconds in mixed arithmetic notation).
    But in another machine with exactly the same data it says 1.15.60 !

    I also noticed some other things.
    Some of the data are grayed and this means "probably irrelevemt" - it's a sort of caution to the user.
    But the user is allowed to un-gray and compute the averages if he wants to.
    That's normal but now when I ungrayed some of those "probably irrelevent" data it refused to compute !

    Is it possible for a compiled program to exhibit such erratic behaviour ?
    I accept the possibility of bugs hidden for ten years, but different result in different machines ?

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,591

    Re: Strange vb6 compatibility issue

    Compiled programs always behave in the same manner.

    Triple check you are using the same data on both machines.
    Double check for differences in regional settings, maybe cause problems when dealing with numbers, dates and times represented as text
    Like 1,23 or 1.23

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,910

    Re: Strange vb6 compatibility issue

    Sounds like the issue is in the code. Perhaps processing some of those greyed items when it should not. Not sure why it would be different on different machines but also no idea what it is doing or how it is doing it but pretty certain the different result on different machine is a red herring. Either the data is different or it is using some odd way to get the end result that is unreliable.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    99

    Re: Strange vb6 compatibility issue

    The other fellow appeared to be in a hurry yesterday.
    Sure it was the same data and the result should have been 74.88.
    The double checking I asked him to do today was to start the program afresh and try and now he reports 74.88 as should be.

    There is then this possibility: He was doing other things with the program yesterday and some garbage became stuck somewhere, affecting the summation of the numbers that should give the 74.88 (and then because the 75.60 value he saw was indeed strange in the context, he noticed it). That points to a code error, some constant maybe that should have been set to zero when switching between forms, was not set to zero. Something like that, typical and not to be concerned with here.

    But just in case is it really never possible that compliled programs will behave differently for some external reason ? There is no date function involved that can be affected by the settings.
    Last edited by johnywalker; May 20th, 2019 at 09:20 AM.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    99

    Re: Strange vb6 compatibility issue

    -----------------

  6. #6
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    392

    Re: Strange vb6 compatibility issue

    Besides Locale settings, look for differences in INI files. If these were stored under Program Files, Windows visualizes them by making a copy under a different folder and use these instead. Browse to where the EXE is located, then look for "Compatibility files" below the menu bar in Windows Explorer. Typically they are redirected to the following location(s) depending on which folder the program was trying to write to:

    C:\Users\<UserID>\AppData\Local\VirtualStore\Program Files\
    C:\Users\<UserID>\AppData\Local\VirtualStore\Program Files (x86)\
    C:\Users\<UserID>\AppData\Local\VirtualStore\ProgramData\
    C:\Users\<UserID>\AppData\Local\VirtualStore\Windows\

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,591

    Re: Strange vb6 compatibility issue

    Quote Originally Posted by johnywalker View Post
    The other fellow appeared to be in a hurry yesterday.
    Sure it was the same data and the result should have been 74.88.
    The double checking I asked him to do today was to start the program afresh and try and now he reports 74.88 as should be.

    There is then this possibility: He was doing other things with the program yesterday and some garbage became stuck somewhere, affecting the summation of the numbers that should give the 74.88 (and then because the 75.60 value he saw was indeed strange in the context, he noticed it). That points to a code error, some constant maybe that should have been set to zero when switching between forms, was not set to zero. Something like that, typical and not to be concerned with here.

    But just in case is it really never possible that compliled programs will behave differently for some external reason ? There is no date function involved that can be affected by the settings.
    Just an human error...

  8. #8
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,098

    Re: Strange vb6 compatibility issue

    “It can only be attributable to human error."...HAL

  9. #9
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,910

    Re: Strange vb6 compatibility issue

    Quote Originally Posted by johnywalker View Post
    But just in case is it really never possible that compliled programs will behave differently for some external reason ?
    Well of course it is possible for a program to behave differently for some external reason, assuming of course the program does something with something external, config files, data files, user entry all of these things can change or be in error and cause different results. Also as already mentioned locale settings will have an impact on some things as can resolution settings and other factors may as well depending of course of what the program actually does and how it tries to do it.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    99

    Re: Strange vb6 compatibility issue

    Quote Originally Posted by DataMiser View Post
    Well of course it is possible for a program to behave differently for some external reason, assuming of course the program does something with something external, config files, data files, user entry all of these things can change or be in error and cause different results. Also as already mentioned locale settings will have an impact on some things as can resolution settings and other factors may as well depending of course of what the program actually does and how it tries to do it.
    For this particular one the regional settings are not involved (for instance the European dd-mm-yyyy date notation versus the American notation mm-dd-yyyy).
    Also all the figures contibuting to the "74.88 seconds" result were visible on the screen to both users and those figures were identical.
    So I suspect the other user was involved with some other computations that produced a leftover for some strange reason (bug) and he was getting the wrong result.
    The other user did n't have time to investigate more, then the next day I said to him perform an uninstall-reinstall and then go straight to this calculation and now the result was correct (74.88).
    So maybe that was it but maybe again the fresh install did something.
    But as it is an old progam (XP) I still have a certain amount of doubt.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width