Skip to content

Crash when restoring folder #143

@crwood

Description

@crwood

An anonymous macOS user reports an application-crash when trying to restore a folder from a rootcap, recording the following debug log output:

Traceback (most recent call last):
  File "/Users/buildbot/gridsync/macOS_10_14/build/gridsync/gui/view.py", line 339, in <lambda>
  File "/Users/buildbot/gridsync/macOS_10_14/build/gridsync/gui/view.py", line 190, in select_download_location
KeyError: 'collective_dircap'
Abort trap: 6

This appears to be the result of Gridsync trying to read/load a directory capability that is expected but not actually present in the user's rootcap (caused, perhaps, by failing to link said capability into the rootcap when the folder was initially added due to a network disconnect event or similar).

While nothing can be done to restore a folder whose capabilities are missing (and more should be done here to prevent such states from occurring in the first place), this code path should nevertheless be repaired so as to throw a user-facing error in such cases (rather than simply crashing unhelpfully due to the unhandled exception).

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