The problem is with the synchronization of array<Class>. After synchronization, the client cannot access the data of the array objects. The array can be indexed, you can access the object data via the Print() function, but when trying to use the object data from masive in the code, the error "NULL pointer to instance when trying to access variable "object" (Parent instance is null)" occurs. This problem is observed only from the client side.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 11 x64
- Category
- General
Steps To Reproduce
Accessing array<Class> immediately after successful synchronization of the client with the server:
for(int i =0;i<k_clan.Count();i++) // normal.
{ Print("/////////" +array_name.Get(i).data_name); // normal. anyfunction(array_name.Get(i).data_name) // "NULL pointer to instance when trying to access variable "data_name" (Parent instance is null)" Class obj = array_name.Get(i) // crash client Class obj = Class.Cast(array_name.Get(i)) // normal any use: obj.data_name // "NULL pointer to instance when trying to access variable "data_name" (Parent instance is null)" }
Everything is working fine from the server side.