Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
This question was closed Oct 31, 2020 at 10:54 AM by faadils7 for the following reason:

Other - Issue resolved, and post isn't even past moderation yet anyway.

avatar image
0
Question by faadils7 · Nov 02, 2020 at 10:03 AM · debugfreezenative

Native debugging

I've been getting an annoying issue on my project where the game suddenly permanently freezes. It occurs at random times and I haven't been able to find the specific part of code that is causing it. It's a spaceship game and by heavily increasing the number of spaceships spawned, I find that the freeze occurs a lot quicker. Usually it happens randomly (like after a few minutes of letting the game run) but when there's lots of spaceships it happens after 5-10 seconds of running the game.

The freeze occurs both when running in Unity editor with or without profiler and when "Build and Run"-ing.

I've already gone through my code base to look for possible while-loops that could be getting stuck etc. Usually those are easily found by pausing VisualStudio when attached to Unity, but in this case I end up with "No compatible code found", indicating that we're getting stuck somewhere in Unity's native code.

I've been trying to follow the steps in this thread https://forum.unity.com/threads/usererror-how-to-find-your-infinite-loop.378384/ but after attaching to the Unity.exe process and pausing execution, I am getting stuff like "object.c not found" / "mini-runtime.c not found" etc.

And Watching on "mono.dll!mono_pmip((void*)0x0d51f480);" gives "Module mono.dll not found."

Can anyone help me on debugging the issue?

EDIT: After some searching, I've found that the files VS was asking for are in the installation location of Unity, in my case C:\Program Files\Unity\Editor\Data\ So that's a step ahead.

Now I've got the following stacktrace:

Unity.exe!Random_Get_Custom_PropValue(void) Unknown

0000024503e881b5() Unknown 00000245042bf543() Unknown 0000024503e96553() Unknown 0000024503e93934() Unknown 0000024503e93b20() Unknown mono-2.0-bdwgc.dll!mono_jit_runtime_invoke(_MonoMethod method, void obj, void params, _MonoObject exc, _MonoError error) Line 2809 C mono-2.0-bdwgc.dll!do_runtime_invoke(_MonoMethod method, void obj, void params, _MonoObject exc, _MonoError error) Line 2921 C [Inline Frame] mono-2.0-bdwgc.dll!mono_runtime_try_invoke( MonoMethod ) Line 3026 C mono-2.0-bdwgc.dll!mono_runtime_invoke(_MonoMethod method, void obj, void params, _MonoObject exc) Line 2968 C Unity.exe!scripting_method_invoke(class ScriptingMethodPtr,class ScriptingObjectPtr,struct ScriptingArguments &,class ScriptingExceptionPtr ,bool) Unknown Unity.exe!ScriptingInvocation::Invoke(class ScriptingExceptionPtr ,bool) Unknown Unity.exe!Coroutine::Run(bool ) Unknown Unity.exe!Coroutine::ContinueCoroutine(class Object ,void ) Unknown Unity.exe!DelayedCallManager::Update(int) Unknown Unity.exe!`InitPlayerLoopCallbacks'::`2'::UpdateScriptRunDelayedDynamicFrameRateRegistrator::Forward() Unknown Unity.exe!ExecutePlayerLoop(struct NativePlayerLoopSystem ) Unknown Unity.exe!ExecutePlayerLoop(struct NativePlayerLoopSystem ) Unknown Unity.exe!PlayerLoop(void) Unknown Unity.exe!PlayerLoopController::UpdateScene(bool) Unknown Unity.exe!Application::TickTimer(void) Unknown Unity.exe!MainMessageLoop() Unknown Unity.exe!WinMain() Unknown Unity.exe!_scrt_common_main_seh() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown It seems the freeze issue is coming from Coroutines? My game relies heavily on Coroutines and I've heard that Unity's Coroutines are quite fragile. Could it be that my freeze issue is due to my usage of Coroutines to control flow? And that would explain why it occurs more when there are a lot more spaceships in the scene, as that would mean a lot more coroutines happening. Any advice?
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

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

138 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

Related Questions

How do you print to the console/log from native code on OSX ? 1 Answer

Android freezes on attaching VS/Mono debugger 1 Answer

Editor freezes while playing audio loop. 1 Answer

Unity freezes on play, no error 0 Answers

How can I find editor log file? 5 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