Jump to content


Photo

Failing to roll-back properly


  • Please log in to reply
10 replies to this topic

#1 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 05 August 2002 - 05:04 PM

Running under v61 (untested under v62, but unless you've changed this...).

Anyway, I re-install a mod, part of this is compiling the dialogue A and then the dialogue B. B fails to install and throws up an error and it uninstalls the mod. I go in, fix the problem and return to the command window. From there I choose "Yes" I want to install the mod. however, now it complains that dialogue A starts with a BEGIN, but A already exists... even thought A is unique to this mod and should have been removed when it rolled back.

If I No my way past everything and restart setup, everything works properly.

#2 weimer

weimer
  • Member
  • 1569 posts

Posted 05 August 2002 - 07:37 PM

Running under v61 (untested under v62, but unless you've changed this...).

Anyway, I re-install a mod, part of this is compiling the dialogue A and then the dialogue B. B fails to install and throws up an error and it uninstalls the mod. I go in, fix the problem and return to the command window. From there I choose "Yes" I want to install the mod. however, now it complains that dialogue A starts with a BEGIN, but A already exists... even thought A is unique to this mod and should have been removed when it rolled back.

If I No my way past everything and restart setup, everything works properly.

I'm having trouble following your error report.

Are you saying that if you change the D file *while Setup-Foo is running* there are problems? I'd believe that, but my current answer is "don't do that then". :-) Such a problem can only strike eager developers.

If you are saying something else about repeatably making the roll-back fail, can you help me to understand you better? Perhaps youc an provide a simple TP2 file and two .D files and a set of keypresses that cause the problem to recur? From that it will be a short step to me fixing it.

#3 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 06 August 2002 - 04:39 AM

When installation fails, it takes you back to the Yes or No question. I make my corrections at that point, without quitting the command window. This is something I've never had happen before v61 (though I think before that I used v57). Quitting the setup and loading it again works fine.

Don't do it... sure. Just add a feature so that it asks you to press enter to quit once an install fails. There's no point asking if you want to install if it's simply going to generate a false bug over and over until you quit and restart it yourself.

This is what happens:

Run setup
Choose to Re-install MOD
Mod elements install
Mod compiles dialogue A
Mod trips over on dialogue B
Mod uninstalls
Complains of error in B
Do you wish to install MOD? Yes or No?
*Quitch corrects problem in dialogue B*
*Quitch chooses Yes*
Mod elements install
Mod trips over on dialogue A
Mod uninstalls
Complains A uses BEGIN command when A already exists
Do you wish to install MOD? Yes or No?
*Quitch says no and exits setup*
*Quitch restarts setup*
Mod elements install
Mod compiles A
Mod compiles B
Mod is installed

#4 weimer

weimer
  • Member
  • 1569 posts

Posted 06 August 2002 - 06:25 AM

Complains A uses BEGIN command when A already exists


Thank you for posting the entire sequence. I now understand what the problem is. ( When an install fails, I was forgetting to clear the internal state of loaded dialogues. ) It will be fixed in the next version.

#5 weimer

weimer
  • Member
  • 1569 posts

Posted 06 August 2002 - 06:29 AM

By the way, this bug could also explain some of the people who seem to be installing things "multiple times". With the current WeiDU, if you get 99% of the way through a component and it fails, the first 99% of the work applying the D files is remembered. It then claims to rollback, but forgets to rollback that bit. Then the user says "re-try". It does the work again, applying the changes from the D file to the state already in memory (== applying them twice). That would be bad.

However, I'm not sure this explains everything, because I cannot imagine all that many people having a transient install error.

#6 weimer

weimer
  • Member
  • 1569 posts

Posted 06 August 2002 - 06:59 AM

Version 65 (available now) claims to fix this problem. I also added some code to check and see if the output dialog.tlk is a writeable regular file early in the process. Quitch, could you check and see if this version fixes your "A says BEGIN, file already exists" problem? I think it should, but outside checking is always good.

#7 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 06 August 2002 - 12:25 PM

Broke dialogue B and ran test using v65. It gave me the same problem as before.

#8 weimer

weimer
  • Member
  • 1569 posts

Posted 06 August 2002 - 07:59 PM

Hey Rocky, watch me pull a rabbit out of my hat. Again? But that trick never works. This time for sure!

Anyway, if you have a spare moment, I have yet another new version of WeiDU that claims to fix the now-notorious "Quitch-reported bug". Would you be so kind as to run your A-B test on it and let me know?

#9 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 07 August 2002 - 01:36 AM

Bug continues under v66 I'm afraid.

I also tried uninstalling the mod and all components before running the test to see if working from scratch made a difference. It didn't.

#10 weimer

weimer
  • Member
  • 1569 posts

Posted 07 August 2002 - 11:28 AM

OK, Quitch, I think I've got it this time. I made my own test case: test\quitch\quitch.tp2 with a.d and b.d. As you mentioned, the problem was there even in the last version. However, it seems to be gone in this version (after some furious bug-hunting). Please let me know if it is also gone for you with the new v67. Thanks!

And thanks for reporting this evil bug. :-)

#11 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 07 August 2002 - 01:10 PM

Works like a charm. Ta.