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 jcox_PlayQ · Oct 05, 2017 at 11:40 PM · androidprefabanimatorresources.loadamazon

All calls to Resources.Load stopped working on Amazon devices (Unity 5.6.3p3)

Short version: suddenly we cannot use Resources.Load on Amazon devices anymore. Anyone seen strange behavior like this before?

Starting some time back in our project, on Amazon builds only (other Android and iOs work fine), all invocations to Resources.Load result in one of the following two exceptions: "Recursive Serialization is not supported. You can't dereference a PPtr while loading. (Constructors of C# classes may not load objects either. See stacktrace.)" or "ExecutionEngineException: SIGILL". This occurs on mulitiple Kindle Fire devices, 100% of the time.

The commits that coincide with the start of this problem are innocuous (one changed some packing tags, the other added a method that is not used in the game before bug expresses). Reverting the commits did not help the issue. In fact, I had to go back a full week in the repo before the builds from our build machine started failing in order the be able to locally rebuild a working version. There were no changes to the build machine that coincided with the start of the problem.

I've gone over all uses of Resources.Load in the project and ensured that they are not being done either in constructors or recursively. I have also tried delaying calls to Resources.Load by one frame in order to give the engine more time to get itself set up, but to no avail. I have tried deleting the Library and disconnecting from our asset server before rebuilding, but to no available. I have tried re-cloning our project repository and rebuilding, but to no avail. Upgrading the project to Unity 5.6.3p4 did not help. However, downgrading the project to Unity 5.5.3f1 did work and the project ran just fine on Amazon devices with that build.

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
0

Answer by jcox_PlayQ · Oct 19, 2017 at 09:37 PM

We were finally able to track this down, so I'll post this here in case anyone else runs into a similar problem. It came down to a prefab that had separate animator components on the base object plus some of its children. This is possibly a regression of https://issuetracker.unity3d.com/issues/animating-gameobject-dot-isactive-of-a-child-with-animator-controller-crashes in Unity 5.6. The bug does not appear to express in Unity 5.5 or Unity 2017.1+.

Random changes to different parts of the codebase could cause the bug to express or not, which implied either a race condition or something in the Unity build process. In addition, once the bug expressed (usually, but not always, with a SIGILL error), any subsequent call to Resources.Load would fail (with the "Recursive serialization..." error).

In our case, we finally found that the bug expression was always tied to the loading of a particular prefab. This prefab (prefab1) was stored in Resources (thus was loaded with Resources.Load()), had an Animator component, and had a script with a reference to another prefab (prefab2, not stored in Resources) that had animator components on the parent object as well as five of its children. In editor, this prefab (prefab1) loaded just fine, although it did produce several warnings that all said "Parameter "" does not exist." (always with the empty quotes). It did not require instantiating the prefab (prefab1); merely calling Resources.Load() on the path to prefab1 threw the error.

We ended up fixing this issue by removing all the child Animator components on the secondary prefab (prefab 2). Thus, prefab1 retained its Animator, and prefab2 retained the animator on the base object, but all the children of prefab2 had their animators removed and the relevant animations moved to layers within prefab2's remaining Animator.

Comment
Add comment · 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

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

148 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

Related Questions

When compressing assets for .APK does whole projects assets get included? or just the scenes assets? prefabs? 1 Answer

Why does Prefab display larger than default when apply Idle animation? 0 Answers

Android app works on only Xiaomi, not any other Android devices 0 Answers

Android app crash in instantiating prefab 0 Answers

Animation plays (is visible) in scene but not in game 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