Bugzilla – Bug 639644
Compiler crashes with "ERROR:class.c:1725:mono_class_layout_fields: assertion failed" error
Last modified: 2010-09-15 23:00:05 UTC
Created attachment 389834 [details] Entire stack trace of the mono compiler crashing User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3 Whenever I try to build my project on Mono 2.6.7_3, (Mac) the compiler crashes with a long stack trace. I'm currently working around this issue by building on Mono 2.6.4. Reproducible: Always Steps to Reproduce: 0. (Note: This happens on Mac, I haven't tried Mono+Linux or Mono+Windows.) 1. Download http://andrewrondeau.com/ObjectCloud/Code/2010-09-01%20ObjectCloud%20Source%20Code%201.0%20Alpha%204-2.zip 2. Open Server\ObjectCloud2005.sln in MonoDevelop 3. Right-click on ObjectCloud.Common and select Build 4. Observe that Mono's compiler crashes in the "Build Output" pane. Actual Results: Building: ObjectCloud.Common (Debug) Performing main compilation... /Library/Frameworks/Mono.framework/Versions/2.6.7/bin/gmcs /noconfig "/out:/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/bin/Debug/ObjectCloud.Common.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/2.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/2.0/System.Data.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/2.0/System.Xml.dll" "/r:/Users/andrewrondeau/Downloads/objectcloud/Dependancies/Common.Logging.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/2.0/System.Core.dll" "/r:/Users/andrewrondeau/Downloads/objectcloud/Server/JsonFx.Json/bin/Debug/JsonFx.Json.dll" /nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 -warnaserror "/define:DEBUG;TRACE" /t:library "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Array.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Enumerable.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/EventArgs.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/EventBus.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/GuidFunctions.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/MimeReader.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/MulticastEventWithTimeout.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/MultiStream.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Recycler.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Set.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/StaticRecycler.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/StreamFunctions.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/StringGenerator.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Properties/AssemblyInfo.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Cache.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Enum.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/HttpResponseHandler.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/HTTPStringFunctions.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/HttpWebClient.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/ID.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/IID.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/JavaScriptMinifier.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/ReadOnlyDictionaryWrapper.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/RequestParameters.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Returns.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/SRandom.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/DictionaryFunctions.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/StringParser.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/Busy.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/DelegateQueue.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/LockFreeQueue.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/LockFreeStack.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/NonBlockingConsoleWriter.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/SingleLinkNode.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/SyncMethods.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/ThreadPoolInstance.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/TimedLock.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/Timeout.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Threading/WeakLock.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/TypeFunctions.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/CommonDelegates.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Shared.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/IRunnable.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/CookiesFromBrowser.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/Wrapped.cs" "/Users/andrewrondeau/Downloads/objectcloud/Server/ObjectCloud.Common/XmlHelper.cs" ** ERROR:class.c:1725:mono_class_layout_fields: assertion failed: (class->image->dynamic || field->offset > 0) Stacktrace: at (wrapper managed-to-native) System.Type.MakeGenericType (System.Type,System.Type[]) <0x00004> at (wrapper managed-to-native) System.Type.MakeGenericType (System.Type,System.Type[]) <0x00004> at System.Type.MakeGenericType (System.Type[]) <0x00144> at Mono.CSharp.GenericTypeExpr.DoResolveAsTypeStep (Mono.CSharp.IMemberContext) <0x0009c> at Mono.CSharp.TypeExpr.ResolveAsTypeStep (Mono.CSharp.IMemberContext,bool) <0x0001e> at Mono.CSharp.Expression.ResolveAsBaseTerminal (Mono.CSharp.IMemberContext,bool) <0x0004d> at Mono.CSharp.Expression.ResolveAsTypeTerminal (Mono.CSharp.IMemberContext,bool) <0x0001b> at Mono.CSharp.Nullable.NullableType.DoResolveAsTypeStep (Mono.CSharp.IMemberContext) <0x000f6> at Mono.CSharp.TypeExpr.ResolveAsTypeStep (Mono.CSharp.IMemberContext,bool) <0x0001e> at Mono.CSharp.Expression.ResolveAsBaseTerminal (Mono.CSharp.IMemberContext,bool) <0x0004d> See attachment for the whole error Expected Results: ObjectCloud.Common builds without error when using Mono 2.6.4 and on Visual Studio 2010. I'm currently working around this issue by using Mono 2.6.4.
This was already fixed in 2.6.x and will be part of 2.6.8. *** This bug has been marked as a duplicate of bug 627840 ***