#Sooo... my unity keeps freezing at random and I don't know why.

1 messages · Page 1 of 1 (latest)

gilded mirage
#

Unity 6000.0.60f1

While using the editor, while playing, at random times that goes from 30 seconds playing to 2:30 minutes, the editor will freeze, nothing can remove the freeze beside closing the unity.

Can't find a single common denominator between these freezes.

  • No debug logs before happening
  • No Spike on the profiler.

No change that comes to mind could do this, the last change I made before this happening was a new turret that is adimitably not that well codded, but even when I'm not using it, the random stuns keep happening.

There was a change I made far earlier where I was creating a metadata collector that keeps watch on everything that spawns and despawns using the PoolSystem, it could be that.

Things to note:

  • I haven't tested on builds yet.
  • There are other people working on the same project that do not suffer the same bug, even after getting my push, but they might not have made that many tests on playmode.

Do you guys have any idea of what might be? or a way to see what is causing the bug?

high gale
#

No idea what it might be, but yes idea on how you could investigate it. Attach the debugger and break when the freeze happens. Inspect the actively working threads to identify what might be blocking. It's likely an infinite loop/recursion somewhere.

gilded mirage
#

you mean attach the debugger to the build?

#

or to the editor?

high gale
#

To the editor of course. It's the editor freezing, no?

gilded mirage
#

yep, gonna try that

gilded mirage
#

Its my first time using the actual debugger from Visual Code, I have no idea of what i'm doing, I managed to attach tho

high gale
#

Visual code?

#

You mean vs code?

#

VS (not code) might be a bit simpler for a beginner.

#

Vs would have an "attach to unity" option on the toolbar or the debug menu.
Once you attach, hit break all(the pause button).

gilded mirage
high gale
#

Yep, that could be an infinite loop

gilded mirage
#

I think this place needs a break after instantiating a replacement for the bugged Pool, instead, it's making a replacement, then verifying that the replacement is indeed active, and instantiating another, then verifying that the replacement of the replacement is also active and then... you get it.

#

but after playing around with the debugger, it's quite userful, don't know how I didn't used this before!

#

there is a bunch of packages that I need to creat a debug to find what the hell is inside of each, no I have a SEE IT ALL button

high gale
#

Debugger is bread and butter of programmers.

gilded mirage
#

;-;

high gale
gilded mirage
#

I didn't mean packages in that sense, I meant structs like info packages sent as parameters for a function

#

or classes, I keep using both a lot

#

Anyway, this thing got to my nerves, gonna build a little boat game to see if I get better,,, if it freezes I'm gonna jump of a bridge!