OpenRA / OpenRA/OpenRA

ChromeProvider crash on duplicacted image region

Open
#18,053 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Mod Support UI
Dominant language
C#
Stars
17.4k
Forks
3k
Avg merge
1d 12h
Merged PRs (30d)
14

Description

Testcase: Add a duplicate spectator entry under flags.
Expected behaviour: the second spectator definition overrides the first (this is what happens if the entire flags entry is duplicated, and what we do for traits etc).
Actual behaviour: crash with an unhelpful An item with the same key has already been added. Key: spectator message that doesn't say where it is duplicated.

The current behaviour causes unnecessary problems for modders, and I expect that this should be a one-line fix (changing a .Add call somewhere to an indexed assignment).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the ChromeProvider handling for image regions and trace how the duplicated flags entries are added. Reproduce the testcase with a duplicate spectator entry, then verify that the second definition overrides the first without crashing and that the error behavior identifies where duplication occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.