Bug 32060

Summary: Internal compiler error
Product: [Mono] Compilers Reporter: 999komi
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: lluis, mono-bugs+monodevelop, mono-bugs+mono, udhams
Priority: Normal    
Version: 4.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: full project

Description 999komi 2015-07-17 05:08:42 UTC
Created attachment 12084 [details]
full project

Using Xamarin Studio 5.9.4 (Build 5)

Try to compile the following:

    public static void Query() {
      string[] fullNames = { "Anne Williams", "John Fred Smith", "Sue Green" };
      var query =
        from fullName in fullNames
        from name in fullName.Split()
        select fullName + " came from " + fullName;
      foreach(string s in query) {
        Console.WriteLine(s);
      }
    }

See the following error on the commented line:

/Users/william/Documents/Suteki.Monads/src/Runner/Main.cs(9,9): Error CS0584: Internal compiler error: Object reference not set to an instance of an object (CS0584) (Runner)

Attached is the full project, which is mostly someone's github code.  The project compiled fine without the added code.

Interestingly, when I added the same code to my main project, it compiled just fine.


********

Xamarin Studio
Version 5.9.4 (build 5)
Installation UUID: 1dd5db97-784b-4843-801f-4bc24f04b28d
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

Apple Developer Tools
Xcode 6.3 (7569)
Build 6D570

Xamarin.Mac
Not Installed

Xamarin.iOS
Version: 8.10.3.2 (Starter Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

Xamarin.Android
Version: 5.1.4.16 (Business Edition)
Android SDK: /Users/william/Library/Developer/Xamarin/android-sdk-mac_x86
	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.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Xamarin Android Player
Not Installed

Build Information
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

Operating System
Mac OS X 10.10.3
Darwin WJ-macbook.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Udham Singh 2015-07-17 14:13:35 UTC
I have checked this issue with the help of sample app attached in bug description and able to reproduce the reported behaviour. Please refer the screencast : http://www.screencast.com/t/nEm0RTwRX39

Build Output : https://gist.github.com/Udham1/757410b03e73e8f8fb1e
Ide Log : https://gist.github.com/Udham1/a7cb0c1a801192079ada

Environment Info :

=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.3.2 (Enterprise Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Xamarin.Android ===

Version: 5.1.4.16 (Enterprise Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	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: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.2.89 (Enterprise Edition)

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Marek Safar 2015-07-24 11:30:32 UTC
Fixed in master and Mono 4.2