Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Android (regression in 1.2.6) #465

Closed
tranb3r opened this issue Nov 30, 2020 · 6 comments
Closed

Crash on Android (regression in 1.2.6) #465

tranb3r opened this issue Nov 30, 2020 · 6 comments
Labels

Comments

@tranb3r
Copy link

tranb3r commented Nov 30, 2020

On Android, my app crashes when using new version 1.2.6.
No issue with previous versions.

Here is the stacktrace:

System.TypeInitializationException : The type initializer for 'System.Linq.Dynamic.Core.Parser.EnumerationsFromMscorlib' threw an exception.
---- System.IO.FileNotFoundException : Could not load the file 'System.Private.Corelib'.
		  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
		  at System.Linq.Dynamic.Core.Parser.KeywordsHelper..ctor (System.Linq.Dynamic.Core.ParsingConfig config) [0x00256] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Parser\KeywordsHelper.cs:68 
		  at System.Linq.Dynamic.Core.Parser.ExpressionParser..ctor (System.Linq.Expressions.ParameterExpression[] parameters, System.String expression, System.Object[] values, System.Linq.Dynamic.Core.ParsingConfig parsingConfig) [0x0007c] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Parser\ExpressionParser.cs:84 
		  at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda (System.Type delegateType, System.Linq.Dynamic.Core.ParsingConfig parsingConfig, System.Boolean createParameterCtor, System.Linq.Expressions.ParameterExpression[] parameters, System.Type resultType, System.String expression, System.Object[] values) [0x00027] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\DynamicExpressionParser.cs:120 
		  at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda (System.Linq.Dynamic.Core.ParsingConfig parsingConfig, System.Boolean createParameterCtor, System.Linq.Expressions.ParameterExpression[] parameters, System.Type resultType, System.String expression, System.Object[] values) [0x00000] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\DynamicExpressionParser.cs:97 
		  at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda (System.Boolean createParameterCtor, System.Linq.Expressions.ParameterExpression[] parameters, System.Type resultType, System.String expression, System.Object[] values) [0x00000] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\DynamicExpressionParser.cs:450 
		  at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda (System.Boolean createParameterCtor, System.Type itType, System.Type resultType, System.String expression, System.Object[] values) [0x00018] in C:\Users\azurestef\Documents\Github\zzzprojects\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\DynamicExpressionParser.cs:201 

Any idea ?

@StefH
Copy link
Collaborator

StefH commented Nov 30, 2020

Hello @tranb3r, this issue is indeed related to 1.2.6 (can you maybe create a very small android example project which has this error?)

As a workaround you can use ParsingConfig and set SupportEnumerationsFromSystemNamespace to false.

@tranb3r
Copy link
Author

tranb3r commented Nov 30, 2020

Here is a repro
TestSLDC.zip

@tranb3r
Copy link
Author

tranb3r commented Nov 30, 2020

I confirm the workaround does work.

@StefH
Copy link
Collaborator

StefH commented Dec 1, 2020

Hello @tranb3r.

I cannot test android on my system, can you try NuGet 1.2.7-preview-01 from https://www.myget.org/F/system-linq-dynamic-core/api/v3/index.json ?

@tranb3r
Copy link
Author

tranb3r commented Dec 1, 2020

Hi @StefH,
I confirm the 1.2.7-preview-01 does work on android.
Thanks for the quick fix !

@StefH
Copy link
Collaborator

StefH commented Dec 1, 2020

@tranb3r Thanks for verifying. I'll close this issue now and when the next official NuGet is released, this fix will included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants