#Unity randomly gets stuck on reloading domain

1 messages · Page 1 of 1 (latest)

crystal panther
#

Sometimes when entering play mode or exiting play mode unity decides to hang itself while reloading domain. I couldn't find the reason for this so it would be great if someone has tips for this and can save my productivity.
The project is small, there's no hanging connections, no hanging threads, no hanging async tasks and it started happening yesterday only on this one single project.

(I suppose I'll try nuking library cause that's the last thing that I have not tried yet)

opaque bolt
kindred ravine
# crystal panther Sometimes when entering play mode or exiting play mode unity decides to hang its...

You can find the cause(and maybe fix it), by breaking in a debugger when it's stuck.
Looking at what the different threads are doing. There is likely gonna be one that is doing active work and is likely stuck in a recursion, an infinite loop, or waiting on thread sync lock/mutex or something like that.
Start with the managed debugger and if there's nothing that seems relevant, maybe try the native debugger.

crystal panther
#

Feels like it would be more efficient to ignore the problem than delve into this to find the cause so I'll just hope someone else has encountered this and found a solution before. I don't have context for anything in the call stack so can't tell what's causing it, I can suspect unity doesn't like static lists but they've been fine in any other project I've worked in. I also forgot to mention that it's unity 6

kindred ravine
crystal panther
kindred ravine
#

WaitAny indicates that it waits for an event. I feel like this is not related to the issue.

kindred ravine
olive tulip
#

I had this issue in the past where domain reloads would get stuck forever. The cause was me doing something in an object destructor that interacted with some native code relating to firebase. Somehow it caused a deadlock. No idea if this helps 😆

kindred ravine
#

Yeah, there could be many causes.
I had an issue with the old version of Plastic integration. It was trying to sync files infinitely or something like that.

#

I found it out via the debugger.

crystal panther
#

After a few days I got it to happen again and found this and it makes me want to ask why this doesn't have a timeout but I've known unity for years so that would be pointless

olive tulip
#

If you aren't using unity VC you can remove the package and see if that helps? (Google tells me that's where codice comes from)

olive tulip
#

If you can re create the issue report it as a bug

fiery shoal
#

Why not just disable domain reloads? It’s not really needed and you can still use statics with a slight worksround

olive tulip
#
  1. It fucks up many things
  2. Needs to happen to recompile code too
kindred ravine
kindred ravine
crystal panther
sick seal
#

I had this issue and it was related to the Burst Compiler, if you use the [BurstCompile] attribute so commenting that out solved the Problem, just don't forget to add it back on if you are so far.

olive tulip
sick seal
#

well, than i dont know...