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

Problem with Save/Load Functionality: Invalid Edges and Node Consistency #203

Open
Martinfx opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@Martinfx
Copy link

Hi,
I have a problem with the graph.hpp. Do you have some advice how to fix? Martinfx/materialeditor@0701030
There are critical issues with the current implementation of the Save and Load functionality in the project. Specifically, invalid edges and missing nodes are causing crashes and inconsistencies. Below is a detailed summary of the problem:

Problem Description:

  • Invalid Edges:
    When loading a saved project, edges reference nodes that do not exist in the graph. This leads to crashes during operations like num_edges_from_node.
    Error Messages:

Error: Invalid edge. Missing nodes: 2 or 0
Error: Invalid edge. Missing nodes: 2 or 1
Error: Invalid edge. Missing nodes: 6 or 5
Error: Invalid edge. Missing nodes: 5 or 2

Node Deletion Inconsistency:

  • When a node is deleted, associated edges are not removed properly. This results in dangling edges in the graph referencing deleted nodes.

Graph Integrity Check:

  • The current implementation does not validate the graph's integrity during save or load operations. This can result in corrupted data being saved or loaded into the application.

Assertion Failures:

  • During runtime, assertions fail due to missing edges or nodes. Examples:

Assertion failed: (iter != edges_from_node_.end()), function num_edges_from_node, file graph.hpp, line 248.

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

1 participant