Closed antoncxx closed 8 months ago
Following up, It seems like deleting model from the CSoundRender_Scene
object corrupts Game Level Object in memory.
I tried to compare memory dumps with and without xr_delete(M);
. between 2 points, which are the following:
...
Sound->set_geometry_occ(ObjectSpace.GetStaticModel(), ObjectSpace.GetBoundingVolume());
...
g_pGameLevel
object after that...
const shared_str level_name = g_pGameLevel->name();
...
In the first case, when ocllusion was set without model deletion, 2 dumps were identical: mem_dump_point_1_no_delete.txt mem_dump_point_2_no_delete.txt
In the second, which included model deletion, they match for 96.3% (I tried it several times and the percentages stayed the same), meaning that some region of it was overwritten. mem_dumb_point_2_delete.txt mem_dump_point_1_delete.txt
Worth mentioning, that I compared memory block, that started at g_pGameLevel
with length of 560472
bytes, which is the result of sizeof(CGameLevel)
on my machine.
Describe the bug Game crashes during level loading.
To Reproduce Steps to reproduce the behavior:
Expected behavior Game loads as usual
Screenshots, videos If applicable, add screenshots to help explain your problem.
BugTrap error report OpenXRay_error_report_240303-151450.zip
Desktop (please complete the following information):
Additional context
Just removing
xr_delete(M);
solves the issue.