Skip to content

Crashes when a version has no version files #514

@Ryuo1

Description

@Ryuo1

Description

I compiled Ferium myself from the latest commits on the repository (using GitHub Actions, not the latest official release binary), and most functionality is working correctly after creating a fresh profile from scratch.

However, ferium upgrade still panics for certain mods while downloading/upgrading them, while many other mods work normally.

The panic appears to happen when Ferium encounters a mod/version entry with an empty files array and attempts to access index 0 without checking whether the vector is empty.

Steps to Reproduce

  1. Compile Ferium from the latest commits on the repository
  2. Create a new profile
  3. Add a larger set of mods (Modrinth/Fabric in my case)
  4. Run:
ferium upgrade
  1. Some mods download correctly, but Ferium eventually crashes with:
thread 'ferium-worker' panicked at libium/src/version_ext.rs:15:35:
index out of bounds: the len is 0 but the index is 0

Operating System

Linux

Installation Method

GitHub Actions

Ferium version

ferium 5.0.0

Additional Information

  • This does NOT happen with every mod
  • Many mods upgrade/download successfully
  • The issue seems isolated to specific mod/version metadata
  • I recreated my profile from scratch and confirmed the issue still occurs
  • The latest official release binary appears more stable overall than the current repository state
  • I suspect some API responses now return empty files arrays for certain mod versions, which Ferium currently does not safely handle

Backtrace excerpt:

thread 'ferium-worker' panicked at libium/src/version_ext.rs:15:35:
index out of bounds: the len is 0 but the index is 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions