Opened 3 years ago

Last modified 9 months ago

#6201 new defect

Replay filter broken

Reported by: Langbart Owned by:
Priority: Should Have Milestone: Alpha 27
Component: UI & Simulation Keywords: regression
Cc: Patch:

Description (last modified by Langbart)

When checking the replay screen in the latest SVN version [25658], the Filter was enabled, but there were still some gray replays displayed.

I will attach the my replay folder as a zip file - 0.0.25.zip

A short discussion about the problem can be found in IRC 0ad-dev (3/Jun/21)

18:28 < Angen> Langbart: yeah, something is wrong with filter
18:29 < Angen> it sometimes does not filter some replays
18:29 < Angen> and sometimes it filters all

Edit 1: The problem probably starts with changeset [25634], but errors are displayed until it is fixed in [25651]. This means that the problem is probably related to [25634], but you can only check it with [25651] for the first time.

Attachments (3)

replay_screen.jpg (87.6 KB ) - added by Langbart 3 years ago.
0.0.25.zip (1023.0 KB ) - added by Langbart 3 years ago.
25651_25634_25633.jpg (86.9 KB ) - added by Langbart 3 years ago.

Download all attachments as: .zip

Change History (29)

by Langbart, 3 years ago

Attachment: replay_screen.jpg added

by Langbart, 3 years ago

Attachment: 0.0.25.zip added

comment:1 by Imarok, 3 years ago

Hmm, I can't reproduce the issue with your data. Did you have mods enabled?

in reply to:  1 comment:2 by Langbart, 3 years ago

Replying to Imarok:

Hmm, I can't reproduce the issue with your data. Did you have mods enabled?

No, the problem is still there with the latest SVN version [25758], but the replay filter works perfectly with the recently released macOS bundle for A25.

PS: I used the same replay folder to test the macOS bundle and the SVN version.

comment:3 by Freagarach, 3 years ago

It may or may not be related, but when I return from a replay it doesn't show any replays at all, unless I untick and tick the filter. r25763

comment:4 by wraitii, 3 years ago

can't reproduce any issue.

in reply to:  3 ; comment:5 by Imarok, 3 years ago

Replying to Freagarach:

It may or may not be related, but when I return from a replay it doesn't show any replays at all, unless I untick and tick the filter. r25763

I also can't reproduce that. I guess that means that you have to investigate the code :/

in reply to:  5 comment:6 by Langbart, 3 years ago

Replying to Imarok:

I guess that means that you have to investigate the code :/

Good conversation on IRC 0ad-dev (11/Jul/21) between me and Stan, the problem boils down to the changes from changeset 25634 (2/Jun/21) with the introduction of ignoreInCompatibilityChecks.

comment:7 by Langbart, 3 years ago

Description: modified (diff)

Additional observations added to the description for changeset [25633], [25634] and [25651].

by Langbart, 3 years ago

Attachment: 25651_25634_25633.jpg added

comment:8 by Silier, 3 years ago

Keywords: regression added

comment:9 by Silier, 3 years ago

Looks like isReplayCompatible has real issue

let iscmp = isReplayCompatible(replay);
let iscmp2 = isReplayCompatible(replay);
let iscmp3 = isReplayCompatible(replay);

if (iscmp != iscmp2 || iscmp3 != iscmp2)
   error("isReplayCompatible has real issue");

it returns different results for the same replay, dont know why yet. Also modToString has issue returning undefined, undefined

comment:10 by Silier, 3 years ago

if (mod.name === undefined)
   warn(uneval(mod));

results in

WARNING: ["public", "0.0.25"]

But this is irrelevant for release because in a25, all a24 replays will be incompatible by engine version and not mods and this happens only with old replays

Last edited 3 years ago by Silier (previous) (diff)

comment:11 by Silier, 3 years ago

WARNING: [["public", "0.0.25"]] vs [{mod:"public", name:"0ad", version:"0.0.25", ignoreInCompatibilityChecks:false}]

WARNING: hasSameMods?true

WARNING: [["public", "0.0.25"]] vs [{mod:"public", name:"0ad", version:"0.0.25", ignoreInCompatibilityChecks:false}]

WARNING: hasSameMods?true

WARNING: [["public", "0.0.25"]] vs [{mod:"public", name:"0ad", version:"0.0.25", ignoreInCompatibilityChecks:false}]

WARNING: hasSameMods?false
}}}}

comment:12 by Silier, 3 years ago

[["0ad", "0.0.25"]] vs [{mod:"public", name:"0ad", version:"0.0.25", ignoreInCompatibilityChecks:false}]

code is very inconsistant

comment:13 by Stan, 3 years ago

Maybe it bugs because public != 0ad ?

comment:14 by Silier, 3 years ago

it checks for path, what means mod in this case. so as you can see above, in the third call it decided that they are not compatible despite it passed twice. that said, no idea how 0ad got there instead of public.

I would gladly say, wontfix or worksome because in releaase: all replays will have old version number so checks will fail in engine version, not reaching mod compatibility checks, unless someone provides svn replay before mod rewrite which is doomed to not work anyway.

however there is something very strange going here and it is possible something else lies hidden and may cause bugs even for replays created in release

comment:15 by Stan, 3 years ago

0ad is in the mod.json I believe wraitii implemented something just to read that. It's buggy enough to be worth investigating but i'll move on after fixing translations if you think that:s okay

comment:16 by Silier, 3 years ago

I meant this [["0ad", "0.0.25"]] should not be happening as there supposed to be [["public", "0.0.25"]] in replays

comment:17 by Stan, 3 years ago

Well technically it's more correct as folders should be irrelevant...

comment:18 by Silier, 3 years ago

Techically maybe yes, but not from perspective of current code

comment:19 by Freagarach, 3 years ago

Can it be that the check alters the replay data? (Idea courtesy of elexis.)

Last edited 3 years ago by Freagarach (previous) (diff)

comment:20 by Silier, 3 years ago

I thought about that also, but could not prove it yet

comment:21 by elexis, 3 years ago

If deepfreeze(replay) works then statements trying to modify the object will throw an exception, refs #4257, #3647, ...

comment:22 by Stan, 3 years ago

Maybe not the replay itself but the cache ?

comment:23 by Stan, 3 years ago

Milestone: Alpha 25Alpha 26

comment:24 by Freagarach, 2 years ago

Milestone: Alpha 26Alpha 27

comment:25 by Freagarach, 16 months ago

Milestone: Alpha 27Backlog

Pushing back.

comment:26 by Vladislav Belov, 9 months ago

Milestone: BacklogAlpha 27
Note: See TracTickets for help on using tickets.