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
0
Question by Kevin_Deng · May 12, 2016 at 11:29 AM · iosil2cpp

Unity3d(4.7.1f1) App Crash when calls Resources.UnloadUnusedAssets() On IOS with IL2CPP

I have call Resources.UnloadUnusedAssets() after destory Gameobejcts in the scene. It crashed with EXC_BAD_ACCESS.

the callstack is :

 #0    0x0000000102794534 in il2cpp::vm::MetadataCache::GetTypeInfoFromTypeDefinitionIndex(int) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/MetadataCache.cpp:750
 #1    0x00000001027a4864 in il2cpp::vm::Type::GetClass(Il2CppType const*) [inlined] at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Type.cpp:851
 #2    0x00000001027a485c in il2cpp::vm::Type::IsEnum(Il2CppType const*) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Type.cpp:820
 #3    0x000000010278d214 in il2cpp::vm::Class::GetArrayElementSize(TypeInfo const*) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Class.cpp:1527
 #4    0x00000001027925bc in il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:283
 #5    0x000000010279260c in il2cpp::vm::LivenessState::TraverseObjects() [inlined] at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:133
 #6    0x00000001027925fc in il2cpp::vm::LivenessState::TraverseArray(Il2CppArray*, il2cpp::vm::LivenessState*) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:291
 
 ..........
 
 ..........
 
 ..........
 #25623    0x0000000102792ea0 in il2cpp::vm::LivenessState::TraverseGenericObject(Il2CppObject*, il2cpp::vm::LivenessState*) [inlined] at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:171
 #25624    0x0000000102792e4c in il2cpp::vm::LivenessState::TraverseObjects() [inlined] at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:133
 #25625    0x0000000102792e2c in il2cpp::vm::Liveness::FromStatics(void*) at /Users/builduser/buildslave/unity/build/Tools/il2cpp/il2cpp/libil2cpp/vm/Liveness.cpp:460
 #25626    0x0000000102255424 in MarkManagedStaticVariableRoots(GarbageCollectorState&) [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Misc/GarbageCollectSharedAssets.cpp:510
 #25627    0x0000000102255414 in GarbageCollectSharedAssets(bool) at /Users/builduser/buildslave/unity/build/Runtime/Misc/GarbageCollectSharedAssets.cpp:242
 #25628    0x000000010225f64c in UnloadUnusedAssetsOperation::IntegrateMainThread() at /Users/builduser/buildslave/unity/build/Runtime/Misc/PreloadManager.cpp:867
 #25629    0x000000010225e17c in PreloadManager::UpdatePreloadingSingleStep(bool) at /Users/builduser/buildslave/unity/build/Runtime/Misc/PreloadManager.cpp:488
 #25630    0x000000010225ec08 in PreloadManager::UpdatePreloading() at /Users/builduser/buildslave/unity/build/Runtime/Misc/PreloadManager.cpp:586
 #25631    0x000000010225b864 in PlayerLoop(bool, bool, IHookEvent*) at /Users/builduser/buildslave/unity/build/Runtime/Misc/Player.cpp:1800

Anyone has encountered this one before?

Thanks,

@povilas, @JoshPeterson

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by aldian · May 12, 2016 at 01:03 PM

From my time with IOS i have found that you shouldnt destroy gameobjects. Instead just deactivate them with:

gameobject.setactive(false);

Comment
Add comment · Show 1 · 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 Kevin_Deng · May 12, 2016 at 01:21 PM 0
Share

Thanks for your reply.

But, If just deactivate gameobjects. Resources.UnloadUnusedAssets() can not unload the resources used by these gameobjects. $$anonymous$$emory usage will increase fast.

avatar image
0

Answer by JoshPeterson · May 17, 2016 at 11:31 AM

I believe that this bug has already been corrected. However, we have not shipped updates for the 4.7 release series in a while, so you may need to move to the latest patch releases in 5.3 to try it.

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 Kevin_Deng · May 18, 2016 at 01:40 AM 0
Share

Thank you Josh. We can not upgrade to 5.3 right now is because: 1. Our product will be released by the end of $$anonymous$$ay, the schedule is fixed 2. $$anonymous$$y company only purchase version 4.X

Do development $$anonymous$$m have plan to integrate this patch to fix this bug into next release in 4.X version, soon? Is there any workaround to fix this bug ? How we avoid this bug ? This is crucial to our company and the current product which is going to ship to market soon.

avatar image JoshPeterson Kevin_Deng · May 18, 2016 at 12:27 PM 0
Share

I'm not totally clear on the cause of the problem, so I can't suggest a work around, unfortunately. I can't find any similar bugs in our bug system now, although I do have a vague recollection that this was corrected.

We're not planning to ship more 4.7 updates for specific bug fixes like this, so I doubt that a fix will be available. If you would like to submit a bug report, we could try it and look for a work around. That may be your best option.

It might also be worth trying the latest 5.3 version as well. If the bug was not corrected in 5.3, that will give it higher priority for a fix or work around.

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

6 People are following this question.

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

Related Questions

some iOS devices took more memory about 200%!! 1 Answer

The app is continually stopping in IOS 0 Answers

ERROR in IOS build with IL2CPP scripting backend 2 Answers

Why doesn't mono support arm64? 1 Answer

Interlocked methods crashing with IL2CPP 3 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