Bug 21308 - If the system date is not US regional (mm/dd/yyyy), Xamarin crashes if a project is linked to GitHub
Summary: If the system date is not US regional (mm/dd/yyyy), Xamarin crashes if a proj...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 5.1
Hardware: PC Windows
: --- normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2014-07-14 11:57 UTC by Riccardo Moschetti
Modified: 2015-08-20 03:23 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
the regional settings which break Xamarin (16.54 KB, image/png)
2014-07-14 11:57 UTC, Riccardo Moschetti
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Riccardo Moschetti 2014-07-14 11:57:32 UTC
Created attachment 7358 [details]
the regional settings which break Xamarin

Hi,

If we link a project to GitHub and the system date is in European format (dd/mm/yyyy), clicking on the "Version Control" menu gives an error and Xamarin Studio closes.

To reproduce the error:
- change regional date settings to European country (in our case, Italy)
- open Xamarin Studio 5.1.2 on Windows 8
- open a solution which is linked to GitHub (we have no git "on premise" but I wonder if it is broken as well)
- click on "version control"
 
you get the error:

System.FormatException: String was not recognized as a valid DateTime.
   at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles, TimeSpan& offset)
   at System.DateTimeOffset.Parse(String input, IFormatProvider formatProvider, DateTimeStyles styles)
   at System.DateTimeOffset.Parse(String input, IFormatProvider formatProvider)
   at MonoDevelop.VersionControl.Git.Stash.Parse(String line)
   at MonoDevelop.VersionControl.Git.StashCollection.ReadStashes()
   at MonoDevelop.VersionControl.Git.StashCollection.GetEnumerator()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at MonoDevelop.VersionControl.Git.StashPopHandler.Update(CommandInfo info)
   at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate(CommandInfo info)
   at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo(ActionCommand cmd, CommandInfo info)
   at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo(Object commandId, CommandTargetRoute targetRoute)
Comment 1 Marius Ungureanu 2014-07-18 10:15:29 UTC
This works on the libgit2sharp switch. Marking as resolved for that branch.
Comment 2 Riccardo Moschetti 2014-09-24 08:07:34 UTC
Hi, still doesn't work with Xamarin 5.4

This are the steps:

1. Windows 8 regional settings has date dd/mm/YYYY
2. link solution to GitHub account
3. close XStudio
4. open XStudion and solution
5. click on "version control"
6. crash
Comment 3 Lluis Sanchez 2014-09-24 11:43:38 UTC
The fix will be included in Xamarin Studio 5.7.
Comment 4 Prashant manu 2015-02-10 07:36:17 UTC
Checked and now if system date is in European format
(dd/mm/yyyy), clicking on the "Version Control" menu doesn't gives an error.
Screencast: http://screencast.com/t/GdKDnFFE8p

Environment Info:
Xamarin Studio
Version 5.8 (build 773)
Installation UUID: a11fadb0-d7b1-4e4b-b5dd-787b243e880f
Runtime:
	Microsoft .NET 4.0.30319.0
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

Xamarin.Android
Version: 5.0.99 (Business Edition)
Android SDK: E:\android-sdk
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: C:\Program Files\Java\jdk1.7.0_67
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Xamarin Android Player
Version: 0.1.1
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

Build Information
Release ID: 508000773
Git revision: c6d7b708c3a95422b18c70bb577b341263a8dbc4
Build date: 2015-02-06 12:52:46-05
Xamarin addins: b07b8bdbf63714c74551c4612ce6f70c8412c8bd

Operating System
Windows 6.1.7601.65536 (64-bit)