dlr-gtlab / intelligraph-module

A Node-based Workflow Engine for GTlab
1 stars 0 forks source link

Resolve "Loading project causes crash if unknown nodes are part of a graph" - [merged] #185

Closed rainman110 closed 2 months ago

rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 11:54

Merges 113-problem-with-model-crash-if-unknown-nodes-are-part-of-the-model -> main

Closes #113

rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 11:55

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 11:56

@mariusalexander I added a small check. I know this is not the sufficient solution but is a first indicator to find the specific problem.

rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 12:02

Commented on src/intelli/graph.cpp line 816

    auto conData = m_local.find(connection->inNodeId());
    auto conDataOut = m_local.find(connection->outNodeId());

    if (conData == m_local.end() || conDataOut == m_local.end())
    {
        gtWarning() << tr("Cannot restore connection") << conId;
        return;
    }

    assert(conData != m_local.end());
rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 12:02

resolved all threads

rainman110 commented 2 months ago

In GitLab by @jensschmeink on Sep 10, 2024, 12:02

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 13:50

I think there is currently no way around such a check. I'll update the solution as there is an alternative method that we can use if we are unsure whether a node in the connection model exists. Maybe once we figured out how to implement a dummy node #107. Good catch!

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 13:52

Commented on src/intelli/graph.cpp line 816

changed this line in version 3 of the diff

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 13:52

added 1 commit

Compare with previous version

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 13:52

marked this merge request as ready

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 13:52

requested review from @jensschmeink

rainman110 commented 2 months ago

In GitLab by @mariusalexander on Sep 10, 2024, 14:03

mentioned in commit 615d3a366c6767bbe83322836667c23b6a130923