Skip to content

Compiler sample program does not set exit code on failure #2725

@maximilian-maisel-bl

Description

@maximilian-maisel-bl

Intro

I'm using MuJoCo to simulate a robot and use the provided compiler to compile and validate models in an automated way.

My setup

I'm using the MuJoCo 3.3.3 with C API on 64bit Ubuntu 24.04.

What's happening? What did you expect?

The MuJoCo compiler sample/compile.cc does not set a non-zero exit code on error, e.g. if the model file does not exist or is invalid.

Steps for reproduction

  • Invoke the compiler with a non-existing file: compile non-existing.xml output.mjb
  • OR: Invoke the compiler with incorrect arguments: compile foo
  • OR: Invoke the compiler with non-model input file: compile not-a-model.xml output.mjb

Minimal model for reproduction

Bug is independent of model.

Code required for reproduction

Bug is independent of API code.

Confirmations

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions