Skip to content
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

[NBug] Erreur lors de la lecture du répertoire I:\gitLabCloud\clara\. #6812

Closed
totocaca123 opened this issue Jun 17, 2019 · 5 comments · Fixed by #6834

Comments

@totocaca123
Copy link

commented Jun 17, 2019

Current behaviour

application crashes

Expected behaviour

git project is expected to be closed

Steps to reproduce

Open a git project located in an external hard drive. Disconnect external hard drive and this error will occur

Error Details

System.IO.FileNotFoundException: Erreur lors de la lecture du répertoire I:\gitLabCloud\clara\.
   à System.IO.FileSystemWatcher.StartRaisingEvents()
   à GitUI.CommandsDialogs.BrowseDialog.GitStatusMonitor.Update()
   à System.Windows.Forms.Timer.OnTick(EventArgs e)
   à System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Additional information

external hard drive disconnected

Environment

  • Git Extensions 3.1.1.6049
  • Build 2f87210
  • Git 2.22.0.windows.1
  • Microsoft Windows NT 10.0.17763.0
  • .NET Framework 4.8.3801.0
  • DPI 96dpi (no scaling)
@archivarius-bot

This comment has been minimized.

Copy link

commented Jun 17, 2019

Thank you for the bug report 👍

Sadly, it appears some important information is still missing, which you may have overlooked while submitting the bug.
Without this information we may not be able to assist you in resolving the issue.

Please review your submission, fill the missing information in and post a new comment to ping us back to re-open the issue.
Thanks again

@archivarius-bot archivarius-bot bot closed this Jun 17, 2019
@gerhardol

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

First reported in #6676 but this contains some info

@RussKie

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

@gerhardol is there something we can do to prevent/reduce these bugs?

@gerhardol

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

is there something we can do to prevent/reduce these bugs?

Yes, GE should not crash if the path is no longer available in background oerations. try-catch if there are no other solution.
(maybe similar for background fetch plugin)

@gerhardol

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

https://github.com/gitextensions/gitextensions/blob/master/GitUI/CommandsDialogs/BrowseDialog/GitStatusMonitor.cs#L325

            // Check that the directory is still valid, otherwise will an exception be raised
            if (!Directory.Exists(_workTreeWatcher.Path))
            {
                return;
            }

            _workTreeWatcher.EnableRaisingEvents = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.