0
Under Review

PS4 freeze at Unity splash screen

Yuyu 3 months ago updated by Lazlo Bonin (Lead Developer) 6 days ago 13 1 duplicate

Hi Bolt Team,

Our application gets stuck in the Unity splash screen at startup, I've deleted some of the Bolt units to make it work again, I'm not sure if the issue is related to THIS thread, but I didn't use any embed flow.

Since the problem happens before the application start, there's no information shown in the log file, I'm wondering whether there's a way we could know which piece of graph causes the freeze or any workaround suggested?

For instance, I've attached a screenshot from a simple graph which could reproduce the issue.


Just let me know if you need any additional info.

Thank you

Bolt Version:
1.4.3
Unity Version:
2019.1.4f
.NET Version:
4.0

Duplicates 1

Under Review

Hi Oliver,

Sorry you're experiencing this issue. This is the first I hear of this limitation. Unfortunately I can't realistically start refactoring FullSerializer to avoid recursion past a certain depth. The best I can tell you is that in Bolt 2, we're switching to OdinSerializer behind the scenes, which is faster, leaner, more stable and actively supported. If the issue persists even then, we can certainly reach out to Sirenix and see if they can do anything about it.

As a workaround, one thing I can suggest is moving some of your deep nesting hierarchy from embeds to macros. Macros are serialization roots, so they're serialized individually, even when nested in other graphs. This could reduce the serialization stack size significantly.

Let me know if I can be of any more help.

Thanks for the heads up, we're expecting to switch to Bolt 2 as soon as it is stable. Already figured it probably isn't changeable easily so I'll see if unity can provide a solution, because other IL2CPP platforms don't suffer from this issue.

The current solution is to not use any embedded graphs at all (even a very simple flat one embedded into a scene will not work).

I can confirm the issue is the same as described HERE, I got the same crash as Oliver's, but as I said, even by NOT using the embedded graph, it still occurs. like from the example, a simple super graph could also result the crash.

We raised the flag to Unity, while waiting for their fix, I would like to know if there are any further suggestions ?

Thank you

Just found out the crash call stack is close to THIS thread.

The call stack from my project is uploaded:

crash.txt

Under Review

Hi Yuyu,

Thanks for the report and the stack trace; sorry you're experiencing this issue.

It might be related to Oliver's thread, however it also sounds related to this very old issue. From a little bit of research, it sounds like like there is an infinite recursion inside the IL2CPP runtime, specifically inside the Type.GetMembers method (Il2CppUserAssemblies.prx!RuntimeType_GetMembers_). This hypothesis is coming from a reply in this Unity forum thread.

Unfortunately, I do not have a PlayStation devkit setup to test at hand. I just received one but it might be a few weeks until I can realistically get it running. 

Considering your reproduction steps are very clear and it's a very minimal project, can you send a bug report to Unity directly, mentioning our discussion here? (EDIT: Nevermind, you already did!) It does seem like a bug in their internal IL2CPP runtime, not in Bolt specifically.

Hi Oliver,

Just following up on this because a similar issue got reported. You didn't provide a stack trace or crash log initially, but does it sound like it could be related?

Yes, it's the same issue! I also tried to work around it by reducing call stack depths with inlining some fsSerializer methods but it hasn't worked out so we're having to wait for a engine fix.

Hi Oliver,

Ok thanks, merging the threads. Do you have any update on the issue submitted to Unity?

Hi Lazlo,

Glad you are back :) 

We finally decided to switch to Bolt 2 even we know it might not be stable at moment, but since we are still not far away from the start of out project, we didn't experience too much problem during the switch. 

It seems the feature of C# generation fixed the issue, I guess that's because of there's less deserialization since the logic is running directly over C#?

The only problems bothering us for now are 

1. it's hard to retrieve the graph variables declared inside the super units, these variables are generated within the graphData property of their parent, not sure this is a bug or not, but we could use object variables as a workaround.  THIS feature might resolve the problem, was it planned for v2.0.6 ?

2. Sometimes we would like to expose a parameter of Graph type, if Bolt could provide something like a "self graph" node that we can pass it to any nodes inside the current graph, it will help.

Thanks for the support. 


Hi Yuyu, 

That's veering a bit off topic, but yes, the variable system is getting completely overhauled in Alpha 6 with classes, so none of the current variable workflow will still be applicable.

+1

Just wanted to let everyone know this should be fixed in 2019.2.2f1 (see changelog "Kernel: Fixed player crash due to stack overflow in Loading.PreloadManager thread (1162496, 1174959)"), but I didn't came around to confirm it for myself yet.

Hi Oliver, thanks for the follow up! Please do let us know whenever you get around to testing it in your project, it would be great if the linked fix worked.