Skip to content

Cannot unregister node - node id 0 - not found -- in module (simu5g::Ip2Nic) Highway.car[0].cellularNic.ip2nic #299

@Zerumi

Description

@Zerumi

Hello everyone! Trying to simulate LTE-network with cars on the highway road, from simulations/lte examples folder.

When a car needs to be disposed of, the simulation fails with the following runtime error:

Image

I looked into the source code of Ip2Nic.cc and noticed that Simu5G tries to unregister an NR node by default:

void Ip2Nic::finish()
{
    if (getSimulation()->getSimulationStage() != CTX_FINISH) {
        // do this only at deletion of the module during the simulation
        binder_->unregisterNode(nodeId_);
        binder_->unregisterNode(nrNodeId_);                  // <--------------------------------- HERE
    }
}

However, in the case of an LTE network, nrNodeId_ is 0. Moreover, node ID 0 shouldn't exist in the simulation at all. As a workaround, I added a line at Binder.cc to return early from the function if the given nodeId is 0.

I've attached a pull request #300 that fixes this issue.

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