hbons / SparkleShare

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

Sparkleshare crash: "System.ArgumentOutOfRangeException: Length cannot be less than zero"" #1860

Open danwos opened 5 years ago

danwos commented 5 years ago

After Sparkleshare hanged up, I have killed the related processes. Since this I'm not able to restart sparkleshare. It starts, shows the status bar icon, performs some git action and then exit itself after showing the below exception.

A reinstallation does not help. I was also able to perform the git operations from the log without any errors. Also updating the repo via a manual git pull worked. I have not tested, if I'm able to push changes manually.

07:44:35 Environment | SparkleShare 2.0.1
07:44:35 Environment | Git LFS 
07:44:35 Environment | Git 2.17.1
07:44:35 Environment | Ubuntu (Unix 4.15.0.29)
07:44:35 Cmd |  | gvfs-set-attribute "/home/daniel/SparkleShare" metadata::custom-icon-name org.sparkleshare.SparkleShare
07:44:35 /useblocks/sync | Initializing...
07:44:35 Cmd | sync | git config core.ignorecase false
07:44:35 Cmd | sync | git config remote.origin.url "ssh://storage@XX.XX.XX.XXXXXX"
07:44:35 Cmd | sync | git config core.sshCommand ssh -i /home/daniel/.config/org.sparkleshare.SparkleShare/ssh/XXXX.key -o UserKnownHostsFile=/home/daniel/.config/org.sparkleshare.SparkleShare/ssh/known_hosts -o IdentitiesOnly=yes -o PasswordAuthentication=no -F /dev/null
07:44:35 Cmd | sync | git --no-pager log --since=1.month --raw --find-renames --date=iso --format=medium --no-color --no-merges
07:44:35 | Wrote crash report to /home/daniel/SparkleShare/crash_report.txt
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x00053] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Sparkles.Git.GitRepository.GetChangeSetsInternal (System.String path) [0x00536] in <0468e7dae8074b43a6922b63c39f309b>:0 
  at Sparkles.Git.GitRepository.GetChangeSets () [0x00001] in <0468e7dae8074b43a6922b63c39f309b>:0 
  at Sparkles.BaseRepository.Initialize () [0x00001] in <1cfdbdb30dbc4aa3a274a50c6e3e3879>:0 
  at SparkleShare.BaseController.AddRepository (System.String folder_path) [0x0014b] in <6d9908bd36a64477b98c6146bd1b2e76>:0 
  at SparkleShare.BaseController.RemoveDeletedRepositories () [0x00073] in <6d9908bd36a64477b98c6146bd1b2e76>:0 
  at SparkleShare.BaseController.CheckRepositories () [0x00019] in <6d9908bd36a64477b98c6146bd1b2e76>:0 
  at SparkleShare.BaseController.<UIHasLoaded>m__F () [0x00007] in <6d9908bd36a64477b98c6146bd1b2e76>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0 

The last git command git --no-pager log --since=1.month --raw --find-renames --date=iso --format=medium --no-color --no-mergesgives the following output:

commit 59f30a66320d96075adabb934276a14e84a30944
Author: Igr31ECvFz+sxLiPiFmlDg==_PmlAhIIMjc054EXc9fFHLg== <Ts035yPRFgqULFIA+908Cw==_v3YcQbc/N8jhDsH+k2Xa84Mkfl4+MfgbvhdjGtpknt0=>
Date:   2018-07-25 13:24:08 +0200

    / ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/test.c’

:100644 100644 238fb04 50f4bf6 M        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/test.c

commit 1e05f7f6ec6c31cebf5d3514cbbb0cbbd88f8114
Author: Fg49mGKEOyyrERV/scLAhA==_YesSqdUOLORPP93oE7pGWw== <Fg49mGKEOyyrERV/scLAhA==_qG68bRhN57KVL8GfZGIQgL1GT/7lR+EXRCpbjPgowh8=>
Date:   2018-07-25 13:23:17 +0200

    + ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/test.c’

:000000 100644 0000000 238fb04 A        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/test.c

commit 1e3f757c1bbced6ac617bfd0d19da5c8510d8043
Author: BZuKScd4OzyEHvOF+prqrA==_80L7BClfj5S1eUlTX1HPbg== <BZuKScd4OzyEHvOF+prqrA==_xvX8bSzunANWBiXoa4Ez4u4sMPS8qP8wvZgid8l720Q=>
Date:   2018-07-25 13:21:52 +0200

    / ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/e-mail.txt’

:100644 100644 e54aca4 467ca0b M        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/e-mail.txt

commit 40c3592f196c30e5afae14599ad0b8a83a68a151
Author: G3PeXuhS7XNZ8Ixo8G2Luw==_w2CrtoB4rqEsuB7ksqo5pA== <G3PeXuhS7XNZ8Ixo8G2Luw==_cegyUyEWk0L4cisUC2EoFJ6KHQvr+3mKGIKoHJm6tjo=>
Date:   2018-07-25 13:21:17 +0200

    + ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/e-mail.txt’

:000000 100644 0000000 e54aca4 A        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/e-mail.txt

commit 974352c00973263b413658329b590fab9a0f8dd7
Author: L9a7tH3MLo6du8zc351cZQ==_oeju5+fzC40jT0+7Odimwg== <L9a7tH3MLo6du8zc351cZQ==_hneYB5GP/kBH5oxmI6elc2InIYmIuucCta9CEE6LQ2g=>
Date:   2018-07-25 13:21:04 +0200

    + ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/XX_XX_XX_CV.pdf’

:000000 100644 0000000 39f7341 A        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/XX_XX_XX_CV.pdf

commit d59c159190f719a8ef2b791faff74b1e46545f68
Author: sYX06PQRDNBWQAM7y+Vfwg==_EhrYni7PKamxQLn7GBqQdw== <sYX06PQRDNBWQAM7y+Vfwg==_dhM4e/sEJNGFsWCMyuOsGdWVn1U47CylSJfxQEW/DUw=>
Date:   2018-07-25 13:12:58 +0200

    + ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/summary.rst’

:000000 100644 0000000 abbb7ce A        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/summary.rst

commit 73733fd6048c30562cd85b627856225cc7bc9017
Author: HHZ9jxK7sicGDA7Ddwjr0g==_MD1ki/+t1FMl92tCMLMtDg== <IQn7AmeGruxwfqhnLh56vg==_CMjB977TUrRpQSvi9ECB0/TNyIfhVgsUCLWtYpwfxhs=>
Date:   2018-07-25 11:11:36 +0200

    + ‘05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/’

:000000 100644 0000000 84fcdf6 A        05_HR/00_Bewerber/180725_Embedded_XX_XX_XX/.empty

[[ A lot of more stuff. The last commit was the last one before my manual git pull]]

Any ideas for a workaround or solution. Thanks!