Page 1 of 1

WANTED! The income bug.

PostPosted: 01.02.2012, 08:02
by dcode
Hello everyone,

PLEASE NOTE: To avoid too huge load just because of debugging, there is now an option to enabled it explicitly when in a game. Type "/debug" to the chat box to enable/disable it. If you intend to report a bug, it is vital that debugging is enabled from the beginning of the game!

some of you may have noticed that there is still one really bad bug contained in 1.0. It seems that there is something working wrong for credits and especially income calculation which may or may not causes the following side effects:

- When building a tower, it lasts longer than normal to build it (usually till the next income is received)
- When sending creeps, especially at the end plus at the beginning of a round, they will spawn with some delay

With 1.0 RC6b I tried to fix it again and added some useful debug messages that will hopefully make it possible to locate and finally fix this issue if it's still present. But I need your help!

When running the webstart or the download version, you will notice the "LOG" button on the top right of the window. Please use it when you are encountering the bug, and study the credits and income debug messages that look like this lines:

07:49:59,996 INFO PlayerInGame:225 - PlayerInGame(10/dcode) Credits=4382+50 (New round) at round 7800
or
07:54:22,924 INFO PlayerInGame:225 - PlayerInGame(10/dcode) Credits=22682+15000 (Killed VULTURE(90)) at round 9459
or
... DEBUG New round at X (income round N)
etc.

Please check if the message from the log is matching the game state in time, amount, no duplicates (each creep killed only once) and so on.

And: If you notice anything unexpected, please tell me so that I we can finally fix this :)

Cheers
dc

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 17:07
by bialowons
wollte grad ein log vom bug posten,aber lässt sich nicht kopieren,bzw. reporten....neuer plan?

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 17:16
by EasyX
Starte vor jedem Spiel neu.. wenn der Log zu lang wird stürzt es ab. Hoffe das er nach einem Spiel nicht zu lang ist markiere alles mit strg+A und kopier es dan mit strg+c

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 17:44
by dcode
Wenn das Kopieren nicht geht, liegt es wohlmöglich an der Webstart-Version. Das ist ein Java-Fehler, wenn du aber die Download-Version stattdessen verwendest, kannst du wie gewohnt kopieren! Freue mich auf deine Log, die wird bestimmt aufschlussreich sein.

Denk bitte dran, beim Start des Spiels mit der Eingabe von "/debug" in die Chatzeile das Debugging zu aktivieren - das ist jetzt neu!

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 17:52
by manuel
Ich hatte eben das selbe Problem wie bialowons, das einzige was ich bieten kann, ist der Schlussscreen:

Image

Konnte weder aus der Konsole, die ich laufen hatte rauskopieren und wenn ich rechts oben auf LOG geklickt habe, ist auch nichts passiert.

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 19:57
by bialowons
wo ist der fehler?!

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:07
by dcode
Falls jemand Interesse hat, den Bug zu suchen und zu finden, sei er hiermit ausdrücklich dazu ermutigt :) Eventuell beide Logs mal gegenprüfen etc., wo es eine Diskrepanz gibt...oder wo generell etwas passiert, was nicht hätte sein können. :)

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:10
by gott
Dass es bei mir ganz am Schluss noch Runde 137 angezeigt hat, obwohl es 142 Runden waren:
http://www.creeptd.com/games/40qjx4kkqt ... 32qh8s3eax
Weiterhin waren Teile vom Screen grau und andere schwarz; upgegradete Türme wurden auch nicht richtig angezeigt.

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:50
by EasyX
Was ich nciht verstehe das am Anfang bei vielen 400+200 steht dann müsste ja niemand was geschickt haben? generell sind die Credits scheinbar aufaddiert und nicht runtergerechnet im log... (die die vor den + stehn)

Und wie genau "übersetzt" man dieZeilen wo nur Zahlen stehn?

S->C ist ja sicher Server to client? was heißt CB /TB udn die ziffern danach?

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:54
by manuel
Das regt echt auf, hatte eben wieder den selben Bug und konnte schon wieder den Konsoleninhalt nicht kopieren, da reagiert gar nichts. Die Log konnte ich auch wieder überhaupt nicht aufrufen.

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:58
by EasyX
EasyX wrote:Starte vor jedem Spiel neu.. wenn der Log zu lang wird stürzt es ab. Hoffe das er nach einem Spiel nicht zu lang ist markiere alles mit strg+A und kopier es dan mit strg+c


Ich erinnere daran!

dcode wrote:Denk bitte dran, beim Start des Spiels mit der Eingabe von "/debug" in die Chatzeile das Debugging zu aktivieren - das ist jetzt neu!


Und daran.

Re: WANTED! The income bug.

PostPosted: 01.02.2012, 20:59
by manuel
Ja, weiß ich doch, habe ich auch gemacht, aber auch das Creepfenster und nichts hat mehr reagiert; kann mir nicht vorstellen, dass das zu lang war.

Auch das mit dem debug habe ich gemacht :)

Re: WANTED! The income bug.

PostPosted: 02.02.2012, 01:48
by dcode
Got the bug:

  Code:
19:37:52,059  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=460+5 (Sent MERCURY(264)) at round 3586
19:37:52,058  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=455+5 (Sent MERCURY(261)) at round 3586
19:37:52,057  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=450+5 (Sent MERCURY(252)) at round 3586
19:37:52,056  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=445+5 (Sent MERCURY(237)) at round 3586
19:37:52,053  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=440+5 (Sent MERCURY(263)) at round 3586
19:37:52,053  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=435+5 (Sent MERCURY(260)) at round 3586
19:37:52,052  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=430+5 (Sent MERCURY(251)) at round 3586
19:37:52,051  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=425+5 (Sent MERCURY(236)) at round 3586
19:37:52,050  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=420+5 (Sent MERCURY(262)) at round 3586
19:37:52,048  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=415+5 (Sent MERCURY(259)) at round 3586
19:37:52,048  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=410+5 (Sent MERCURY(250)) at round 3586
19:37:52,047  INFO PlayerInGame:272 - PlayerInGame(2033/hansa) Income=405+5 (Sent MERCURY(235)) at round 3586
19:37:51,684  INFO Uplink:141 - S->C: CB 3716 3 264 1 2033 20   11 FAILURE
19:37:51,683  INFO Uplink:141 - S->C: CB 3716 1 263 1 2033 20   11 FAILURE
19:37:51,683  INFO Uplink:141 - S->C: CB 3716 0 262 1 2033 20   11 X ok
19:37:49,754  INFO Uplink:217 - C->S: BC 1 3586
19:37:49,752  INFO PlayerInGame:219 - PlayerInGame(2033/hansa) Credits=419-50 (Sent MERCURY) at round 3586
19:37:49,652  INFO Uplink:141 - S->C: CB 3682 3 261 1 2033 19   10 X FAILURE
19:37:49,652  INFO Uplink:141 - S->C: CB 3682 1 260 1 2033 19   10 X FAILURE
19:37:49,651  INFO Uplink:141 - S->C: CB 3682 0 259 1 2033 19   10 X ok
19:37:49,651  INFO Uplink:141 - S->C: CB 3680 2 258 1 2045 27   0
19:37:49,650  INFO Uplink:141 - S->C: CB 3680 1 257 1 2045 27   9
19:37:49,648  INFO Uplink:141 - S->C: CB 3680 0 256 1 2045 27   9
19:37:49,648  INFO Uplink:141 - S->C: CB 3674 2 255 2 2045 26   8
19:37:49,647  INFO Uplink:141 - S->C: CB 3674 1 254 2 2045 26   8
19:37:49,646  INFO Uplink:141 - S->C: CB 3674 0 253 2 2045 26   8
19:37:49,646  INFO Uplink:141 - S->C: CB 3671 3 252 1 2033 18   7  X FAILURE
19:37:49,646  INFO Uplink:141 - S->C: CB 3671 1 251 1 2033 18   7  X FAILURE
19:37:49,645  INFO Uplink:141 - S->C: CB 3671 0 250 1 2033 18   7  X ok
19:37:49,645  INFO Uplink:141 - S->C: CB 3670 2 249 2 2045 25   6
19:37:49,644  INFO Uplink:141 - S->C: CB 3670 1 248 2 2045 25   6
19:37:49,644  INFO Uplink:141 - S->C: CB 3670 0 247 2 2045 25   6
19:37:49,643  INFO Uplink:141 - S->C: CB 3670 3 246 2 2035 18   5
19:37:49,642  INFO Uplink:141 - S->C: CB 3670 2 245 2 2035 18   5
19:37:49,642  INFO Uplink:141 - S->C: CB 3670 1 244 2 2035 18   5
19:37:49,642  INFO Uplink:141 - S->C: CB 3667 2 243 2 2045 24   4
19:37:49,641  INFO Uplink:141 - S->C: CB 3667 1 242 2 2045 24   4
19:37:49,641  INFO Uplink:141 - S->C: CB 3667 0 241 2 2045 24   4
19:37:49,640  INFO Uplink:141 - S->C: CB 3663 2 240 2 2045 23   3
19:37:49,640  INFO Uplink:141 - S->C: CB 3663 1 239 2 2045 23   3
19:37:49,639  INFO Uplink:141 - S->C: CB 3663 0 238 2 2045 23   3
19:37:49,639  INFO Uplink:141 - S->C: CB 3663 3 237 1 2033 17   2  X FAILURE
19:37:49,638  INFO Uplink:141 - S->C: CB 3663 1 236 1 2033 17   2  X FAILURE
19:37:49,638  INFO Uplink:141 - S->C: CB 3663 0 235 1 2033 17   2  X ok
19:37:49,637  INFO Uplink:141 - S->C: CB 3661 3 234 3 2016 23   1
19:37:49,637  INFO Uplink:141 - S->C: CB 3661 2 233 3 2016 23   1
19:37:49,636  INFO Uplink:141 - S->C: CB 3661 0 232 3 2016 23   1
                                         RND  C ID  T SNDR RF


All the Creeps with the same added number (1 to 11) are the same creep sent to different context. All sends marked with an X are those sent by hansa. All messages are transmitted in correct order, however, as you see on top, the incoming messages are NOT processed in the order they arrived but instead processed in the order one creep of 1, one of 7, one of 10, one of 11 and then starting again from the beginning. Because of this shuffled/mixed order, a sent creep gets counted multiple times (once for each context) so that a player who encounters this bug gains three times the money and income from a creep which is two times too much in a 3-player-ava game.

I have to look into this and try to find the exact point in the code where messages get shuffled or, if there is none, have to explicitly synchronize this against architecture specific optimization or thread splits. It's important that not all players get this bug but only a few, so it may also be a problem caused by the java vm when optimizing code for multiple cores or especially for something like the Intel I7 architecture with 2 threads a core which may in this case split thread execution to multiple workers in the background.

Re: WANTED! The income bug.

PostPosted: 02.02.2012, 02:10
by dcode
I tried to fix it, please test if it's still present :)

Re: WANTED! The income bug.

PostPosted: 02.02.2012, 02:12
by dcode
manuel wrote:Ja, weiß ich doch, habe ich auch gemacht, aber auch das Creepfenster und nichts hat mehr reagiert; kann mir nicht vorstellen, dass das zu lang war.

Auch das mit dem debug habe ich gemacht :)


Wenn du keine Log mehr kopieren kannst, verwende die Download-Version und gib mir danach die creeptd-client.log aus dem logs/ Ordner. Die wird auch gespeichert, falls es ganz stehenbleibt :)

Re: WANTED! The income bug.

PostPosted: 02.02.2012, 08:27
by bialowons
also,ich teste es heut abend wahrscheinlich mal,kann aber nichts versprechen.
dcode,erst mal richtig dickes dankeschön(egal obs läuft oder nicht)

Re: WANTED! The income bug.

PostPosted: 02.02.2012, 20:30
by Goldmember
Sorry I didnt see this before I made a thread, its still happening :(

Re: WANTED! The income bug.

PostPosted: 11.05.2012, 08:43
by Polaaysis
is this bug still around? just wondering so i can look out for it

Re: WANTED! The income bug.

PostPosted: 11.05.2012, 15:32
by dcode
This bug has already been fixed :)