#Build freezing while loading a new scene.

1 messages · Page 1 of 1 (latest)

left cliff
#

so, when the game starts everything on the menu is normal, until I click to go into the first map, then the following bug is notified and the game crash:

#

I do realize it's something with the localization, but I just don't know what, it's note referencing any of the codes I made, only tha package, gonna try some tests

#

also, this bug only happens in builds.

left cliff
#

why the localized register event is taking soo much?

#

there is a lot of wait for completion... the hell?

#

It keeps repeating the awake from the interface even though there is nothing that calls this

#

stopped the interface to see if the thing still happens, registerchangehandler still seem to be the problem

shell parrot
left cliff
#

Hi dlich, thanks for coming for the help again!

#

quite a long thread,

#

all going to garbage collection

#

before crashing this was the profiller

shell parrot
shell parrot
left cliff
#

interfacemanager is the class responsible to instantiate all the other interfaces

#

but even when I disable it, the bug still happens, so I don't know if this is the one responsible

shell parrot
#

Do yo subscribe or have anything set on localize string changed event?

#

It's very likely that you have a recursion because of that.

#

It might even be something assigned to a unity event in the inspector.

left cliff
left cliff
shell parrot
# left cliff what do you mean by... recursion?

Emm... Recursion. One of the basic concepts in programming. Basically where a function calls itself or some other function that in turn calls the first function, causing a sort of infinite loop if not done right.
The localization string event calls in the callstack strongly point to that.

left cliff
#

ohhh, didn't know the name in english

#

well, if it's this, the guy who will enlighten me on what this could be is the dev responsible for localization, if I find the solution will explain here.

shell parrot
hardy grove
# left cliff this

Preload.SingleStep is called at least 2 times in one stack from the screenshots. So there might be some point you can look at (or your responsible dev)

left cliff
#

didn't saw that, thanks! gonna see if this help me find a culprit

left cliff
#

Okay... day 3 of me attempting to fix this.

I've attempted preloading the localization system... didn't work.
I've removed every single thing that reference a localized string or localized event... didn't work.
I've tried removing the allways preload on the settings... didn't work.
I've tried a bunch of combinations of settings on the localization system... didn't as well.
Didn't find anything with the single step double call...

I will now start removing every single object in the scene until a culprit is found... if I don't... I'm gonna cry.

shell parrot
left cliff
#

I fell like that too, but it was working before, I don't know why this is happening now, if it's not in the code, it must be a internal problem from the localization system

#

but also, it's not in the other scenes who also use the localization, so it might be a specific thing that is using the localization

shell parrot
left cliff
#

I don't know if this will help much, becouse it will be 3 months since we last tried to build the game, and there was a lot of commits between

#

and anything that calls the localization system I removed already

#

soo... I DON'T KNOW WHY THIS WORLD HATE ME

shell parrot
left cliff
#

define: callstack

#

... I don't know how to verify this

shell parrot
#

Does it freeze during the building process?

left cliff
#

nop

shell parrot
#

During build launch?

left cliff
#

only during the transiction scene from menu to the first scene

#

the frist mission*

#

the first mission

#

aaaaa

shell parrot
#

OK, then it's very simple. Attach the debugger, reproduce the issue. If it doesn't break automatically, break manually. Investigate the thread callstacks.

#

Mainly you want to see whta the main thread is doing.

left cliff
#

how do I... investigate the thread callstack?

#

I know this mind sound stupid... I might be stupid

shell parrot
#

Depends on your ide.
VS has threads and parallel stacks debug windows, as well as a thread picker at the tool bar.

left cliff
#

hmmm, gonna try.

shell parrot
#

But it's very likely it will break on the main thread anyway(or rather with the main thread selected).

left cliff
#

there is... a lot of threads

shell parrot
#

During the freeze.

#

Vs code debugger can be a bit difficult for a beginner compared to VS

left cliff
#

frozen

shell parrot
#

You need to break

#

It's the third time I'm saying that.

left cliff
#

ohhh, I thought you meant like, breaking the game

#

sorry

shell parrot
#

In the debugger. Otherwise you're not really using it.

deep dawn
#

Is it known which code is the problem?

#

I would have embedded my code in the dlls a long time ago

#

Well, just guessing doesn't make much sense if there is a call stack

left cliff
# deep dawn Is it known which code is the problem?

I have no Idea, it mentions this one UnityEngine.Localization.Operations.WaitForCurrentOperationAsyncOperationBase`1<UnityEngine.Localization.Tables.StringTable>:InvokeWaitForCompletion () (at ./Library/PackageCache/com.unity.localization@62db12c43c5c/Runtime/Operations/WaitForCurrentOperationAsyncOperationBase.cs:20)

#

I also found out I wasn't debugging the player, but the game, found out how to debug the player now tho

left cliff
#

yep

#

one of the many

#

some mentions InterfaceManager, but the thing is... even when I remove it, the bug still there

#

there are more logs up in the discussion

deep dawn
#

Or throw exception for test

#

For example stop recursion

#

You know class name you can just find it

shell parrot
#

Just use the debugger properly already.

#

Did you manage to break during a freeze?

#

You need to learn how to use the debugger. It's an essential tool for a developer.

left cliff
#

I know, I'm trying to find the class to put the breakpoint

#

ohhhhh, now that will be userful,

shell parrot
left cliff
#

there is a break all?

#

gonna see if I can find it

shell parrot
left cliff
#

;-; I've gonna see this tomorrow, currently my mind is tired

#

but, I'm finding something, something... unexpected

#

the bug seems to be coming from the... CONSTRUCTION HOLOGRAM??? WHYYYYY?, every continue goes back to the loop and the construction hologram, goddammit

#

ohh, wait... its running now... I think... it was something I deleted

#

okay, 8 hours of work without pause I will... sleep now, thanks for the help guys, gonna see the video tomorrow, and then return with the feedback

#

and the patience...

deep dawn
#

The main thing is to build more often next time so that you know where you can roll back

#

DOTS may not work in the build for absolutely any reason, but at the same time everything will work in the editor

#

I once had a build that just crashed for no reason because the Burst code compiled incorrectly

shell parrot
left cliff
#

saw the debugger tutorial, didn't explained how to do a break it all, or I didn't look properly... then I clicked pause, and entered the thread I entered early, boom, I'm in the code!

#

I fell like I gained a neuron... then I fell like this was dumbly simple, and now I'm depressed

#

this is where the endless circle is happening

shell parrot
shell parrot
left cliff
#

still here, was stepping over it, there is at least 7 steps this circle

#

I mean... there are things happening inside this

shell parrot
#

Not stepping. Unpause, wait a few sec and pause again.

shell parrot
left cliff
#

back again

#

Debug.Assert(!m_Waiting, "Calling WaitForCompletion on an operation that is already waiting.");

#

the same thing on the logs in the start

shell parrot
#

Is your interface manager loaded from an asset bundle?

#

I think the issue is that something that was in an asset bundle also triggers an asset bundle(possibly the same one) load from it's awake or OnEnable causing an infinite recursion.

#

Here you can see that the interface manager is loaded from an asset bundle.
Check the localization component on enable to see what gameobject it's own(check gameobject name field).
It would also help to look deeper in the callstack to understand what happens earlier.

left cliff
#

but then why this bug keeps happening when I remove the interface instantiation? gona try the test again

#

ok, I realized there is at least two things in the scene triggering this loop, something the interface manager is instantiating that I'm gonna, but there is something on the level of the game, see what the debugger show

#

THE LOCALIZESTRINGEVENT? how do I fix this then?

#

I'm gonna hope that is a specific object,

#

hmmm, I love a null object calling a enable

shell parrot
left cliff
#

... they... call the things... that call the infinite circle

shell parrot
#

I don't see the assert in these callstacks though

left cliff
#

no?? wait, I think I sended you the wrong print, one second

shell parrot
#

And anyways, you should start from pausing during the freeze. Don't place breakpoints. You want to know what's going on during the freeze.

#

When there is no interface manager.

left cliff
#

that is what I'm doing

#

and will do... tomorow I'm tired now, gonna play a bit of DRG and go to sleep, thanks for being with me on this little adventure of mine

#

honestly, I'm just happy that the way it's going I'm not gonna have to rework the localization system, that would make me cry

#

also, here is the assert

left cliff
shell parrot
left cliff
#

am I right to belive that the one calling the method is null?

#

becouse, I would be happy to know if it carries some kind of ID for me to find the one who bugged in the scene

shell parrot
#

If you can reproduce that particular callstack, I'd look at "this" properties for more info.

left cliff
#

I will do this in 2 hours from now, I need to help with lunch

left cliff
#

sooo... I found the culprit, don't know why, but it was the localizestringevent that have the WaitForCompletion marked and are enabled on the start of the scene, don't know why still tho, but I have a Fix, what makes me happy

#

this is weird, there are more localizestringevent with wait for completion but it seems that only this one from this specific object is causing the bug, can't find what it carries that makes this one special from the others

#

I need now to find the exact interface

#

see if just removing the wait for completion solves the problem

left cliff
#

FIXED, AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

debugger tool was userful to find the specific interfaces to change, hope I don't deal with possible negative consequences of this change!

#

thanks for the help guys!!!