Bug 19345 - A duplicate case label seems to crash the compiler
Summary: A duplicate case label seems to crash the compiler
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2014-04-28 11:57 UTC by Jessica Steger
Modified: 2014-04-29 08:03 UTC (History)
4 users (show)

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

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 GitHub or Developer Community 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 Jessica Steger 2014-04-28 11:57:10 UTC
Using Xamarin Studio 4.2.3 on OSX Mavericks a duplicate case label seems to crash the compiler. See log below. The case label was part of an enum where I had accidentally assigned the same value to two different labels.



Building: MEAT_2_0_0 (Debug)

Build started 24/04/2014 15:06:21.
__________________________________________________
Project "/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/MEAT_2_0_0.csproj" (Build target(s)):

Target _CheckProjectItems:
CheckProjectItems Task
NativeLibraries:
JavaLibraries:
JavaSourceFiles:

Target _ComputeAndroidAssetsPaths:
ResourceFiles:
Assets/Content/ninja.png
Assets/Gothic821_22px.gfnt
Assets/Gothic821_32px.gfnt
Assets/Gothic821_52px.gfnt
Assets/Gothic821_64px.gfnt
../../../multipacks/flappitybird/res/flappitybird/18px/png/arrows.png
../../../Android/FlappityBird/FlappityBirdRetail/assets/18px/flappitybird.png
../../../Android/FlappityBird/FlappityBirdRetail/assets/18px/logo.png
../../../multipacks/flappitybird/res/flappitybird/18px/png/menu_icon.png
Assets/Content/18px/menubg.jpg
Assets/Content/18px/menubg1.jpg
Assets/Content/18px/menubg2.jpg
Assets/Content/18px/options.png
Assets/Content/18px/splash_1.png
Assets/Content/18px/splash_2.jpg
Assets/MaxxiBold20px.gfnt
Assets/TeachersPetBold8px.gfnt
../../../multipacks/flappitybird/properties.txt
Assets/Content/crash.mp3
Assets/Content/flap.mp3
Assets/Content/score.mp3
Assets/Content/theme.mp3
IntermediateFiles:

Target _GenerateAndroidAssetsDir:
Skipping target "_GenerateAndroidAssetsDir" because its outputs are up-to-date.

Target _ComputeAndroidResourcePaths:
ResourceFiles:
Resources/drawable/Icon.png
Resources/drawable/Splash.png
Resources/values/Styles.xml
Resources/raw/crash.mp3
Resources/raw/score.mp3
Resources/raw/theme.mp3
Resources/raw/flap.mp3
IntermediateFiles:
Created directory "obj/Debug/res/"

Target _GenerateAndroidResourceDir:
Creating directory '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/drawable'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/drawable/Icon.png' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/drawable/icon.png'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/drawable/Splash.png' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/drawable/splash.png'
Creating directory '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/values'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/values/Styles.xml' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/values/styles.xml'
Creating directory '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/raw/crash.mp3' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/crash.mp3'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/raw/score.mp3' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/score.mp3'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/raw/theme.mp3' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/theme.mp3'
Copying file from '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Resources/raw/flap.mp3' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/flap.mp3'

Target _ResolveMonoAndroidSdks:
MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/
MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/
Android Platform API level: 8
TargetFrameworkVersion: v2.2
Android NDK: /Users/James/Library/Developer/Xamarin/android-ndk/android-ndk-r8d/
Android SDK: /Users/James/Library/Developer/Xamarin/android-sdk-mac_x86/
Android SDK Build Tools: /Users/James/Library/Developer/Xamarin/android-sdk-mac_x86/build-tools/17.0.0/
Java SDK: /usr/

Target _ValidateAndroidPackageProperties:
GetAndroidPackageName Task
ManifestFile: /Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/Properties/AndroidManifest.xml
AssemblyName: MEAT_2_0_0
PackageName: MEAT_2_0_0.MEAT_2_0_0

Target _BuildDependencies:
Resolved library outputs: 

Target _ExtractLibraryProjectImports:
Assemblies: 
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/OpenTK.dll
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/Lidgren.Network.dll
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/MonoGame.Framework.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll
Jars: 
ResolvedResourceDirectories: 
ResolvedAssetDirectories: 
ResolvedEnvironmentFiles: 

Target _GetLibraryImports:
NativeLibraries: 
Jars: 

Target _CheckDuplicateJavaLibraries:
JavaSourceFiles:
JavaLibraries:

Target _GetAdditionalResourcesFromAssemblies:
Assemblies: 
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/OpenTK.dll
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/Lidgren.Network.dll
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/MonoGame.Framework.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll

Target _UpdateAndroidResgen:
AdditionalResourceDirectories: 
AdditionalAndroidResourcePaths: 
Tool /Users/James/Library/Developer/Xamarin/android-sdk-mac_x86/build-tools/17.0.0/aapt execution started with arguments: package -f -m -M /var/folders/4r/19rcqqgx3rv33lrxscr4zvb80000gn/T/k3prq7kw.mvz/AndroidManifest.xml -J /var/folders/4r/19rcqqgx3rv33lrxscr4zvb80000gn/T/k3prq7kw.mvz --custom-package meat_2_0_0.meat_2_0_0 -F /var/folders/4r/19rcqqgx3rv33lrxscr4zvb80000gn/T/k3prq7kw.mvz/resources.apk.bk -S obj/Debug/res/ -I /Users/James/Library/Developer/Xamarin/android-sdk-mac_x86/platforms/android-8/android.jar --auto-add-overlay 
AdditionalResourceDirectories:
Resources:
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/drawable/icon.png
[drawable/Icon.png]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/drawable/splash.png
[drawable/Splash.png]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/values/styles.xml
[values/Styles.xml]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/crash.mp3
[raw/crash.mp3]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/score.mp3
[raw/score.mp3]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/theme.mp3
[raw/theme.mp3]
/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/obj/Debug/res/raw/flap.mp3
[raw/flap.mp3]
References:
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.dll
[]
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll
[]
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll
[]
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/OpenTK.dll
[]
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/Lidgren.Network.dll
[]
../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/MonoGame.Framework.dll
[]
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll
[]
- Remapping resource: Drawable.icon -> drawable/Icon
- Remapping resource: Drawable.splash -> drawable/Splash
- Remapping resource: Raw.crash -> raw/crash
- Remapping resource: Raw.flap -> raw/flap
- Remapping resource: Raw.score -> raw/score
- Remapping resource: Raw.theme -> raw/theme
- Not remapping resource: Style.Theme_Splash
RemovedDirectories: 
/var/folders/4r/19rcqqgx3rv33lrxscr4zvb80000gn/T/k3prq7kw.mvz

Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU

Target CopyFilesMarkedCopyLocal:
Copying file from '/Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/Lidgren.Network.dll' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/bin/Debug/Lidgren.Network.dll'
Copying file from '/Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/MonoGame.Framework.dll' to '/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/bin/Debug/MonoGame.Framework.dll'

Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.

Target CoreCompile:
Tool /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/smcs execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/MEAT_2_0_0.dll Activity1.cs Resources/Resource.designer.cs Properties/AssemblyInfo.cs src/DateTimeHelperClass.cs src/RectangularArrays.cs src/StringHelperClass.cs src/constants/Constants.cs ../../MEAT/MEAT/src/com/bitbull/meat/Actions.cs ../../MEAT/MEAT/src/com/bitbull/meat/Actor.cs ../../MEAT/MEAT/src/com/bitbull/meat/Directions.cs ../../MEAT/MEAT/src/com/bitbull/meat/Drawable.cs ../../MEAT/MEAT/src/com/bitbull/meat/DrawableGraphicalText.cs ../../MEAT/MEAT/src/com/bitbull/meat/DrawableImage.cs ../../MEAT/MEAT/src/com/bitbull/meat/DrawableRect.cs ../../MEAT/MEAT/src/com/bitbull/meat/DrawableText.cs ../../MEAT/MEAT/src/com/bitbull/meat/Graphics.cs ../../MEAT/MEAT/src/com/bitbull/meat/Image.cs ../../MEAT/MEAT/src/com/bitbull/meat/MEAT.cs ../../MEAT/MEAT/src/com/bitbull/meat/MEATPlatform.cs ../../MEAT/MEAT/src/com/bitbull/meat/Movie.cs ../../MEAT/MEAT/src/com/bitbull/meat/PointerEvent.cs ../../MEAT/MEAT/src/com/bitbull/meat/Scene.cs ../../MEAT/MEAT/src/com/bitbull/meat/Sprite.cs ../../MEAT/MEAT/src/com/bitbull/meat/SpriteObserver.cs ../../MEAT/MEAT/src/com/bitbull/meat/gameutil/Digits.cs ../../MEAT/MEAT/src/com/bitbull/meat/gameutil/GraphicalFont.cs ../../MEAT/MEAT/src/com/bitbull/meat/gameutil/ParagraphFormat.cs ../../MEAT/MEAT/src/com/bitbull/meat/gameutil/TextEntry.cs ../../MEAT/MEAT/src/com/bitbull/meat/gameutil/UIComponent.cs ../../MEAT/MEAT/src/com/bitbull/meat/java/DataInputStream.cs ../../MEAT/MEAT/src/com/bitbull/meat/java/Enumeration.cs ../../MEAT/MEAT/src/com/bitbull/meat/java/Vector.cs ../../MEAT/MEAT/src/com/bitbull/meat/legacy/FP.cs ../../MEAT/MEAT/src/com/bitbull/meat/media/MediaInterface.cs ../../MEAT/MEAT/src/com/bitbull/meat/motion/Motion.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/android/AndroidPlatform.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/MEATGame.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/MovieStub.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/XnaGraphics.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/XnaImage.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/XnaMediaInterface.cs ../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/XnaPlatform.cs ../../MEAT/MEAT/src/com/bitbull/meat/Vector2d.cs ../../MEAT/MEAT/src/com/bitbull/meat/motion/ElipticalMotion.cs ../../MEAT/MEAT/src/com/bitbull/meat/motion/MoveBy.cs ../../MEAT/MEAT/src/com/bitbull/meat/motion/VectorMotion.cs src/com/bitbull/meat/motion/MoveTo.cs src/com/bitbull/meat/Tween.cs obj/Debug/MonoAndroid,Version=v2.2.AssemblyAttribute.cs /target:library /define:"DEBUG;__MOBILE__;__ANDROID__;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__" /reference:/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.dll /reference:/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll /reference:/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll /reference:/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/OpenTK.dll /reference:"../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/Lidgren.Network.dll" /reference:"../../../../../../Users/James/Library/Application Support/XamarinStudio-4.0/LocalInstall/Addins/MonoDevelop.MonoGame.3.0.1/assemblies/Android/MonoGame.Framework.dll" /reference:/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll /warn:4
../../MEAT/MEAT/src/com/bitbull/meat/Vector2d.cs(479,17): warning CS0114: `com.bitbull.meat.Vector2d.ToString()' hides inherited member `object.ToString()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword
/Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/../lib/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll (Location of the symbol related to previous warning)
../../MEAT/MEAT/src/com/bitbull/meat/DrawableImage.cs(82,28): warning CS0429: Unreachable expression code detected
../../MEAT/MEAT/src/com/bitbull/meat/DrawableImage.cs(83,4): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Movie.cs(552,5): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Movie.cs(663,6): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Movie.cs(1262,5): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Movie.cs(1320,5): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Sprite.cs(401,5): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Sprite.cs(553,5): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/Sprite.cs(625,4): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/gameutil/GraphicalFont.cs(937,4): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/legacy/FP.cs(445,4): warning CS0162: Unreachable code detected
../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/MovieStub.cs(151,11): warning CS0168: The variable `motion' is declared but never used
../../MEAT/MEAT/src/com/bitbull/meat/platform/xna/XnaMediaInterface.cs(171,9): warning CS0219: The variable `oldest' is assigned but its value is never used
src/com/bitbull/meat/motion/MoveTo.cs(80,17): error CS0152: The label `case 8:' already occurs in this switch statement
src/com/bitbull/meat/motion/MoveTo.cs(79,17): (Location of the symbol related to previous error)
/Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/4.0/Microsoft.CSharp.Targets: error : Compiler crashed with code: 1.
Task "Csc" execution -- FAILED
Done building target "CoreCompile" in project "/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/MEAT_2_0_0.csproj".-- FAILED

Done building project "/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/MEAT_2_0_0.csproj".-- FAILED

Build FAILED.

Warnings:

/Volumes/Docs/development/Xamarin/MEAT_2_0_0/MEAT_2_0_0/MEAT_2_0_0.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/4.0/Microsoft.CSharp.Targets (CoreCompile target) ->

../../MEAT/MEAT/src/com/bitbull/meat/Vector2d.cs(479,17): warning CS0114: `com.bitbull.meat.Vector2d.ToString()' hides inherited member `object.ToString()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword
../../MEAT/MEAT/src/com/bitbull/meat/DrawableImage.cs(82,28): warning CS0429: Unreachable expression code detected
../../MEAT/MEAT/src/com/bitbull/meat/DrawableImage.cs(83,4): warning CS0162: Unreachable code detected

---------------------- Done ----------------------

Build: 1 error, 14 warnings
Comment 1 Marek Safar 2014-04-29 08:03:12 UTC
This is already fixed in recent mono version (3.2.7 and newer)