Skip to content

[Bug]: Cannot load some Classic models with I/O error: failed to fill whole buffer #56

Description

@t4cmyk

Prerequisites

  • I have searched existing issues to ensure this isn't a duplicate
  • I am using the latest version or main branch

Bug Description

Most models work fine with the library but for some I get this error:

Failed to parse M2 'world\generic\passivedoodads\lights\generaltorch01.m2': I/O error: failed to fill whole buffer
Failed to parse M2 'world\azeroth\westfall\passivedoodads\lamppost\westfalllamppost02.m2': I/O error: failed to fill whole buffer
Failed to parse M2 'world\generic\passivedoodads\lights\candle02.m2': I/O error: failed to fill whole buffer

with this code:

    let m2_format = parse_m2(&mut Cursor::new(&m2_bytes))
        .inspect_err(|e| warn!("Failed to parse M2 '{}': {e}", m2_path))
        .ok()?;

While debugging the issue if found out that the problem seem related to the particle emitters.

Expected Behavior

The model files should load correctly.

Steps to Reproduce

See my code example above. I read the files through the wow_mpq::patch_chain::PatchChain but it also fails if I read the models from the filesystem directly.

Version

0.6.4

Rust Toolchain

rustc 1.94.1 (e408947bf 2026-03-25)

Operating System

Linux

Cargo Output

Backtrace

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThis fine issue will need some housekeeping before it can be processed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions