Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lights=None in RoR.cfg crash air vehicles loading #3126

Open
cryham opened this issue Feb 12, 2024 · 3 comments
Open

Lights=None in RoR.cfg crash air vehicles loading #3126

cryham opened this issue Feb 12, 2024 · 3 comments

Comments

@cryham
Copy link
Contributor

cryham commented Feb 12, 2024

Took me a while to find out.
So if I set Lights=None (fastest) in RoR.cfg then trying to get a new air vehicle (airplane, jet, helicopter etc) will crash RoR, not saying much in log.
Checked on recent dev builds, on Debian 12, amdgpu.

@cryham cryham changed the title No light in RoR.cfg crash air vehicles load. Lights=None in RoR.cfg crash air vehicles loading. Feb 12, 2024
@cryham cryham changed the title Lights=None in RoR.cfg crash air vehicles loading. Lights=None in RoR.cfg crash air vehicles loading Feb 12, 2024
@ohlidalp
Copy link
Member

Oops. The problem will be either in ActorSpawner.cpp ProcessWings() or GfxActor.cpp UpdateFlares()

@ohlidalp
Copy link
Member

ohlidalp commented Feb 14, 2024

SimData.h, line 636 is a suspect - not initialized pointer.

@cryham
Copy link
Contributor Author

cryham commented Feb 15, 2024

I've debugged the crash on my ogre-14 branch (hope it's the same) and it is
in source/main/physics/ActorSpawner.cpp here:

    //wing closure
    if (m_first_wing_index!=-1)
    {
        if (m_actor->ar_autopilot != nullptr) 
        {
            m_actor->ar_autopilot->setInertialReferences(
                & m_actor->ar_nodes[m_airplane_left_light],
                & m_actor->ar_nodes[m_airplane_right_light],  // <-- nullptr
                m_actor->m_fusealge_back,
                & m_actor->ar_nodes[m_actor->ar_camera_node_pos[0]]
                );
        }

2nd argument for setInertialReferences( is null.
If I comment out this call, then it works, and I can fly airplanes etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants