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

Traceback when purging Data Store #2355

Closed
soininen opened this issue Oct 17, 2023 · 0 comments
Closed

Traceback when purging Data Store #2355

soininen opened this issue Oct 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@soininen
Copy link
Contributor

I tried to purge a Data Store from its properties tab after opening and closing Database editor and got this Traceback:

Traceback (most recent call last):
  File "spinetoolbox\helpers.py", line 122, in new_function
    return func(*args, **kwargs)
  File "spinetoolbox\fetch_parent.py", line 99, in _apply_pending_changes
    self.handle_items_removed({db_map: data})
  File "spinetoolbox\fetch_parent.py", line 332, in handle_items_removed
    self._handle_items_removed(db_map_data)
  File "spinetoolbox\spine_db_editor\mvcmodels\tree_item_utility.py", line 209, in handle_items_removed
    self.remove_children(row, 1)
  File "spinetoolbox\mvcmodels\minimal_tree_model.py", line 193, in remove_children
    self.model.beginRemoveRows(self.index(), first, last)
  File "spinetoolbox\mvcmodels\minimal_tree_model.py", line 126, in index
    return self.model.index_from_item(self)
  File "spinetoolbox\mvcmodels\minimal_tree_model.py", line 313, in index_from_item
    return self.createIndex(row, 0, item)
RuntimeError: Internal C++ object (AlternativeModel) already deleted.
@soininen soininen added bug Something isn't working 0.8-dev labels Oct 17, 2023
@soininen soininen added this to the v0.8.0 milestone Oct 17, 2023
@soininen soininen self-assigned this Oct 17, 2023
soininen added a commit that referenced this issue Oct 19, 2023
We now tear down the invisible root item of TreeModelBase before we
replace it with a new one which sets the tree items' fetch parents
obsolete. Otherwise, refreshing the session in Database editor would
clog up non-obsolete but useless fetch parents in memory until
the editor was closed.

Re #2355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant