Skip to content

Segfault in G2oTypes.cc #967

Open
Open

Description

@snpan22

I run monocular-inertial ORB-SLAM3 with many camera+imu datasets, but most of them crash in line 723 of G2oTypes.cc.

Image

EdgePriorPoseImu::EdgePriorPoseImu(ConstraintPoseImu *c)
{
    resize(4);
    Rwb = c->Rwb;
    twb = c->twb;
    vwb = c->vwb;
    bg = c->bg;
    ba = c->ba;
    // cout << c->Rwb <<", "<< c->twb<<", "<< c->vwb<<", "<< c->bg<<", "<< c->ba<<", "<< c->H<<endl;
    setInformation(c->H);
}

It crashes because the pointer "c" is null, so in the caller "pFp->mpcpi" is null, though I am not sure how to fix this. Has anyone else had this issue?

    if (!pFp->mpcpi)
        Verbose::PrintMess("pFp->mpcpi does not exist!!!\nPrevious Frame " + to_string(pFp->mnId), Verbose::VERBOSITY_NORMAL);

    EdgePriorPoseImu* ep = new EdgePriorPoseImu(pFp->mpcpi);

Activity

  1. clydemcqueen commented on May 2, 2025

    @clydemcqueen

    I can't remember the details, but I traced a segfault back to an uninitialized variable. I then found and fixed a few such problems, see clydemcqueen@7a1bcda

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