Bug 21857 - Xamarin Studio mysterious crash; possible race condition and/or issue with having multiple solutions open
Summary: Xamarin Studio mysterious crash; possible race condition and/or issue with ha...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 5.2
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-05 20:40 UTC by Kent Green [MSFT]
Modified: 2014-12-10 10:01 UTC (History)
4 users (show)

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


Attachments
IDE logs from around time of both crashes. (17.63 KB, application/x-zip-compressed)
2014-08-05 20:40 UTC, Kent Green [MSFT]
Details
Log files from reproducing the bug on my Win 8 machine (32.94 KB, application/x-zip-compressed)
2014-08-06 18:18 UTC, Kent Green [MSFT]
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:
RESOLVED FIXED

Description Kent Green [MSFT] 2014-08-05 20:40:37 UTC
Created attachment 7597 [details]
IDE logs from around time of both crashes.

--Overview--
While working on a customer's project, Xamarin Studio crashed on me for no apparent reason. And again when working on the same project a few minutes later after reopening it, though the 3rd try it didn't happen. 

Chris suggested it was a possible race condition; and in both cases of the crash I had two solutions open in a single instance of Xamarin Studio, to reference information from one for the other.

I'm attaching the IDE log files from the time, I'm seeing lots of weird messages but no idea what's meaningful in there.

--Build Information--
=== Xamarin Studio ===

Version 5.2 (build 386)
Installation UUID: 7d1f6346-03b4-4b5f-b01b-a16d3a1c25a0
Runtime:
	Microsoft .NET 4.0.30319.18444
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.14.0 (Business Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 502000386
Git revision: e6a54dee5376e6e7a2d9982695b060fddc09e65d
Build date: 2014-08-04 14:07:09-04
Xamarin addins: 2b5a5c26ac2ee74c6e91a8d24ef44d0ca9cb74d0

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 1 Kent Green [MSFT] 2014-08-05 20:54:35 UTC
Update: 

With 5 solutions open at the same time in one instance, I noticed some slow responsiveness in the solution pane, and *maybe* a slower deployment to the emulator, but no crash. 

I was also able to add, remove, and edit files from different solutions. The solution I successfully deployed was the default Android App template.
Comment 3 Kent Green [MSFT] 2014-08-06 18:12:25 UTC
Here is a video demo of the bug:
http://screencast.com/t/dMe6gtnR6oB

I am able to produce it using this method for the particular project, though I've added that attachment as private as it is from a customer's case in desk. 

I'm able to generate it on my Windows 7 machine with the specs above, and my Windows 8 machine with the following build information:



=== Xamarin Studio ===

Version 5.2 (build 386)
Installation UUID: 7f895f6c-3e34-4a6f-8d0d-52e727272ffd
Runtime:
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.14.0 (Business Edition)
Android SDK: C:\Users\Kent\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 502000386
Git revision: e6a54dee5376e6e7a2d9982695b060fddc09e65d
Build date: 2014-08-04 14:07:09-04
Xamarin addins: 2b5a5c26ac2ee74c6e91a8d24ef44d0ca9cb74d0

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 4 Kent Green [MSFT] 2014-08-06 18:18:17 UTC
Created attachment 7611 [details]
Log files from reproducing the bug on my Win 8 machine
Comment 5 Kent Green [MSFT] 2014-08-06 18:37:45 UTC
On both of my machines, Visual Studio 2013 is unable to open the .csproj file at all, and throws the following error: 

http://screencast.com/t/jH87SXZfl

--Error Message--

The Imported Project
"C:\%PATH%\Xamarin.Forms.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\%PATH%\TalbeViewListViewBug.csproj

--End Error Message--

(Abbreviated with %PATH%)

Following the path of the project, I am able to confirm that the file it claims doesn't exist in the screenshot is there.
Comment 7 Kent Green [MSFT] 2014-08-06 19:34:09 UTC
The .csproj file got corrupted, and that's what was causing Xamarin Studio to crash. 

The offending line was something like: 

<Import Project="..\packages\Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets" />

instead of:

<Import Project="..\packages\Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets')" />

With the Condition=Exists check truncated.
Comment 8 Udham Singh 2014-08-07 08:55:30 UTC
We have checked this issue with the sample project attached in comment 2 and observed that when we try to open App.cs then we are getting issue.

Screencast : http://www.screencast.com/t/CrtfgIAPI

Ide Log : https://gist.github.com/saurabh360/ae5831af9a57d6d7c9cd

Environment Info :

=== Xamarin Studio ===

Version 5.2 (build 386)
Installation UUID: 312d4e9a-339c-433f-a27b-88ce0777af8f
Runtime:
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.14.0 (Enterprise Edition)
Android SDK: D:\SDK\AndroidSDK
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		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)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_31
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode)

=== Build Information ===

Release ID: 502000386
Git revision: e6a54dee5376e6e7a2d9982695b060fddc09e65d
Build date: 2014-08-04 14:07:09-04
Xamarin addins: 2b5a5c26ac2ee74c6e91a8d24ef44d0ca9cb74d0

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 9 Marius Ungureanu 2014-12-10 10:01:48 UTC
With the latest XS version, I'm only getting a build error (no crash).

The build error I'm getting is the same thing that VS is showing up: "Imported project not found.".

But that's another issue. Basically, it's trying to grab the targets from "..\packages', but the actual nuget is in ".\packages". So, it can't resolve it.