Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer Modification Checklist Bug #6780

Closed
uluo-wes opened this issue Jun 20, 2022 · 25 comments · Fixed by #8383
Closed

Multiplayer Modification Checklist Bug #6780

uluo-wes opened this issue Jun 20, 2022 · 25 comments · Fixed by #8383
Labels
Add-ons Issues with the add-ons client and/or server. Bug Issues involving unexpected behavior. MP Lobby Issues with the multiplayer lobby UI and its components.

Comments

@uluo-wes
Copy link

uluo-wes commented Jun 20, 2022

Game and System Information

Description of the bug

When checking or unchecking mods in the multiplayer window the game freezes or hangs for a second and does one of the following:

  1. Checks/Unchecks the selected mod only. (On rare occasion it's smooth with no hanging).
  2. Checks/Unchecks up to 5+ other mods randomly, does nothing to the mod selected for some reason.
  3. Checks/Unchecks the mod selected and another two spaces up or down.
  4. When "3." occurs and I try to checking the selected mod again after unchecking both, the same mod two spaces up checks first, when clicking again the selected mod checks. Seems to happen in a weird sequence.

Steps to reproduce the behavior

  1. Download addons for 1.14.17 and 1.16.3, ideally the same addons updated for both versions.
  2. Open multiplayer, select any map.
  3. Check/Uncheck mods.

Expected behavior

Checking and unchecking mods only does so for the selected mod and doesn't automatically do so for random mods in the list.

Additional context

It's possible I messed something up having multiple installs of different versions of Wesnoth on Steam and two installed locally on two different drives causing unexpected bugs.

@uluo-wes uluo-wes added the Bug Issues involving unexpected behavior. label Jun 20, 2022
@knyghtmare
Copy link
Member

knyghtmare commented Jun 20, 2022

20220620 14:39:53 error config: found modification with id=Dead_Bodies twice
20220620 14:39:53 error config: found modification with id=lay_ambushes twice
20220620 14:39:53 error config: found modification with id=wind_modification twice
20220620 14:39:55 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:39:56 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:39:57 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:39:57 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:39:58 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:01 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:01 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:01 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:02 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:02 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:04 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:04 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:05 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:08 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:08 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:09 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:09 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:12 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:12 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:13 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:14 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:14 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:16 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:16 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:16 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:17 error mp/create: ignoring on_mod_toggle that is already set
20220620 14:40:17 error mp/create: ignoring on_mod_toggle that is already set

At a glance I think the mods Dead Bodies and Wind Mod are firing most of the error messages for 1.16.3
Rest of it is deprecation and a lot of warnings from Warning Strings from AWW.

May I suggest you to uninstall Dead Bodies, Wind Mod and Ambush Rework (all mods by Pipapopinguin) and see if the problem persists?
Context: this author has been known to make very buggy mods (seeing the forum reports) and you are using 3 of them.

@uluo-wes
Copy link
Author

Uninstalling all of Pipapopinguin's mods fixed the issues for not only my two Steam installs but the two local versions as well.

@knyghtmare
Copy link
Member

Closing this since the uninstallation of Dead Bodies, Wind Mod and Ambush Rework solved the issue.
For future reference:
this is the third time modifications by Pipapopinguin have caused "bugs" or issues like this.

@Wedge009 Wedge009 added MP Lobby Issues with the multiplayer lobby UI and its components. Add-ons Issues with the add-ons client and/or server. labels Jun 20, 2022
@soliton-
Copy link
Member

It would be still good to know what exactly the issue is. It sounds like a bug that an addon can cause this.

@soliton-
Copy link
Member

Closing this since the uninstallation of Dead Bodies, Wind Mod and Ambush Rework solved the issue. For future reference: this is the third time modifications by Pipapopinguin have caused "bugs" or issues like this.

Do you know which one is the cause? Or each one does it? Does the author know?

@knyghtmare
Copy link
Member

knyghtmare commented Jun 23, 2022

Closing this since the uninstallation of Dead Bodies, Wind Mod and Ambush Rework solved the issue. For future reference: this is the third time modifications by Pipapopinguin have caused "bugs" or issues like this.

Do you know which one is the cause? Or each one does it? Does the author know?

I suspect all three. Installed only Corpse Mod and the bug was caused instantly.

The author was notified of the previous 2 cases of their addons causing bugs. I suppose they have to be notified for the third time.

@soliton-
Copy link
Member

The ones that I looked at all include the same files multiple times (for example corpse.cfg in that addon). I suspect that's the issue. Still sounds like a bug in wesnoth to cause such weird effects.

@knyghtmare
Copy link
Member

Still sounds like a bug in wesnoth to cause such weird effects.

Perhaps not. I have installed mods by Mattss, Vasya N, Ravana, ForestD and myself and none of them have caused this kind of issue.

@soliton-
Copy link
Member

Some other addons not causing issues means this issue is not a bug in wesnoth? What's the relation even?

If there is a way to mess up the UI with one addon so that clicking on modifications of completely unrelated addons is messed up then that's clearly a bug in wesnoth. So far that's how it sounds like it to me.

@soliton-
Copy link
Member

So

[modification]
    id=foo
    name=Foo
[/modification]

[modification]
    id=foo
    name=Foo (duplicate)
[/modification]

[modification]
    id=foo2
    name=Foo 2
[/modification]

shows the issue. When you click on Foo 2 first Foo above is selected. When you click a second time Foo 2 gets selected. On the third click both get unselected at the same time. I can't reproduce the 5+ (de)selection but with a couple more duplicates and random clicking that may well happen.

While the wiki states the modification id must be unique that's quite some requirement since all addons can add as many modifications as they like... (In the case of Corpse Mod the issue is the suspected duplicate include so easy to fix there though.)

It certainly would be good if wesnoth behaved a little nicer. It does print error config: found modification with id=foo twice but at that point it should ignore the duplicate modification (or something else sensible) and not do random stuff.

@soliton- soliton- reopened this Jun 23, 2022
@Pentarctagon
Copy link
Member

So the fix would be that when populating that list for the UI:

  • Ignore modifications with duplicate IDs.
  • Print an error to the log/stderr saying it ignored a duplicate for the modification ID each time it encounters a duplicate
    ?

@soliton-
Copy link
Member

Yes, I think that would be the simplest fix. Not sure something more sensible could be done really.

@soliton-
Copy link
Member

Actually a design that forces unique IDs per addon would be even better. We could prepend the addon ID (addon dir name) to the modification ID. Then there won't be collisions unless the author does it in their own addon.

@Pentarctagon
Copy link
Member

Would that potentially break other things? I guess if it's done immediately on loading the modification then it's probably fine internally, but what about allow_modification/disallow_modification/ignore_incompatible_modification/require_modification?

@soliton-
Copy link
Member

I would accept either ID (with addon prefix or not) in those places so that it works the same as now but in the future UMC authors could gradually switch to the safer addon prefixed IDs.

@Discontinuum
Copy link
Contributor

I have a feeling most of ID duplication is when the addon coded a bit improperly like Dead Bodies. Maybe ignore the second one? Or can it be done so the behaviour is as now, but UI isn't broken? Dead Bodies doesn't produce 2 mods in the mod list, but it breaks the selection

@soliton-
Copy link
Member

soliton- commented Jun 24, 2022

For the case of duplicate IDs in the same addon there is no better way than to ignore I'd say. And ideally complain a bit more visibly so the author notices it easier.

@ProditorMagnus
Copy link
Contributor

If the addons are not fixed in reasonable time they need to be deleted.

All add-ons uploaded must actually be functional. This does not mean add-ons must be bug free or that they must be complete, but they cannot:
Cause errors elsewhere, when not playing the add-on's content.

@soliton-
Copy link
Member

soliton- commented Aug 2, 2023

If there are broken addons feel free to report them but let's not clutter up this issue with that.

@Discontinuum
Copy link
Contributor

Why can't the game just ignore the second addon with the same id?

@soliton-
Copy link
Member

soliton- commented Aug 2, 2023

Because nobody has implemented that so far.

@gfgtdf
Copy link
Contributor

gfgtdf commented Dec 8, 2023

In case someone wants to work on it:
The problem is probably that when populating the modlist in


The code removes dunblicates
But when the other list of populated in

The code doesn't remove dublicates so the two lists are out of sync.

@gfgtdf
Copy link
Contributor

gfgtdf commented Dec 8, 2023

Of course this is not an ideal solution, one could ask why do we need 2 lists (that can be out of sync) in the first place, and if we have two lists, why don't we at least populate the one list from the other list to make sure they are equal, one could try to refactor the code so that there are no longer two list etc.

@gfgtdf
Copy link
Contributor

gfgtdf commented Dec 8, 2023

After seeing the actual usecases, (which is an addon that includes the same file multiple times via macro inclusion ) i think it would maybe be better if we just showed none of the addons in that case, to make them aware that something is broken.

@soliton-
Copy link
Member

soliton- commented Dec 8, 2023

Don't show the modification? I don't think that's clearer than a visible message in the GUI on what's wrong. A very simple way would be to add a colored warning in front of the name or something.

Pentarctagon added a commit to Pentarctagon/wesnoth that referenced this issue Feb 11, 2024
Error string left as untranslatable for now due to string freeze.

Fixes wesnoth#6780
Pentarctagon added a commit to Pentarctagon/wesnoth that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add-ons Issues with the add-ons client and/or server. Bug Issues involving unexpected behavior. MP Lobby Issues with the multiplayer lobby UI and its components.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants