SFTtech / SFTtech/openage

Handle invalid assets gracefully

Open
#974 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: assets bug ci improvement
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

As shown in #972, openage crashes when it encounters invalid sound files. In this case, a field in the header struct had the wrong size, but i can imagine a bunch of other fails like corrupted bistreams or broken graphics taking down the engine. We should be robust against all the nastyness that might be hidden inside the assets. Crashing during a game would be inacceptable, playing silence or rendering a red X would be nice. We should also have proper logging and a way to nicely test asset packs for broken files. Last but not least, we should fuzz our current implementation and have integration tests with corrupt assets in kevin.
Ideas, anybody?

Contributor guide

No contributing guide indexed for this repository

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 with #972 and the invalid sound-file/header-struct failure described here, then map which asset types and failure modes are in scope. Done should include a decided handling and logging approach plus the requested asset-pack checks, fuzzing, and corrupt-asset integration tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
game-dev, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.