Bug 49686 - System.NotImplementedException at System.Reflection.Emit.DynamicMethod.GetCustomAttributes (System.Type attributeType, Boolean inherit)
Summary: System.NotImplementedException at System.Reflection.Emit.DynamicMethod.GetCus...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: 4.6.0 (C8)
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2016-12-12 15:57 UTC by tlaguz
Modified: 2016-12-14 15:39 UTC (History)
2 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 tlaguz 2016-12-12 15:57:45 UTC
My app connects to Oracle DB using dotConnect for Oracle provider and EntityFramework 6.
Queries started using AsNoTracking() fails on several entities (always same, can't find anything special about them). Stacktrace:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 
	System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 
	System.NotImplementedException: The method or operation is not implemented.\n  at System.Reflection.Emit.DynamicMethod.GetCustomAttributes (System.Type attributeType, Boolean inherit) 
	<0x42b81c10 + 0x00017> in <filename unknown>:0 \n  at System.Attribute.GetCustomAttributes (System.Reflection.MemberInfo element, System.Type type, Boolean inherit) 
	<0x42063420 + 0x0014a> in <filename unknown>:0 \n  at System.Attribute.GetCustomAttribute (System.Reflection.MemberInfo element, System.Type attributeType, Boolean inherit) 
	<0x42063380 + 0x00021> in <filename unknown>:0 \n  at System.Attribute.GetCustomAttribute (System.Reflection.MemberInfo element, System.Type attributeType) 
	<0x42063350 + 0x0001e> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.VisitMethodCall (System.Linq.Expressions.MethodCallExpression node) 
	<0x425410c0 + 0x00059> in <filename unknown>:0 \n  at System.Linq.Expressions.MethodCallExpression.Accept (System.Linq.Expressions.ExpressionVisitor visitor) 
	<0x421f1c00 + 0x00020> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionVisitor.Visit (System.Linq.Expressions.Expression node) 
	<0x41fdeec0 + 0x00022> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.VisitConditional (System.Linq.Expressions.ConditionalExpression node) 
	<0x42540b60 + 0x0005f> in <filename unknown>:0 \n  at System.Linq.Expressions.ConditionalExpression.Accept (System.Linq.Expressions.ExpressionVisitor visitor) 
	<0x4253b200 + 0x00020> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionVisitor.Visit (System.Linq.Expressions.Expression node) 
	<0x41fdeec0 + 0x00022> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.VisitMethodCall (System.Linq.Expressions.MethodCallExpression node) 
	<0x425410c0 + 0x00160> in <filename unknown>:0 \n  at System.Linq.Expressions.MethodCallExpression.Accept (System.Linq.Expressions.ExpressionVisitor visitor) 
	<0x421f1c00 + 0x00020> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionVisitor.Visit (System.Linq.Expressions.Expression node) 
	<0x41fdeec0 + 0x00022> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.VisitConditional (System.Linq.Expressions.ConditionalExpression node) 
	<0x42540b60 + 0x0005f> in <filename unknown>:0 \n  at System.Linq.Expressions.ConditionalExpression.Accept (System.Linq.Expressions.ExpressionVisitor visitor) 
	<0x4253b200 + 0x00020> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionVisitor.Visit (System.Linq.Expressions.Expression node) 
	<0x41fdeec0 + 0x00022> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.VisitLambda[T] (System.Linq.Expressions.Expression`1 node) 
	<0x425408e0 + 0x000d2> in <filename unknown>:0 \n  at System.Linq.Expressions.Expression`1[TDelegate].Accept (System.Linq.Expressions.ExpressionVisitor visitor) 
	<0x41fdeef0 + 0x00043> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionVisitor.Visit (System.Linq.Expressions.Expression node) 
	<0x41fdeec0 + 0x00022> in <filename unknown>:0 \n  at System.Linq.Expressions.ExpressionStringBuilder.ExpressionToString (System.Linq.Expressions.Expression node) 
	<0x425407d0 + 0x0004d> in <filename unknown>:0 \n  at System.Linq.Expressions.Expression.ToString () 
	<0x425407a0 + 0x0000f> in <filename unknown>:0 \n  at System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory`1[TElement].DescribeExpression (System.Linq.Expressions.Expression expression) 
	<0x42540700 + 0x0002e> in <filename unknown>:0 \n  at System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory`1[TElement]..ctor (Int32 depth, Int32 stateSlot, System.Linq.Expressions.Expression`1 hasData, 
	System.Linq.Expressions.Expression`1 setKeys, 
	System.Linq.Expressions.Expression`1 checkKeys, 
	System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory[] nestedCoordinators, 
	System.Linq.Expressions.Expression`1 element, System.Linq.Expressions.Expression`1 wrappedElement, 
	System.Linq.Expressions.Expression`1 elementWithErrorHandling, 
	System.Linq.Expressions.Expression`1 initializeCollection, 
	System.Data.Entity.Core.Common.Internal.Materialization.RecordStateFactory[] recordStateFactories) 
	<0x4253fa70 + 0x00453> in <filename unknown>:0 \n  at System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory`1[TElement]..ctor (Int32 depth, Int32 stateSlot,
	System.Linq.Expressions.Expression hasData, 
	System.Linq.Expressions.Expression setKeys, 
	System.Linq.Expressions.Expression checkKeys, 
	System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory[] nestedCoordinators, 
	System.Linq.Expressions.Expression element, 
	System.Linq.Expressions.Expression elementWithErrorHandling, 
	System.Linq.Expressions.Expression initializeCollection, 
	System.Data.Entity.Core.Common.Internal.Materialization.RecordStateFactory[] recordStateFactories) 
	<0x4253f500 + 0x0025f> in <filename unknown>:0 \n  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)\n  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) <0x403099e0 + 0x00045> in <filename unknown>:0 \n  --- End of inner exception stack trace ---\n  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) 
	<0x403099e0 + 0x00097> in <filename unknown>:0 \n  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x4035fb60 + 0x000f1> in <filename unknown>:0 \n  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) 
	<0x40374d80 + 0x0003e> in <filename unknown>:0 \n  at System.RuntimeType.CreateInstanceImpl (BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) 
	<0x40321ef0 + 0x006d4> in <filename unknown>:0 \n  --- End of inner exception stack trace ---\n  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) 
	<0x42020900 + 0x00123> in <filename unknown>:0 \n  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) 
	<0x4035f9b0 + 0x0002a> in <filename unknown>:0 \n  at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap (System.Data.Entity.Core.Common.Internal.Materialization.Translator translator, System.Type elementType, System.Data.Entity.Core.Query.InternalTrees.ColumnMap columnMap, System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace workspace, System.Data.Entity.Core.Objects.Internal.SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer) 
	<0x42512f50 + 0x001b7> in <filename unknown>:0 \n  at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare (System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree tree, System.Type elementType, MergeOption mergeOption, Boolean streaming, System.Data.Entity.Core.Objects.Span span, IEnumerable`1 compiledQueryParameters, System.Data.Entity.Core.Common.Utils.AliasGenerator aliasGenerator) 
	<0x42441400 + 0x00177> in <filename unknown>:0 \n  at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan (Nullable`1 forMergeOption) 
	<0x423c8a50 + 0x0071a> in <filename unknown>:0 \n  at System.Data.Entity.Core.Objects.ObjectQuery`1+<>c__DisplayClass7[T].<GetResults>b__6 () <0x423c8980 + 0x00034> in <filename unknown>:0 \n  at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T] (System.Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) <0x423c8680 + 0x001bb> in <filename unknown>:0 \n  --- End of inner exception stack trace ---",