Skip to content

Model files are modified (PNGs are corrupt) after extraction from downloaded zip file (Windows, conda, gz-fuel-tools10-10.0.1) #454

@torsten-pf

Description

@torsten-pf

Environment

  • OS Version: Windows 10
  • Binary build, installed via conda install gz-sim9
  • Version: 10.0.1 (libgz-fuel-tools10-10.0.1-h4fb69ce_0)

Description

  • Expected: Downloaded zipped model files are extracted without file modifications
  • Actual behavior: extracted files are modified (added whitespace characters). While this is not a problem for text files, the PNG files are corrupted and not loaded.

Steps to reproduce

  1. Install gz-sim9 in a new conda environment conda install gz-sim9
  2. Open shell, activate environment and run gz sim -s <model>.sdf - I used auv_controls.sdf
  3. Files are downloaded and extracted to %USERPROFILE%\.gz\fuel\fuel.gazebosim.org, for auv_controls.sdf to %USERPROFILE%\.gz\fuel\fuel.gazebosim.org\accurrent\models\mbari%20tethys%20lrauv\3
  4. Download the zip file from the url presented in the gz log file
  5. Compare the text and PNG files

Output

Diff of model.sdf, left is the file manually extracted from the zip, right the file extracted by gz-fuel-tools:

Image

Same files in ImHex hex viewer / editor:

Image

Same for Tethsys_Albedo.png (left manually extracted from zip, right from gz-fuel-tools):

Image

Extract from server_console.log:

(2025-02-21 15:25:55.287) [info] [FuelClient.cc:682] Downloading model [fuel.gazebosim.org/accurrent/models/mbari%20tethys%20lrauv]
(2025-02-21 15:25:55.891) [debug] [FuelClient.cc:1968] Downloading from a referral link [https://gz-fuel-resources-production.s3.amazonaws.com/accurrent/7c38bd52-7337-4bb9-ac94-421814f7ccfb/.zips/3.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAS5OHIRKDBY6VUUFF%2F20250221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250221T142555Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=d87ca543831c2239e752cd5bca5096bdf78edf062e1548d22e95a3c75c481edc]
(2025-02-21 15:25:57.627) [debug] [Zip.cc:180] Created file [<USERPROFILE>\.gz\fuel\fuel.gazebosim.org\accurrent\models\mbari%20tethys%20lrauv\3\materials\scripts\model.material]
(2025-02-21 15:25:57.647) [debug] [Zip.cc:180] Created file [<USERPROFILE>\.gz\fuel\fuel.gazebosim.org\accurrent\models\mbari%20tethys%20lrauv\3\materials\textures\Tethys_Albedo.png]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions