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

Crash when loading repositories #1319

Closed
shana opened this Issue Nov 15, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@shana
Collaborator

shana commented Nov 15, 2017

Got a crash when loading repositories in the Clone dialog. I think this is something related to the database having null or invalid data in it.

Possible repro:

  • Login
  • Open the clone dialog
  • Crash?

exceptionwhenfilteringclonerepos
indekeyisnull

The IndexKey property of the CacheIndex object being null means that in line

var idx = Observable.Defer(() => This.GetOrCreateObject(key, () => CacheIndex.Create(key))).Replay().RefCount();
the object was returned from the database instead of being newly created by the CacheIndex.Create(key), and the database returned an empty/invalid object.

Possible fix:

After a This.GetOrCreateObject call, before the Replay (inside the Defer, basically), we should check whether the object is actually valid (has the key filled out, basically), and if it isn't we just go ahead and create one with the same create method that we pass into the GetOrCreateObject, to guarantee that even if the database is screwed up, we always have valid objects (and saving them afterwards as normal should fix any corruption in the database, so that's a nice plus).

@shana shana added bug crash labels Nov 15, 2017

@meaghanlewis meaghanlewis added this to High Priority in BUGS Dec 2, 2017

@grokys grokys self-assigned this Dec 11, 2017

@grokys grokys added the needs repro label Dec 12, 2017

@grokys grokys moved this from High Priority to Needs Repro in BUGS Dec 12, 2017

@shana shana removed the needs repro label Feb 1, 2018

@shana

This comment has been minimized.

Collaborator

shana commented Feb 1, 2018

To repro: install 2.2.0.10, open the clone dialog so it populates with data, then update to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment