LostAlloy / LocalHistory-for-Visual-Studio

Local History for Visual Studio automatically creates a history of your files every time they are saved. The history can be compared with the current version.
https://marketplace.visualstudio.com/items?itemName=lostalloy.LocalHistory-for-Visual-Studio
17 stars 5 forks source link

Addon crashes Visual Studio if there are no/wrong diff when trying to show diff #12

Open SylwesterZarebski opened 5 years ago

SylwesterZarebski commented 5 years ago

Problem

Addon crashes VS if there are no or is wrong diff (in addon window) when trying to show diff by using double click.

How to reproduce

Remove backup file from directory and try to show diff to that backup. It crashes VS.

Fix

Try to check if there is proper backup file to open diff. Maybe even force refresh list if there is no file to open.

Notes

Above method is simple way to reproduce problem, but real problem is way deeper, because sometimes list of diff entries would goes off from real backup files and using double click on wrong entry will crash VS. Clicking another file and then click back to desired one (refresh list) and then using diff works as workaround, but it is tedious to do this everytime and i often forgot to do a refresh and then... bang...

Software

Visual Studio 2017 15.9.11

SugoiDev commented 5 years ago

Oh, that's a nasty one.

Thanks for the detailed report. I'll try to take a look as soon as I have some time.