Skip to content

A second live domain gets no altitude layer (unit tests crash when run in one process) #236

Closed

Description

@HugoFara

Should two domains alive at once each get their own altitude layer? Today the second one gets none.

DataBroker::initializeParticularLayers creates the altitude layer only if (altitudeLayer == 0) (DataBroker.cpp:609), and altitudeLayer is static. While a first domain is alive, a second domain's broker skips the layer, getLayer("altitude") returns null, and FireNode::setLoc dereferences it.

This shows up in the unit tests: ./bin/forefire_unit_tests run as one process segfaults in fire front ("a front trashed when it merges with itself…"), because the commands cases leave Command's domain alive before the sandbox builds its own. CI runs one suite per process, so it does not see it.

./bin/forefire_unit_tests --test-case="the BMap layer*,a front trashed*"   # SIGSEGV
#0 FireNode::setLoc  #1 FireNode::initialize  #2 FireDomain::addFireNode

Checking the broker's own layers instead (if (!hasLayer("altitude"))) makes all 48 cases pass in one process. The other static shortcuts (wind, slope…) probably have the same problem.

Side note: the domain ownership suite is not in the add_test list of tests/unit/CMakeLists.txt, so ctest never runs it.

Drafted with Claude Opus 5.5.

Activity

  1. antonio-leblanc commented on Oct 30, 2026

    @antonio-leblanc
    Collaborator

    Fixed by #237, merged into dev.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions