Reconnection Errors caused by processing units in random order

Bug #896238 reported by AlexB
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
High
AlexB

Bug Description

Two functions collecting units were not coded properly. The order of units might vary, depending on the memory addressed the units are saved at (i.e. randomly for the naked eye).

To find out which units are affected the functions are used by the following logics:
- Iron Curtain warheads and Generic Warhead SW
- EMP warheads and Generic Warhead SW
- Chronosphere SW
- Genetic Mutator SW (with Mutate.Explosion=no only)
- Psychic Dominator SW (with Dominator.Capture=yes only)
- IronCurtain/ForceShied SW
- Sonar SW (not in full map reveal mode)

All those logics might be affected. If more than one unit collected, the randomization might happen.

I tested with the Chronosphere. It happens quite frequently by shifting buildings with a large radius.

##### STEPS TO REPRODUCE #####
Fire any warhead or use any SW mentioned above in a network or internet game. The larger the effect radius (CellSpread, SW.Range), the more likely the order is randomized.

##### ADDITIONAL INFORMATION #####
This is planned to be an umbrella issue for the reported REs as of yet, as well as a place to report what the fix might break.

Revision history for this message
AlexB (alexander-b) wrote :
Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: trunk, r1108
Commit contains DLL: Yes
Revision comment:
Fixed issue #1627: Order the set of unit before processing them in various features and SWs. The order is the same on every computer, thus it shouldn't cause Reconnection Errors any more.
SVN: http://svn.renegadeprojects.com/Ares/1108

Revision history for this message
Graion Dilach (graiondilach) wrote :

Alex, am I understand this correctly, that this doesn't fix the "one PC doeesn't get the fired paradrop plane/delivered unit" RE?

Still, when I get time, I try it.

Revision history for this message
AlexB (alexander-b) wrote :

Nope Paradrops and Unit Delivery don't use the unit collection functions, and I haven't yet been able to reproduce this kind of RE.

Revision history for this message
LH_Mouse (lh-mouse) wrote :

Unbelievable.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

What are you referring to?

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

I uploaded a rules that contain all the super weapons Alex mentioned in the report.
Try it online and see if you can get RE with these SW before r1108, and then switch to r1108(or newer) and see if you can get them again.
How to:
- Play an allied side
- Allied Construction Yard, ChronoSphere Device(you can build it as soon as you deploy your MCV), Barracks and Ore Refinery, all this are equipped with superweapons you should test.
- Test the SWs on a group of units, not on empty cell.
And to make it easier to test, I changed buildspeed to .01 and made the c-yards give you lots of money.

If you want to look at the SW codes, look under [GACNST] codes.

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

My results with the rule file I uploaded:

Gen2Special
1107: I got RE after the EMP duration was gone, 2/2 times.
1108: RE 0/3 times.

GenSpecial
1107: Got RE 0/7 times.
1108: -

FCSpecial
1107: Used it on a large area of buildings, no RE in 5 tests.
1108: -

AresSphereSpecial
1107: Got RE 1/1 times.
1108: No Re in 5 tests(teleporting a large area of units and buildings)

DomSpecial
1107: Got RE 2/8 times.
1108: RE 0/7 times.

SonarSpecial
1107: No RE in 7 tests(used on enemy stealth unit placed over a wide area).
1108: -

GenConSpecial
1107: Used it on a large area of infantry, got RE 1/1 time.
1108: RE 0/5 times

Graion, you said my online testing was useless.
Even if both my computers are in the same building, we are both connceted to a DHCP server, which means playing online with my other PC equals playing online with you for example(except that I have e better conncetion and ISP :p).
So my tests are valid.

Revision history for this message
AlexB (alexander-b) wrote :

This sounds very promising. Thanks YRModder!

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: trunk, r1126
Commit contains DLL: Yes
Revision comment:
Related to issue #1627: Also use the comparer used to sort ObjectClasses for all classes derived from ObjectClass. While this does not solve any known problem, it is a cleaner solution.
SVN: http://svn.renegadeprojects.com/Ares/1126

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Tested like I tested before. No REs occurred.

Revision history for this message
AlexB (alexander-b) wrote :

No negative reports so far. Thanks for confirming! Closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.