Segmentation fault on entering sector with enemies

Issue #128 resolved
Misanthopos created an issue

I am not sure why that happens (I forgot a second instance on ja2 running so maybe it is related to that), but it happens after setting troops to the map. The same happens if I went west from that sector....

HandleNewlyAddedItems (s=..., dirty_level=dirty_level@entry=0x8505750 <fInterfacePanelDirty>) at Build/Tactical/Interface_Items.cc:1476 1476 if (new_item_count == -2)

Somehow an empty (non existant soldier is addressed).

A saved game is attached (I tried the mod from-russia-with-love).

Comments (3)

  1. Misanthopos reporter

    so in Interface_Panels the function "void RenderSMPanel(DirtyLevel const dirty_level)" gets called buts SOLDIERTYPE& s = gpSMCurrentMerc; is NULL in this specific SaveGame. This should not happen but I don't know how it did......

    This workaround if ( &s == NULL) return; just after SOLDIERTYPE& s = *gpSMCurrentMerc; lets the game load normally and maybe has no negative sideeffects, but does not get to the root of the problem

  2. Log in to comment