Skip to content

OMSimulator crashes when FMU sends a log message without a category #1323

@rruusu

Description

@rruusu

Description

The FMI standard allows an FMU to call the logging function with a null pointer for the category, if it doesn't defined any categories.

When this happens, OMSimulator crashes, as it does not check for a null value in the category argument in its logging function.

When executed using the command line omsimulator executable, the crash is silent and produces no related console prints.

Steps to reproduce

  1. Simulate an SSP containing FMUs producing messages with category NULL.
  2. OMSimulator crashes silently, retuning a seemingly random exit status

Example:

C:\...>omsimulator Demo_ss3.ssp --logLevel=1 || echo Error: %errorlevel%
...
Error: -1073741819

Version and OS

  • Version: OMSimulator v2.1.2-mingw-notlm-debug
  • OS: Windows 11, 64-bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions