Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by pusheax · Feb 03, 2020 at 07:31 PM · iosbuildxcodeil2cpp

How to get readable stacktrace in IOS build?

I got the following stacktrace when running ipad build in xcode. How to fill in the blanks, e.g. replace :0 with actual filename and line number ? I did debug build, checked development build option, set "full" stack traces in options, I use ios 10.1. Also the code works on windows but after il2cpp it gives me that error. Is il2cpp reliable?

 NullReferenceException: Object reference not set to an instance of an object.
   at System.Linq.Expressions.Interpreter.LightLambda.MakeRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
   at System.Linq.Expressions.Interpreter.LightLambda.GetRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
   at System.Linq.Expressions.Interpreter.LightLambda.MakeDelegate (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
   at System.Linq.Expressions.Expression`1[TDelegate].Compile (System.Boolean preferInterpretation) [0x00000] in <00000000000000000000000000000000>:0
   at System.Runtime.CompilerServices.CallSite`1[T].MakeUpdateDelegate () [0x00000] in <00000000000000000000000000000000>:0
   at System.Runtime.CompilerServices.CallSite`1[T].GetUpdateDelegate (T& addr) [0x00000] in <00000000000000000000000000000000>:0
   at System.Runtime.CompilerServices.CallSite`1[T]..ctor (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0
   at System.Runtime.CompilerServices.CallSite`1[T].Create (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0
   at Company.Project.insertObjectArray[TCompanyObject] (System.Collections.Generic.List`1[T] objectArray, Company.IProgressInterface progressInterface) [0x00000] in <00000000000000000000000000000000>:0
   at Company.Project.insert (CCompanyAPIProjectData projectData, Company.IProgressInterface progressInterface, System.String progressLabelBase) [0x00000] in <00000000000000000000000000000000>:0
   at Company.Project.ReplaceProjectData (CCompanyAPIProjectData newProjectData, Company.IProgressInterface progressInterface) [0x00000] in <00000000000000000000000000000000>:0
   at ProjectDataLoader+<LoadProject>d__18.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 




Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by JoshPeterson · Feb 05, 2020 at 12:52 PM

IL2CPP does not support C# line numbers in stack traces at the moment, so there is nothing you can do to get them.

Note that in general, the C# Linq expression interpreter (which is where this exception is coming from) doesn't work too well with IL2CPP. There is a thread here with some details:

https://forum.unity.com/threads/are-c-expression-trees-or-ilgenerator-allowed-on-ios.489498/

You will need at least a link.xml in the project with these contents:

 <linker>
   <assembly fullname="System.Core">
    <type fullname="System.Linq.Expressions.Interpreter.LightLambda" preserve="all" />
   </assembly>
 </linker>

Even then, you might hit case that IL2CPP cannot handle. I'd recommend against using the LINQ expression interpreter if possible.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pusheax · Feb 06, 2020 at 08:38 AM 0
Share

Thanks! It seems that exception comes from the line: insert(object as dynamic); I found another thread that mentions that il2cpp does not support dynamic keyword (dotnet 4 feature). So, a lot of restrictions when using il2cpp, It would be nice to know what subset of .net 4.x features are supported before writing the code. Because it compiles, works on windows and then does not work in production environment (iPad).

avatar image JoshPeterson pusheax · Feb 06, 2020 at 12:59 PM 0
Share

We don't have an exhaustive list of things that don't work with IL2CPP, although this documentation does exist: https://docs.unity3d.com/$$anonymous$$anual/ScriptingRestrictions.html

In general, IL2CPP is an ahead-of-time compiler, so it cannot support run time code generation, which is required for dynamic to work. Likewise, iOS does not support run time code generation at all.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

163 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

IOS append not working? 0 Answers

Is there a way to upload a Unity project to the App Store with Mono as scripting backend after 1st of June? 1 Answer

Xcode build & run "innocent" (?) problem 0 Answers

PBXProject and UNITY_IOS issue in PostProcessBuild step on 2018.1 0 Answers

Unity 2019 iOS build problem 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges