Skip to content

SubstanceNasalDoseData causes free(): invalid next size (fast) crash on Ubuntu 22.04 with GCC 11 #113

@jhaszczyn

Description

@jhaszczyn

Any scenario using SubstanceNasalDoseData crashes immediately with a memory error on Ubuntu 22.04 built from source with GCC 11.4.0.

Steps to reproduce

  1. Build BioGears 8.2.0 from source on Ubuntu 22.04 using GCC 11.4.0 and CMake 3.22.1
  2. Run any scenario containing a SubstanceNasalDoseData action, for example:

../outputs/Release/bin/bg-cli --scenario Scenarios/Drug/Naloxone_FentanylNasalStandardScenario.xml

Expected behaviour

Scenario runs and completes successfully, simulating nasal naloxone administration.

Actual behaviour

free(): invalid next size (fast)
User Requested Termination 6
Error-6: scenario failed mid simulation see log for more details.

The crash occurs immediately at the start of the simulation before any actions are executed. All other drug administration routes (intravenous bolus, infusion) work correctly.

Environment

BioGears version: 8.2.0 (commit 3f16a5f)
OS: Ubuntu 22.04 LTS
Compiler: GCC 11.4.0
CMake: 3.22.1
Build type: Release
Build tool: Ninja

Additional context

The following scenarios are affected:

Scenarios/Drug/Naloxone_FentanylNasalStandardScenario.xml
Any custom scenario using SubstanceNasalDoseData

All other fentanyl/naloxone scenarios using intravenous administration run successfully. This issue also prevented the BioGears UI submodule from building due to a related size_t missing #include error in QuantityConversionKey.h.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions