Skip to content

INI parser throws unhandled exception on unimplemented W3DModelDraw fields (breaks Shockwave mod compatibility) #297

Description

@gpherai

Summary

Loading a Shockwave 1.201 (+ Shockwave Chaos / Good Balance overlay) object INI file causes an unrecoverable crash during TheThingFactory INI loading. The parser throws an exception on encountering INI fields that appear to be unimplemented, instead of skipping the unknown field/value the way the original retail engine does.

Environment

  • GeneralsX Flatpak (com.fbraz3.GeneralsXZH), build tag GeneralsX-Beta-19
  • Fedora Linux 44, Wayland
  • Mod: C&C: Shockwave v1.201 base install, with a Shockwave Chaos / "Good Balance" overlay applied on top (.gib archives renamed to .big so they get picked up by loadBigFilesFromDirectory, since the loader only globs *.big)

Steps to reproduce

  1. Install vanilla Zero Hour data + Shockwave 1.201 into the flatpak's game-data directory (files land in the ZH root next to Generals.exe, same layout retail installers use)
  2. Ensure the mod's .big/.gib archives are present with .big extension so StdBIGFileSystem::loadBigFilesFromDirectory(dir, "*.big", ...) mounts them
  3. Launch flatpak run com.fbraz3.GeneralsXZH
  4. Observe the log during TheThingFactory -> loadFileDirectory('Data\INI\Object')

Observed

[INI] load('Data\INI\Object\china\specialweapons\defences\hellstorm.ini') START
[INI] load - calling prepFile('Data\INI\Object\china\specialweapons\defences\hellstorm.ini') START
[INI] load - prepFile completed
[INI] ERROR in load('Data\INI\Object\china\specialweapons\defences\hellstorm.ini') - exception caught

The process terminates shortly after (no further log output, process no longer running).

Likely cause

HellStorm.ini's W3DModelDraw block uses fields that I could not find anywhere in the GeneralsMD source tree via grep -r:

  • WeaponFireFXBone
  • WeaponRecoilBone
  • ProjectileBoneFeedbackEnabledSlots
  • MAINTAIN_FRAME_ACROSS_STATES (as a Flags value)

These are original SAGE-engine fields already used by Shockwave back in 2016 (long before this port), so retail Zero Hour 1.04 clearly supports them. It looks like the INI field dispatch table for W3DModelDraw/draw-module parsing doesn't have entries for these yet, and encountering an unknown field currently throws instead of warning-and-skipping (which is what I'd expect the original engine's behavior to be).

Impact

Since these fields are common across many Shockwave (and by extension Shockwave Chaos) unit/building art definitions, this isn't isolated to one file — it looks like it will hit most of the mod's larger object definitions, making the mod effectively unplayable on this port in its current state.

Suggested fix direction

  • Add the missing field parsers to the W3DModelDraw INI field table (GeneralsMD and Generals variants), matching retail 1.04 behavior
  • Regardless of the above, consider making unknown-field parsing failures non-fatal (log + skip) rather than throwing, to match original engine tolerance and avoid single unsupported fields taking down the whole INI load

Happy to provide the extracted INI file or more log context if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions