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

System.NullReferenceException when trying to push #3862

Closed
AliMirlou opened this issue Jul 19, 2017 · 24 comments
Closed

System.NullReferenceException when trying to push #3862

AliMirlou opened this issue Jul 19, 2017 · 24 comments

Comments

@AliMirlou
Copy link

Happens when trying to push, no matter how (Choosing push from Commands or toolbar, using push hotkey (ctrl+up), "Commit and Push" in commit window). Giving me "System.NullReferenceException: Object reference not set to an instance of an object." on "Void UpdateRemoteBranchDropDown() @ GitUI.CommandsDialogs.FormPush" by opening a crash report window.

The problem started after installing GitExtensions 2.50.01 (Git 2.10.0, Windows 10 version 1703 build 15063.483).
Redownloaded and reinstalled but no luck.

There are many graphical bugs too, some related to being incompatible with 4k resolution, which i don't know if i have to open issues for them or not.

@RussKie
Copy link
Member

RussKie commented Jul 19, 2017

Please raise all issues you have. If we don't know them - we can't fix them.

@AliMirlou
Copy link
Author

@RussKie They're hard to explain but i will definitely. But for now, this bug has higher priority for me. Any ideas?

@RussKie
Copy link
Member

RussKie commented Jul 19, 2017

As an immediate work around - please try installing 2.49.x version and see if it works for you.

@RussKie
Copy link
Member

RussKie commented Jul 19, 2017

Can you successfully perform other operations - e.g. pull, fetch, checkout?
Can you please provide more info on your issue? E.g. the full stack trace, any screenshots.

@AliMirlou
Copy link
Author

@RussKie previous versions work well. And as far as i tested, Yes, other operations work and the problem seems to be only related to push dialog window. Here's a screenshot but i'm not sure if it helps:
1
I'm not really familiar with the debugging tools to provide you with more info, is there a document for it?

@vbjay
Copy link
Contributor

vbjay commented Jul 19, 2017 via email

@AliMirlou
Copy link
Author

AliMirlou commented Jul 19, 2017

@vbjay Unfortunately, this is where one of the graphical bugs are:

1

@vbjay
Copy link
Contributor

vbjay commented Jul 19, 2017 via email

@EbenZhang
Copy link
Contributor

do you have at least one remote? just fixed a NPE in this function few days ago.

@AliMirlou
Copy link
Author

@EbenZhang Yes, I have remotes. When will this fix be added to the builds?

@dogancelik
Copy link
Contributor

Same problem, happened when I init'ed a new fresh repo, staged and commited files, click Push button then NPE error. Version: 2.50.01

@vbjay
Copy link
Contributor

vbjay commented Jul 26, 2017 via email

@RussKie
Copy link
Member

RussKie commented Jul 26, 2017

@dogancelik have you set at least one remote before pushing?
it is unclear from your description whether you have done or missed this step.

@dogancelik
Copy link
Contributor

dogancelik commented Jul 26, 2017

I was in a hurry so I didn't explain it well.
This error occurs in 2.50.00 and 2.50.01:

Before 2.50

  1. I open an empty folder with GitExtensions browse folder-path
  2. I click "Initialize repository"
  3. I stage a single text file and commit with "Initial"
  4. I click "Push", dialog opens

24903

After 2.50

  1. I open an empty folder with GitExtensions browse folder-path
  2. I click "Initialize repository"
  3. I stage a single text file and commit with "Initial"
  4. I click "Push", exception error

25001

You don't even need Step 3.
In 2.49.03, it works whether you commit a file or not.
I didn't find the need to explain the issue as issue author already explained it.

The error occurs because there is no remote.

@RussKie
Copy link
Member

RussKie commented Jul 26, 2017 via email

@RussKie
Copy link
Member

RussKie commented Jul 26, 2017

This issue was fixed by @EbenZhang in 11d2763
However it is yet to be published

@maxim-grinchenko
Copy link

I have the same problem... http://take.ms/yq7Eg

@vbjay
Copy link
Contributor

vbjay commented Aug 1, 2017 via email

@RussKie
Copy link
Member

RussKie commented Aug 10, 2017

I'm closing this.
Please re-open if the issue re-occurs in 2.50.02 (once it is released)

@RussKie RussKie closed this as completed Aug 10, 2017
@Crowley2012
Copy link

I cloned the current branch and the issue is still there for me.

@RussKie RussKie reopened this Aug 18, 2017
@RussKie
Copy link
Member

RussKie commented Aug 18, 2017

the current 2.50 branch or the master?

I just tried it built from both the master and origin/release/2.50 branches and observed no issues
image

@Crowley2012
Copy link

The master branch, the push menu opens but when I actually try to push to a remote server it crashes.

@RussKie RussKie self-assigned this Aug 23, 2017
RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 25, 2017
An attempt to push when no remote defined would result in NRE.
Check for remotes before pushing.
If no remotes available, show an error message and a prompt to
configure remotes.

Fixes gitextensions#3862.
RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 25, 2017
An attempt to push when no remote defined would result in NRE.
Check for remotes before pushing.
If no remotes available, show an error message and a prompt to
configure remotes.

Fixes gitextensions#3862.
RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 26, 2017
An attempt to push when no remote defined would result in NRE.
Check for remotes before pushing.
If no remotes available, show an error message and a prompt to
configure remotes.

Fixes gitextensions#3862.
RussKie added a commit that referenced this issue Aug 26, 2017
An attempt to push when no remote defined would result in NRE.
Check for remotes before pushing.
If no remotes available, show an error message and a prompt to
configure remotes.

Fixes #3862.

(cherry picked from commit d52d9fd)
@nforss
Copy link

nforss commented Nov 2, 2018

I'm running into a similar problem, too. It was proceeded by Git Extensions becoming completely unresponsive, and the only way I could get it shut down was a reboot. Task manager -> End task or even command line (as admin) taskkill /F didn't do a thing.

After the reboot I get NullReferences whenever I try to pull from or push to origin. Below is the resulting error message. I can get the pull and push to go through by manually inputing my username and password, but the problem persists between pushes and pulls.

"C:\Program Files\Git\bin\git.exe" push --recurse-submodules=check --progress "origin" refs/heads/develop:refs/heads/develop
fatal: NullReferenceException encountered.
   Object reference not set to an instance of an object.
Username for 'https://myazureaccount.visualstudio.com': >> manual input >> myusername@mydomain.com
fatal: NullReferenceException encountered.
   Object reference not set to an instance of an object.
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 607 bytes | 607.00 KiB/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Analyzing objects... (7/7) (1901 ms)
remote: Storing packfile... done (36 ms)
remote: Storing index... done (34 ms)
To https://myazureaccount.visualstudio.com/DefaultCollection/MyProject/_git/MyProject
   8969ab204..bd56127f9  develop -> develop
Done

Press Enter or Esc to close console...

@nforss
Copy link

nforss commented Nov 2, 2018

Nevermind, it seems the problem is with Git itself, and not with Git Extensions. The same problem arises when using Git from the command line. Thought the original problem of GE freezing up was definitely a problem with GE. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants