-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
System.Exception opening an existing repository #6093
Comments
… On Fri, Jan 11, 2019, 10:17 AM fabvit ***@***.***> wrote:
Current behaviour
1. Open one specific local repositories
after the repository is opened I got a System exception:
Unable to parse git command output.
System.Collections.Generic.IReadOnlyList1[GitCommands.Remote]
<GetRemotes>g__ParseRemotes|154_0(System.Collections.Generic.IEnumerable1[System.String])
@ GitCommands.GitModule
GitExtensions.exe [3.00.00.4433]
3.00.rc2
4.0.30319.42000
(Please note that this is specific to *this* repo, other repos are
opening fine.
Expected behaviour
No exceptions opening a repo.
Steps to reproduce Screenshots Did this work in previous version of
GitExtensions
Yes it works fine in GitExtensions-2.51.05
Environment
-
GitExtensions version: GitExtensions-3.00.00.4433
-
GIT version: $ git --version
git version 2.20.1.windows.1
-
OS version: Windows 7 Pro 64 bit
-
.NET version: 4.0.30319.42000
Diagnostics
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6093>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ADdhsaUDg3myWw_i3CqmpHLN3qRREF3Xks5vCKsegaJpZM4Z7pYM>
.
|
Please include the complete stacktrace from NBug. I believe @vbjay reacted on that NBug said 3.00.rc2. That may be incorrectly set there if so, for someone to follow up. |
Oh right. That issue has been fixed. |
@gerhardol and @vbjay yes I am on the very last version (https://github.com/gitextensions/gitextensions/releases/latest), namely Version 3.00.00 released on Dec 7, 2018. @vbjay at this point I confused: what issue was been fixed?
OR
Yes I can continue after dismissing the dialog and hiding the left panel. Unfortunately I cannot share the repo. |
Yes. the wrong NBug: 3.00.rc2 text |
The complete stacktrace is needed I am not aware that this is reported before (but there are related corrections fixed in the upcoming 3.0.1 How many remotes do you have? |
Looks like it must be failing in GitModule.GetRemotes here: if (!fetchMatch.Success || !pushMatch.Success || fetchMatch.Groups["direction"].Value != "fetch" || pushMatch.Groups["direction"].Value != "push")
{
throw new Exception("Unable to parse git command output.");
} This code expects to match this regex on the result of 'git remote -v': private static readonly Regex _remoteVerboseLineRegex = new Regex(@"^(?<name>[^ ]+)\t(?<url>.+?) \((?<direction>fetch|push)\)$", RegexOptions.Compiled); @fabvit could you also share the result of running |
@amaiorano , thank to your hint I found the cause of my issue.:
I then removed the [remote "all"] section, and magically the exception disappeared. So I turned on left panel, done a refresh and the exception neve happened again. P.S. The [remote "gitlab"] was put in the config as a way to perform a single command push instead of three separate pushes to:
|
@gerhardol finnally I figured how to obtain the stack trace:
|
Should we swallow the exception and ignore the error? Warn the the user of
a problem?
…On Sun, Jan 13, 2019, 8:52 PM fabvit ***@***.*** wrote:
@gerhardol <https://github.com/gerhardol> finnally I figured how to
obtain the stack trace:
at GitCommands.GitModule.g__ParseRemotes|154_0(IEnumerable`1 lines)
at GitCommands.GitModule.GetRemotes()
at GitUI.BranchTreePanel.RepoObjectsTree.RemoteBranchTree.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at GitUI.BranchTreePanel.RepoObjectsTree.Tree.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at GitUI.BranchTreePanel.RepoObjectsTree.d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at GitUI.BranchTreePanel.RepoObjectsTree.d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at GitUI.ThreadHelper.<>c__DisplayClass13_0.<b__0>d.MoveNext()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6093 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEMyXp0tAKaxz1RhiA-Pyzih7Rr680LEks5vCwHRgaJpZM4Z7pYM>
.
|
I'm not sure I understood the problem, exactly. Was it that there were two remotes pointing to the same thing? |
Duplicate of #5943 - closed though Suggest this is handled as a bug:
Enhancement: Handle multiple (auto name, activate/deactivate must be handled) |
Reopening since this would be good to fix |
Crash on startup.
|
I see this error with the following environment
This happens when my repo has submodules (which have remotes) but it doesn't have a remote itself. |
Show your git config showing the remotes.
…On Fri, Mar 8, 2019, 3:08 AM escherstair ***@***.***> wrote:
I see this error with the following environment
- Git Extensions 3.0.2.5232
- Build 23b6f51
<23b6f51>
- Git 2.21.0.windows.1
- Microsoft Windows NT 6.1.7601 Service Pack 1
- .NET Framework 4.7.3130.0
- DPI 96dpi (no scaling)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6093 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADdhsQZjR7SAkgg8-L9_8o4CcockuWyhks5vUhqYgaJpZM4Z7pYM>
.
|
Is this a question? |
Open a repo that exhibits this error. In console run
git config --list
…On Fri, Mar 8, 2019, 8:33 AM escherstair ***@***.***> wrote:
Is this a question?
Which git config?
Either the one of the main repo (but it doesn't have remote when the issue
happens), or those of submodules?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6093 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADdhsYGLQf7CevlIHdS2laXqOTjURbHKks5vUmargaJpZM4Z7pYM>
.
|
In the meanwhile I fixed the error (adding the remote). |
origin |
I don't know how much helps but i bisected this issue for for my case at least to this commit c9e47e4 from pull request #5669. I have the same problem as closed as duplicate issue and i have "Open with last working directory" off. Also this is the call stack that starting the task thats calling GitModule.GetRemotes
|
@fsfod Thank you for that, it's actually very helpful. I was able to reproduce this quite easily by just setting the working directory to a non-git directory, and launching our latest build in Debug. The problem is that There are a couple of possible fixes:
Personally, I would prefer the first option. I'll take a stab at that. |
Please check out the fix in PR: #6390 |
It fixed the issue but it looks like opening and closing the settings dialogue when no repo is open at the dashboard has the same issue of trying access non existent repository. |
Hmm, I'll take a look. In fact, my change is making one of our tests fail, and I'm still considering the right way to approach this. |
I pushed more fixes. It's working now even with open then close of Settings on a non-repo. |
@RussKie, why did you reopen this issue a month ago? |
I can't recall. |
This is still not fixed |
Yep, not fixed. I'm now hitting it just by launching Git Extensions after upgrading to the latest version. All was fine before upgrading. Now launch the application and identical to 6562/6563. |
Could you please share the results of `git remote -v`
…On Wed, May 15, 2019, 11:37 AM ojchase ***@***.***> wrote:
Yep, not fixed. I'm now hitting it just by launching Git Extensions after
upgrading to the latest version. All was fine before upgrading. Now launch
the application and identical to 6562/6563.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#6093?email_source=notifications&email_token=ABBTEXS5AEZ6WU6EL6NYBCLPVNSPLA5CNFSM4GPOSYGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNIGRA#issuecomment-492471108>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBTEXSQC7CMAOUKCW4PTODPVNSPLANCNFSM4GPOSYGA>
.
|
Not a lot of point as I'm not in a repository. The only difference between me and ideaalab on 3/18 is that I'm not on the portable version. |
I can confirm that bug exists in 3.1. Prior to that hiding left panel prevents from throwing exception, but in 3.1 this workaround don't work and exception is raised every time I open affected repository even if left panel is hidden. Current behaviourException is thrown when opening repository which has remote repository with more than one push url. Expected behaviourException should not be thrown. Steps to reproduce
Error Details
Environment
|
Fixed in #6580 |
Current behaviour
after the repository is opened I got a System exception:
Application: GitExtensions.exe [3.00.00.4433]
NBug: 3.00.rc2
CLR: 4.0.30319.42000
Please note that thes exception happens only when the left panel (the one enumerating branches and remotes) is visible.
If I hide the the left panel, no exception arises.
Expected behaviour
No exceptions opening a repo.
Steps to reproduce
See Current behaviour section above
Screenshots
Did this work in previous version of GitExtensions
Yes it works fine in GitExtensions-2.51.05
Environment
GitExtensions version: GitExtensions-3.00.00.4433
GIT version: $ git --version
git version 2.20.1.windows.1
OS version: Windows 7 Pro 64 bit
.NET version: 4.0.30319.42000
Diagnostics
The text was updated successfully, but these errors were encountered: