Quantcast
Channel: Questions in topic: "log"
Viewing all articles
Browse latest Browse all 235

Why does Dictionary with a generic struct key blow the compiler up?

$
0
0
Its actually the new of the Dictionary that blows the compiler up. using System.Collections.Generic; namespace WWUtils.Math{ [System.Serializable] struct Foo { } public class Sparse3DMatrix { Dictionary, T> valueStore = new Dictionary, T>(); } } If I make the struct not a generic, it compilers fine. If I make the key a generic class, it compiles fine. If I remove the new it compiles fine. But as written above, I get the following stack trace in the log: -----CompilerOutput:-stdout--exitcode: 134--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll * Assertion at class.c:1727, condition `class->image->dynamic || field->offset > 0' not met -----CompilerOutput:-stderr---------- Stacktrace: at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info (intptr,System.Reflection.MonoMethodInfo&) <0x00004> at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info (intptr,System.Reflection.MonoMethodInfo&) <0x00004> at System.Reflection.MonoMethodInfo.GetMethodInfo (intptr) <0x00037> at System.Reflection.MonoMethodInfo.GetDeclaringType (intptr) <0x00037> at System.Reflection.MonoMethod.get_DeclaringType () <0x00014> at Mono.CSharp.TypeManager.IsGenericMethodDefinition (System.Reflection.MethodBase) <0x0001a> at Mono.CSharp.TypeManager.GetMethodName (System.Reflection.MethodInfo) <0x00012> at Mono.CSharp.MemberCache.AddMembers (System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.IMemberContainer) <0x0010e> at Mono.CSharp.MemberCache.AddMembers (System.Reflection.MemberTypes,Mono.CSharp.IMemberContainer) <0x00028> at Mono.CSharp.MemberCache.AddMembers (Mono.CSharp.IMemberContainer) <0x0004c> at Mono.CSharp.MemberCache..ctor (Mono.CSharp.IMemberContainer) <0x00188> at Mono.CSharp.TypeHandle..ctor (System.Type) <0x0011d> at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type) <0x00063> at Mono.CSharp.TypeHandle.GetMemberCache (System.Type) <0x00010> at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,bool&) <0x0026d> at Mono.CSharp.TypeManager.RealMemberLookup (System.Type,System.Type,System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,System.Collections.IList) <0x0012d> at Mono.CSharp.TypeManager.MemberLookup (System.Type,System.Type,System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,System.Collections.IList) <0x00022> at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext,System.Type,System.Type,System.Type,string,System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.Location) <0x00041> at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.ResolveContext,System.Type,System.Type,string,System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.Location) <0x00066> at Mono.CSharp.New.DoResolve (Mono.CSharp.ResolveContext) <0x004d5> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext,Mono.CSharp.ResolveFlags) <0x0015b> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext) <0x00015> at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext) <0x00021> at Mono.CSharp.FieldInitializer.DoResolve (Mono.CSharp.ResolveContext) <0x00068> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext,Mono.CSharp.ResolveFlags) <0x0015b> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext) <0x00015> at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext) <0x00015> at Mono.CSharp.TypeContainer.DoResolveFieldInitializers (Mono.CSharp.BlockContext) <0x002ad> at Mono.CSharp.TypeContainer.ResolveFieldInitializers (Mono.CSharp.BlockContext) <0x001ac> at Mono.CSharp.Constructor.Emit () <0x00138> at Mono.CSharp.TypeContainer.EmitConstructors () <0x003a3> at Mono.CSharp.TypeContainer.EmitType () <0x0009b> at Mono.CSharp.RootContext.EmitCode () <0x000aa> at Mono.CSharp.Driver.Compile () <0x00764> at Mono.CSharp.Driver.Main (string[]) <0x0008f> at (wrapper runtime-invoke) .runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00043> Native stacktrace: 0 mono 0x002aa630 g_log_set_fatal_mask + 64 1 mono 0x002aa733 g_logv + 243 2 mono 0x002aa781 g_log + 65 3 mono 0x0014d079 mono_class_layout_fields + 2953 4 mono 0x0014c3a4 mono_method_set_generic_container + 5044 5 mono 0x00154e8d mono_class_init + 1229 6 mono 0x00220371 mono_type_get_object + 1473 7 mono 0x0018910d mono_domain_lookup_shared_generic + 18429 8 ??? 0x00767782 0x0 + 7763842 9 ??? 0x00767700 0x0 + 7763712 10 ??? 0x00767d38 0x0 + 7765304 11 ??? 0x02d3645d 0x0 + 47408221 12 ??? 0x043a4aa3 0x0 + 70929059 13 ??? 0x043a49fb 0x0 + 70928891 14 ??? 0x043a3c1f 0x0 + 70925343 15 ??? 0x043a3ae9 0x0 + 70925033 16 ??? 0x043a3a4d 0x0 + 70924877 17 ??? 0x02f8fd19 0x0 + 49872153 18 ??? 0x02f8fb0e 0x0 + 49871630 19 ??? 0x02f8f9a4 0x0 + 49871268 20 ??? 0x02f8f8a9 0x0 + 49871017 21 ??? 0x043c078e 0x0 + 71042958 22 ??? 0x043c0166 0x0 + 71041382 23 ??? 0x043c0023 0x0 + 71041059 24 ??? 0x043bf7da 0x0 + 71038938 25 ??? 0x043bf727 0x0 + 71038759 26 ??? 0x04445476 0x0 + 71586934 27 ??? 0x043ba454 0x0 + 71017556 28 ??? 0x043ba26e 0x0 + 71017070 29 ??? 0x043ba7b2 0x0 + 71018418 30 ??? 0x043ba719 0x0 + 71018265 31 ??? 0x043ba454 0x0 + 71017556 32 ??? 0x043ba26e 0x0 + 71017070 33 ??? 0x043ba1f6 0x0 + 71016950 34 ??? 0x043ba0a6 0x0 + 71016614 35 ??? 0x043b9dcd 0x0 + 71015885 36 ??? 0x043b9051 0x0 + 71012433 37 ??? 0x043b8d6c 0x0 + 71011692 38 ??? 0x043b6e9c 0x0 + 71003804 39 ??? 0x043b68fb 0x0 + 71002363 40 ??? 0x007f322d 0x0 + 8335917 41 ??? 0x0075b2a8 0x0 + 7713448 42 ??? 0x0075b62c 0x0 + 7714348 43 mono 0x0000ed62 mono_jit_find_compiled_method + 1538 44 mono 0x001fdfaa mono_runtime_invoke + 170 45 mono 0x00200257 mono_runtime_exec_main + 663 46 mono 0x001ffaec mono_runtime_run_main + 476 47 mono 0x0009f48f mono_jit_exec + 239 48 mono 0x0009f6e0 mono_jit_exec + 832 49 mono 0x000a183e mono_main + 7118 50 mono 0x000024b8 main + 56 51 mono 0x00002435 start + 53 Debug info from gdb: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= -----EndCompilerOutput--------------- - Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll Internal compiler error. See the console log for more information. output was:Stacktrace: at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info (intptr,System.Reflection.MonoMethodInfo&) <0x00004> at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info (intptr,System.Reflection.MonoMethodInfo&) <0x00004> at System.Reflection.MonoMethodInfo.GetMethodInfo (intptr) <0x00037> at System.Reflection.MonoMethodInfo.GetDeclaringType (intptr) <0x00037> at System.Reflection.MonoMethod.get_DeclaringType () <0x00014> at Mono.CSharp.TypeManager.IsGenericMethodDefinition (System.Reflection.MethodBase) <0x0001a> at Mono.CSharp.TypeManager.GetMethodName (System.Reflection.MethodInfo) <0x00012> at Mono.CSharp.MemberCache.AddMembers (System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.IMemberContainer) <0x0010e> at Mono.CSharp.MemberCache.AddMembers (System.Reflection.MemberTypes,Mono.CSharp.IMemberContainer) <0x00028> at Mono.CSharp.MemberCache.AddMembers (Mono.CSharp.IMemberContainer) <0x0004c> at Mono.CSharp.MemberCache..ctor (Mono.CSharp.IMemberContainer) <0x00188> at Mono.CSharp.TypeHandle..ctor (System.Type) <0x0011d> at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type) <0x00063> at Mono.CSharp.TypeHandle.GetMemberCache (System.Type) <0x00010> at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,bool&) <0x0026d> at Mono.CSharp.TypeManager.RealMemberLookup (System.Type,System.Type,System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,System.Collections.IList) <0x0012d> at Mono.CSharp.TypeManager.MemberLookup (System.Type,System.Type,System.Type,System.Reflection.MemberTypes,System.Reflection.BindingFlags,string,System.Collections.IList) <0x00022> at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext,System.Type,System.Type,System.Type,string,System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.Location) <0x00041> at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.ResolveContext,System.Type,System.Type,string,System.Reflection.MemberTypes,System.Reflection.BindingFlags,Mono.CSharp.Location) <0x00066> at Mono.CSharp.New.DoResolve (Mono.CSharp.ResolveContext) <0x004d5> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext,Mono.CSharp.ResolveFlags) <0x0015b> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext) <0x00015> at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext) <0x00021> at Mono.CSharp.FieldInitializer.DoResolve (Mono.CSharp.ResolveContext) <0x00068> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext,Mono.CSharp.ResolveFlags) <0x0015b> at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext) <0x00015> at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext) <0x00015> at Mono.CSharp.TypeContainer.DoResolveFieldInitializers (Mono.CSharp.BlockContext) <0x002ad> at Mono.CSharp.TypeContainer.ResolveFieldInitializers (Mono.CSharp.BlockContext) <0x001ac> at Mono.CSharp.Constructor.Emit () <0x00138> at Mono.CSharp.TypeContainer.EmitConstructors () <0x003a3> at Mono.CSharp.TypeContainer.EmitType () <0x0009b> at Mono.CSharp.RootContext.EmitCode () <0x000aa> at Mono.CSharp.Driver.Compile () <0x00764> at Mono.CSharp.Driver.Main (string[]) <0x0008f> at (wrapper runtime-invoke) .runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00043> Native stacktrace: 0 mono 0x002aa630 g_log_set_fatal_mask + 64 1 mono 0x002aa733 g_logv + 243 2 mono 0x002aa781 g_log + 65 3 mono 0x0014d079 mono_class_layout_fields + 2953 4 mono 0x0014c3a4 mono_method_set_generic_container + 5044 5 mono 0x00154e8d mono_class_init + 1229 6 mono 0x00220371 mono_type_get_object + 1473 7 mono 0x0018910d mono_domain_lookup_shared_generic + 18429 8 ??? 0x00767782 0x0 + 7763842 9 ??? 0x00767700 0x0 + 7763712 10 ??? 0x00767d38 0x0 + 7765304 11 ??? 0x02d3645d 0x0 + 47408221 12 ??? 0x043a4aa3 0x0 + 70929059 13 ??? 0x043a49fb 0x0 + 70928891 14 ??? 0x043a3c1f 0x0 + 70925343 15 ??? 0x043a3ae9 0x0 + 70925033 16 ??? 0x043a3a4d 0x0 + 70924877 17 ??? 0x02f8fd19 0x0 + 49872153 18 ??? 0x02f8fb0e 0x0 + 49871630 19 ??? 0x02f8f9a4 0x0 + 49871268 20 ??? 0x02f8f8a9 0x0 + 49871017 21 ??? 0x043c078e 0x0 + 71042958 22 ??? 0x043c0166 0x0 + 71041382 23 ??? 0x043c0023 0x0 + 71041059 24 ??? 0x043bf7da 0x0 + 71038938 25 ??? 0x043bf727 0x0 + 71038759 26 ??? 0x04445476 0x0 + 71586934 27 ??? 0x043ba454 0x0 + 71017556 28 ??? 0x043ba26e 0x0 + 71017070 29 ??? 0x043ba7b2 0x0 + 71018418 30 ??? 0x043ba719 0x0 + 71018265 31 ??? 0x043ba454 0x0 + 71017556 32 ??? 0x043ba26e 0x0 + 71017070 33 ??? 0x043ba1f6 0x0 + 71016950 34 ??? 0x043ba0a6 0x0 + 71016614 35 ??? 0x043b9dcd 0x0 + 71015885 36 ??? 0x043b9051 0x0 + 71012433 37 ??? 0x043b8d6c 0x0 + 71011692 38 ??? 0x043b6e9c 0x0 + 71003804 39 ??? 0x043b68fb 0x0 + 71002363 40 ??? 0x007f322d 0x0 + 8335917 41 ??? 0x0075b2a8 0x0 + 7713448 42 ??? 0x0075b62c 0x0 + 7714348 43 mono 0x0000ed62 mono_jit_find_compiled_method + 1538 44 mono 0x001fdfaa mono_runtime_invoke + 170 45 mono 0x00200257 mono_runtime_exec_main + 663 46 mono 0x001ffaec mono_runtime_run_main + 476 47 mono 0x0009f48f mono_jit_exec + 239 48 mono 0x0009f6e0 mono_jit_exec + 832 49 mono 0x000a183e mono_main + 7118 50 mono 0x000024b8 main + 56 51 mono 0x00002435 start + 53 Debug info from gdb: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= (Filename: Line: 0)

Viewing all articles
Browse latest Browse all 235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>