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

GitCommands.Settings#GetGitExtensionsDirectory: Crash if fileName.LastIndexOfAny returns -1 #1790

Closed
pcworld opened this issue Apr 7, 2013 · 8 comments

Comments

@pcworld
Copy link

pcworld commented Apr 7, 2013

Application crashes when GitCommands.Settings#GetGitExtensionsDirectory is called and fileName.LastIndexOfAny returns -1.

Can Assembly.GetAssembly(typeof(Settings)).Location be replaced by something else?
I'm currently trying to turn GitExt into a .NET-independent executable with mkbundle, works pretty well so far (with some workarounds) and the resulting binaries are only of a few MB in size, no .NET or full Mono needed to run it, as the necessary Mono libraries are bundled with the executable.
But when trying to open the settings dialog, GitExt crashes. Will have to debug later, but I guess Assembly.GetAssembly(typeof(Settings)).Location is an empty string or something.

jbialobr added a commit that referenced this issue Apr 11, 2013
@jbialobr
Copy link
Member

Can you try to build it from branch jb/1790?

jbialobr added a commit that referenced this issue Apr 12, 2013
@pcworld
Copy link
Author

pcworld commented Apr 14, 2013

Cherry-picked 79cb936, fixed the problem. Thanks

@pcworld pcworld closed this as completed Apr 14, 2013
@jbialobr
Copy link
Member

I am curious how it will work on wine. Could you share somewhere exe?

@pcworld
Copy link
Author

pcworld commented Apr 14, 2013

This is 2.44 with 5387b6a and 79cb936 applied, compiled with Xamarin Studio (except for a few DLLs that were taken from the 2.44 release zip and the Mono directory): gitext_standalone.7z (sha256: 1d24105864a83282e66c220dfd98f77db8f267557539a0049ca75db841bc76c1)
If the commit summary should stay empty when launching aaa_gitext.exe, you need to add one of the I18N* DLLs from Mono-3.0.6\lib\mono\4.5 to the extracted directory.

Note that mkbundle also works on Linux/OS X, so one should be able to create native binaries for these OSs as well, so wine shouldn't be necessary.

@KindDragon
Copy link
Contributor

Every new window crash for me this GitEx

@pcworld
Copy link
Author

pcworld commented Apr 14, 2013

@KindDragon:

Every new window crash for me this GitEx

You mean the binaries I posted above? And you tried them on Windows?
If so, when you select a commit, does it show the commit summary at the bottom? If not, you probably need some I18N DLL from Mono-3.0.6\lib\mono\4.5 because of your locale.
(If you don't have Mono, here's the missing I18N DLLs (sha256: a5c4c39bb007a97fbc776876a342f761d4c1709517be46f43c58f639a86b044c), extract it to the folder where the GitExt standalone exe is.)

@KindDragon
Copy link
Contributor

You mean the binaries I posted above? And you tried them on Windows?

Yes

If not, you probably need some I18N DLL from Mono-3.0.6\lib\mono\4.5 because of your locale.

This doesn't help, also gravatar image is corrupted.

temp

@KindDragon
Copy link
Contributor

This is just for informations.

fraga added a commit to fraga/gitextensions that referenced this issue Apr 15, 2013
…BuildServerIntegration

* pbombeiro/BuildServerIntegration: (32 commits)
  Make settings thread safe.
  async is a keyword.
  Fix compare.
  We already know it matched so no need to check the string.
  Check for later version updates only.
  Fixed submodule status on diff tab
  Make Settings.cs changes compatible with 45600a8.
  Update checked property when menu is shown.  This allows the item to be refreshed between instances.
  Submodule GitExtensionsDoc updated
  Fix for gitextensions#1790.
  Fix key already exists bug.
  Removed SafeGet/SafeSet methods
  First step to remove SafeGet/SafeSet methods
  Fix bug where settings were not being retrieved again if file was modified.
  Make it easier for user to find settings by sorting keys.
  Clean up.
  Used two dictionaries to keep encoded values seperate from decoded values.
  Add me as a coder.
  Fix null exception error.
  Make sure dictionary is locked wherever a value is being set.
  ...
PKRoma pushed a commit to PKRoma/gitextensions that referenced this issue Aug 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants