hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.87k stars 579 forks source link

Crash on startup with unexpected path leading to a repo under ~/SparkleShare #1912

Open fledermaus opened 4 years ago

fledermaus commented 4 years ago

What happened:

Sparkleshare crashed on startup, every time. The error in the crash report ended with this after the backtrace:

sparkleshare System.ArgumentNullException: Value cannot be null.Parameter name: uriString

What I expected to happen:

sparkleshare to start (or log a reason why it couldn't run)

This happens when:

  1. User made a copy of ~/SparkleShare/git.server.fqdn/reponame
  2. The copy was at ~SparkleShare/bkup/reponame

My guess is that sparkleshare was treating 'bkup' as a "server ident", looking it up and failing to generate a URI for it (so far so good) and then exploding in a shower of sparks instead of logging the error (and/or notifying the user) and moving on. The backtrace was pretty unhelpful (to me) but fortunately strace showed me what was going on.