Clearing monsters after rolling intiative will cause VCC to hang
Submitted by stargazer_dragon on Thu, 2011-01-13 17:56
| Project: | Virtual Combat Cards |
| Version: | 1.4.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Nebulorum |
| Status: | closed |
Jump to:
Description
Split from #209: Compendium improvements for picking creature:
Bug: with the bug what the issue is since I don't rotate initiative I simply roll it then go down the list and start over when I hit the bottom occasionally I forget to even start the combat.
So when you add monsters, then calculate damage for combat then try to clear all monsters without ever starting combat the program freezes and has to be reloaded. works great long as I remember to start and end combat but if I forget to start the combat then I get mad and freezes up.

#1
I managed to reproduce the problem. Looking at the log there is an exception while the UI tries to read monsters that have just been removed. I believe there when you clear monster with initiative information the UI view does not clear the initiative information. Will have to investigate a little more.
One thing that I think could ease this problem of "forgetting" to start combat is to have that as a default action to be done after rolling initiative.
Start Combat is separate form rolling initiative because you can only re-roll initiative if the combat has not started. But unless the player have some power to re-roll this is not really needed, so we could have a default "auto start combat".
Work-around: Also, if you Undo (Ctrl+Z) a couple of times you can unfreeze the User Interface. Start combat, end combat, then clear.
#2
Did some investigation on what the issue is. The internal tracker (the one that executes the action) is not clearing initiative information unless you end the combat. This means that only part of the information is discarded. This could lead to more failures even if you use the work-around.
I believe the solution is to synchronize changes on the Roster (hold combatant information) and the initiative order (hold initiative trackers).
#3
Implemented a synchronization logic to clear initiative information when you remove a combatant from the roster. This fixed the UI problem.
Created issue #211: Add option to start combat automatically after rolling initiative for registering change in Initiative Dialog.
#4
Added this fix to trunk and released in version 1.4.3.
#5
not tried to reproduce the issue yet but love the button to start combat with initiative roll will make it a lot easier to not forget to start combat, once the auto applu effects like ongoing and regeneration r implimented I might actual start using the next turn option also
#6
Automatically closed -- issue fixed for two weeks with no activity.