NodeCanvas Forums › Support › Crash Build PS4
Hi,
I got a crash when I build on PS4 IL2CCP .NET 4 with stripping level set to medium (low is ok).
I test on a small repro project where there is only NodeCanvas and I create an empty scene with a BeehaviourTreeOwner and a small tree.
Callstack of the crash:
1 2 3 4 5 6 7 8 9 10 11 |
> Il2CppUserAssemblies.prx!Node_t4845F6C9F9F2D7745581E29ADF3A5704FD617C31::get__outConnections_8() Line 10902 C++ Il2CppUserAssemblies.prx!Node_get_outConnections_mB5FCE4C0499C75AE9445AC3333E1946A24F6CDB0(Node_t4845F6C9F9F2D7745581E29ADF3A5704FD617C31* __this=0x0000000000000000, const RuntimeMethod* method=0x0000000000000000) Line 35545 + 9 bytes C++ Il2CppUserAssemblies.prx!GraphSerializationData_Reconstruct_mC4C0202D10D5E00999E581BE46871339E8AAEC45(GraphSerializationData_t829AEB0AF87D1FB9096664B77AA412241582ED48* __this=0x00000002016fd480, Graph_tE82933FE4B960EC8F312F958E4BA4D786F5C9456* ___graph0=0x000000020363ef00, const RuntimeMethod* method=0x0000000000000000) Line 35290 + 9 bytes C++ Il2CppUserAssemblies.prx!Graph_LoadGraphData_m29757FE4B83BC169AB3704BEDB9BC33A6DFBAA75(Graph_tE82933FE4B960EC8F312F958E4BA4D786F5C9456* __this=0x000000020363ef00, GraphSerializationData_t829AEB0AF87D1FB9096664B77AA412241582ED48* ___data0=0x00000002016fd480, bool ___validate1=false, const RuntimeMethod* method=0x0000000000000000) Line 29482 C++ Il2CppUserAssemblies.prx!Graph_Deserialize_mFE16D8751C40A95E1BB655918937E7765EF33ED0(Graph_tE82933FE4B960EC8F312F958E4BA4D786F5C9456* __this=0x000000020363ef00, String_t* ___serializedGraph0=0x0000000201701000, bool ___validate1=false, List_1_tCD96185FD5F1D3B1B54DC9BA0282B6D5A9BFA0E2* ___objectReferences2=0x0000000203a7a7e0, const RuntimeMethod* method=0x0000000000000000) Line 29389 + 37 bytes C++ Il2CppUserAssemblies.prx!Graph_Deserialize_m1BDAA0E8723862AE31EF12FABFEBE83330425679(Graph_tE82933FE4B960EC8F312F958E4BA4D786F5C9456* __this=0x000000020363ef00, const RuntimeMethod* method=0x0000000000000000) Line 29239 + 17 bytes C++ Il2CppUserAssemblies.prx!Graph_UnityEngine_ISerializationCallbackReceiver_OnAfterDeserialize_mDE6D74B1E314DE3F965908B605EF211408EB069B(Graph_tE82933FE4B960EC8F312F958E4BA4D786F5C9456* __this=0x000000020363ef00, const RuntimeMethod* method=0x0000000201782dc0) Line 29118 C++ Il2CppUserAssemblies.prx!RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017(Il2CppMethodPointer methodPointer=0x00000000808385d0, const RuntimeMethod* methodMetadata=0x0000000201782dc0, void* obj=0x000000020363ef00, void** args=0x00000007ee8af790) Line 14728 + 14 bytes C++ Il2CppUserAssemblies.prx!il2cpp::vm::Runtime::Invoke(const MethodInfo* method=0x0000000201782dc0, void* obj=0x000000020363ef00, void** params=0x00000007ee8af790, Il2CppException** exc=0x00000007ee8af728) Line 531 + 44 bytes C++ Il2CppUserAssemblies.prx!il2cpp_runtime_invoke(const MethodInfo* method=0x0000000201782dc0, void* obj=0x000000020363ef00, void** params=0x00000007ee8af790, Il2CppException** exc=0x00000007ee8af728) Line 973 + 21 bytes C++ |
PS: I tried to add [Preserve] attributes on Node like this but same issue:
1 2 |
[UnityEngine.Scripting.Preserve] private List<Connection> _outConnections = new List<Connection>(); |
Gavalakis please I need your help :3
Hello,
Hmm. Can you please try creating a link.xml file with the following contents and let me know if that solves the problem?
1 2 3 4 5 6 7 8 |
<linker> <assembly fullname="Assembly-CSharp"> <type fullname="NodeCanvas*" preserve="all"/> <type fullname="ParadoxNotion*" preserve="all"/> </assembly> </linker> |
You can place the this link.xml file in any folder you want in your project (or even the root Assets folder).
Having said that, and because IL2CPP is an AOT compilation, you may still encounter issues, which should be solved by Generating AOTClasses.cs and link.xml file through the Preferred Types Editor [DOCUMENTATION LINK].
Let me know if the above works for you.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Tank you that solved the issue but I modify some code because NodeCanvas is in the Plugins folder so not in Assembly-Csharp assembly.
1 2 3 4 |
<assembly fullname="Assembly-CSharp-firstpass" preserve="all"> <type fullname="NodeCanvas*" preserve="all"/> <type fullname="ParadoxNotion*" preserve="all"/> </assembly> |