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

iPhone build crashes on device - Unity 2020.33 #38

Closed
Kevdome3000 opened this issue Apr 17, 2021 · 3 comments
Closed

iPhone build crashes on device - Unity 2020.33 #38

Kevdome3000 opened this issue Apr 17, 2021 · 3 comments

Comments

@Kevdome3000
Copy link

Kevdome3000 commented Apr 17, 2021

I've searched for hours and can't figure this one out. This happens right at launch when I'm attempting to check if a db file already exists and if not, build a new one.

I've tried link.xml files but no luck. Any Ideas?

XCode logs:

NotSupportedException: ./External/il2cpp/builds/libil2cpp/icalls/mscorlib/System.Reflection/CustomAttributeData.cpp(17) : Unsupported internal call for IL2CPP:CustomAttributeData::ResolveArgumentsInternal - "IL2CPP does not support inspection of attribute constructor arguments at run time."
at System.Reflection.CustomAttributeData.ResolveArguments () [0x00000] in <00000000000000000000000000000000>:0
at System.Reflection.CustomAttributeData.get_ConstructorArguments () [0x00000] in <00000000000000000000000000000000>:0
at SqlCipher4Unity3D.Orm.InflateAttribute (System.Reflection.CustomAttributeData x) [0x00000] in <00000000000000000000000000000000>:0
at SqlCipher4Unity3D.Orm+<>c.b__12_1 (System.Reflection.CustomAttributeData x) [0x00000] in <00000000000000000000000000000000>:0
at System.Func2[T,TResult].Invoke (T arg) [0x00000] in <00000000000000000000000000000000>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00000] in <00000000000000000000000000000000>:0 at SqlCipher4Unity3D.TableMapping+Column..ctor (System.Reflection.PropertyInfo prop, SqlCipher4Unity3D.CreateFlags createFlags) [0x00000] in <00000000000000000000000000000000>:0 at SqlCipher4Unity3D.TableMapping..ctor (System.Type type, SqlCipher4Unity3D.CreateFlags createFlags) [0x00000] in <00000000000000000000000000000000>:0 at SqlCipher4Unity3D.SQLiteConnection.GetMapping (System.Type type, SqlCipher4Unity3D.CreateFlags createFlags) [0x00000] in <00000000000000000000000000000000>:0 at SqlCipher4Unity3D.SQLiteConnection.CreateTable (System.Type ty, SqlCipher4Unity3D.CreateFlags createFlags) [0x00000] in <00000000000000000000000000000000>:0 at System.Func2[T,TResult].Invoke (T arg) [0x00000] in <00000000000000000000000000000000>:0
at SqlCipher4Unity3D.SQLiteAsyncConnection+<>c__DisplayClass34_01[T].<WriteAsync>b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Func1[TResult].Invoke () [0x00000] in <00000000000000000000000000000000>:0
at XXXXX.Database.DataServiceAsync+d__4.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at XXXXXX.Database.DataServiceAsync.CreateDB () [0x00000] in <00000000000000000000000000000000>:0
at BootStrap+d__6.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at BootStrap.Start () [0x00000] in <00000000000000000000000000000000>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
at BootStrap+d__6.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at BootStrap.Start () [0x00000] in <00000000000000000000000000000000>:0

@netpyoung
Copy link
Owner

netpyoung commented Apr 17, 2021

That problem caused by ConstructorArguments on iOS's IL2CPP environment.

I manually modified on Column(

// NOTE(pyoung): ConstructorArguments - "IL2CPP does not support inspection of attribute constructor arguments at run time."
) but not on InflateAttribute.

and I found sqlite-net's pull request.

I will apply this on this repo but I can't test on iOS/Mac device(i don't have device yet...)

After apply that pr, I will comment again on this issue

@netpyoung
Copy link
Owner

I pushed script on master branch.

But I don't have device.... so Could you test that script on your device?

@Kevdome3000
Copy link
Author

Hey,

Just tested and it worked! Thanks for helping out so quickly.

I'll close this now

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

No branches or pull requests

2 participants