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

Git Extension crashes when trying to access settings page in Ubuntu 16.04 #5187

Closed
vraghav1 opened this issue Jul 22, 2018 · 23 comments
Closed

Comments

@vraghav1
Copy link

vraghav1 commented Jul 22, 2018

Do you want to request a feature or report a bug? Bug

What is the current behavior?
Crash of GitExt when trying access the settings or Tools page.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Use Git extension on a repo with a large history. Opening Settings page cause Git extensions to crash.

System.ArgumentNullException: Value cannot be null.
Parameter name: path1
  at System.IO.Path.Combine (System.String path1, System.String path2, System.String path3) [0x00003] in <65984520577646ec9044386ec4a7b3dd>:0
  at GitUI.CommandsDialogs.SettingsDialog.MergeToolsHelper.CheckFileExists (System.String path, System.String location, System.String fileName, System.String& fullName) [0x00000] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.MergeToolsHelper.FindFileInFolders (System.String fileName, System.String[] locations) [0x00033] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.Pages.EditorHelper.GetEditorCommandLine (System.String editorName, System.String executableName, System.String commandLineParameter, System.String[] installFolders) [0x00000] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.Pages.EditorHelper.GetNotepadPP () [0x00000] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.Pages.EditorHelper.GetEditors () [0x0001c] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.Pages.GitConfigSettingsPage.Init (GitUI.CommandsDialogs.SettingsDialog.ISettingsPageHost aPageHost) [0x00023] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.SettingsDialog.SettingsPageBase.Create[T] (GitUI.CommandsDialogs.SettingsDialog.ISettingsPageHost aPageHost) [0x00005] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.FormSettings..ctor (GitUI.GitUICommands aCommands, GitUI.CommandsDialogs.SettingsDialog.SettingsPageReference initalPage) [0x00158] in <879b25d354464ad887f8e4b3f7531c19>:0
  at (wrapper remoting-invoke-with-check) GitUI.CommandsDialogs.FormSettings..ctor(GitUI.GitUICommands,GitUI.CommandsDialogs.SettingsDialog.SettingsPageReference)
  at GitUI.CommandsDialogs.FormSettings.ShowSettingsDialog (GitUI.GitUICommands uiCommands, System.Windows.Forms.IWin32Window owner, GitUI.CommandsDialogs.SettingsDialog.SettingsPageReference initalPage) [0x00021] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.GitUICommands+<>c__DisplayClass392_0.<StartSettingsDialog>b__0 () [0x00000] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.GitUICommands.DoActionOnRepo (System.Windows.Forms.IWin32Window owner, System.Boolean requiresValidWorkingDir, System.Boolean changesRepo, GitUIPluginInterfaces.GitUIEventHandler preEvent, GitUIPluginInterfaces.GitUIPostActionEventHandler postEvent, System.Func`1[TResult] action) [0x0002d] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.GitUICommands.StartSettingsDialog (System.Windows.Forms.IWin32Window owner, GitUI.CommandsDialogs.SettingsDialog.SettingsPageReference initialPage) [0x00028] in <879b25d354464ad887f8e4b3f7531c19>:0
  at GitUI.CommandsDialogs.FormBrowse.SettingsClick (System.Object sender, System.EventArgs e) [0x0000b] in <879b25d354464ad887f8e4b3f7531c19>:0
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00019] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.ToolStripButton.OnClick (System.EventArgs e) [0x00017] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.ToolStripItem.HandleClick (System.Int32 mouse_clicks, System.EventArgs e) [0x00029] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, System.Windows.Forms.ToolStripItemEventType met) [0x00054] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
  at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) [0x00048] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00078] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001b4] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) [0x00000] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at GitUI.ToolStripEx.WndProc (System.Windows.Forms.Message& m) [0x00000] in <879b25d354464ad887f8e4b3f7531c19>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <5bcdf2a3746f4353acffcd001a2c6899>:0
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in <5bcdf2a3746f4353acffcd001a2c6899>:0

What is the expected behavior?
Settings page should show up as expected.

Environment you encounter the issue:

  • GitExtensions version: GitExtensions-2.51.04-Mono
  • GIT version: git version 2.7.4
  • OS version: Ubuntu 16.04
  • .NET version:
  • Mono version: Mono JIT compiler version 5.10.1.20 (tarball Thu Mar 29 10:48:35 UTC 2018)

Did this work in previous version of GitExtensions (which)?

@gerhardol gerhardol added the area: linux/mono Linux / Mono specific label Jul 22, 2018
@RussKie
Copy link
Member

RussKie commented Jul 22, 2018

What is your merge/diff tool configuration?
Looking at the stacktrace it gets unhinged on Notepad++ settings...

@RussKie RussKie added this to the 2.51.05 milestone Jul 22, 2018
@IlyaMokin
Copy link

IlyaMokin commented Jul 23, 2018

The same for me under ubuntu 18. Maybe you can say me where I can check the settings manually?

What is your merge/diff tool configuration?

it was kdiff3 before update.

Can be related to the changes I guess, FindFileInFolders method
cf8ef61

@RussKie
Copy link
Member

RussKie commented Jul 23, 2018

The git settings are in .gitconfig file. I hardly ever use non-Windows distros, so I'm a bit sketchy where that file is, try ~/.gitconfig.
The app's settings are persisted in GitExtensions.settings file. I don't know where it lives on Linux, so you may need to search for it.

Have you looked at https://github.com/gitextensions/gitextensions/wiki/How-To:-run-Git-Extensions-on-Linux?

@IlyaMokin
Copy link

Yes, thanks! I've already found that and tried to reset the setting(removed the folder), but it didn't help.
GitExtensions works fine but settings is not available. There is the same error

@RussKie
Copy link
Member

RussKie commented Jul 23, 2018

I'll try to carve some time in coming days to run it on an Ubuntu instance

@remcoros
Copy link

remcoros commented Jul 23, 2018

git config --list --global

Check if you see any windows specific tool or value in 'diff.tool / merge.tool' related settings. You should be able to clear or set them using for example:

git config --global diff.tool vimdiff

@vbjay
Copy link
Contributor

vbjay commented Jul 23, 2018 via email

IlyaMokin pushed a commit to IlyaMokin/gitextensions that referenced this issue Jul 23, 2018
@vraghav1
Copy link
Author

My current Git config settings are as follows

[merge]
tool = kdiff3
[diff]
guitool = kdiff3
[difftool "kdiff3"]
path = /usr/bin/kdiff3
[core]
autocrlf = input
[gui]
editor = code

@vraghav1
Copy link
Author

Setting it to a different diff tool using "git config --global diff.tool vimdiff" did not help.

I have no Windows specific tools installed. This used to work for me as I recall seeing the Settings page before. But with GitExt v 2.51.0XX it has been failing... I'll try an older version

The bigger problem I was trying to address is, to reach the settings page and limit history to the last 1000 entries. This was to prevent the UI hang issue after doing actions such as Push/Pull/commit and so on.

@vraghav1
Copy link
Author

vraghav1 commented Jul 23, 2018

I see, in my Git config, chosen editor is 'code' --> "Microsoft Visual studio Code". I'll change it and see what happens

Tried this, changed default editor to gedit. It did not work. :(

@vraghav1
Copy link
Author

Downgraded to GitExtensions-2.51-Mono, released in Jan/2018. And Settings menu works!! So there has been some regression in the latest revisions.

@vraghav1
Copy link
Author

vraghav1 commented Jul 23, 2018

"The bigger problem I was trying to address is, to reach the settings page and limit history to the last 1000 entries. This was to prevent the UI hang issue after doing actions such as Push/Pull/commit and so on. "

After downgrading to GitExt v2.51, I was able to access Settings. I was then able to edit "Limit number of commits that will be loaded at startup" to 1000 from the default 100000. Using this workaround I was able to resolve the UI performance and hang issue.

I would recommend keeping the default to 1000 rather than 100000 in future releases

@gerhardol
Copy link
Member

@IlyaMokin
If #5187 fix addresses the problem, setting env var ProgramFiles and ProgramFiles(x86) should work too.

@RussKie
Copy link
Member

RussKie commented Jul 23, 2018

I would recommend keeping the default to 1000 rather than 100000 in future releases

We can't because of #5114.

Personally I haven't experienced any problems on Windows even with large repos.
On Ubuntu I had intermittent issues, often because it would run out of available handles. #3287 has some more info.

IlyaMokin pushed a commit to IlyaMokin/gitextensions that referenced this issue Jul 23, 2018
# Conflicts:
#	GitUI/CommandsDialogs/SettingsDialog/MergeToolsHelper.cs
RussKie added a commit that referenced this issue Jul 24, 2018
fix for #5187: can't open settings (master branch)
@RussKie
Copy link
Member

RussKie commented Jul 24, 2018

Please try this build https://ci.appveyor.com/api/buildjobs/3uipbijngkiq6uwg/artifacts/GitExtensions-2.51.04.3018-Mono.zip

@RussKie RussKie closed this as completed Jul 24, 2018
@dictoon
Copy link

dictoon commented Jul 25, 2018

Thanks @RussKie, I had the same crash as the original poster and your build fixed it.

@fahdovski003
Copy link

I downgraded to version GitExtensions-2.51.01-Mono.zip which is working fine.
All the version above that will have the bug.

I have Mono JIT compiler version 5.12.0.301 on Ubuntu 18.04.1 LTS.

@RussKie
Copy link
Member

RussKie commented Aug 19, 2018

I have an instance of Ubuntu 17.04 and Mono 5.2.0 and I can't repro the issue...

@RussKie
Copy link
Member

RussKie commented Aug 19, 2018

@fahdovski003 have you tried the build above?

@syanush
Copy link

syanush commented Aug 19, 2018

New build solves the issue for me (Ubuntu 18.04.01 x64)

@fahdovski003
Copy link

@RussKie I only use released versions

RussKie added a commit that referenced this issue Aug 25, 2018
issue #5187 crash opening settings page in Ubuntu 18
@gitfineon
Copy link

Thank you @RussKie for this reference, did not search for closed issues. Do you backport this "breaking issue" or when do you expect 2.51.05 gets released?

@RussKie
Copy link
Member

RussKie commented Aug 27, 2018

I've been meaning to publish 05 version last week but have been very busy.
I'll try to do it over the coming weekend. Sorry for the delay

l-inc pushed a commit to l-inc/gitextensions that referenced this issue Jan 30, 2019
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

10 participants