Page MenuHomeFeedback Tracker

UI EventHandler LBDblClick cause crash
Closed, ResolvedPublic

Description

I try to use this code to add a magazine when double click on a magazine in inventory :

[] spawn {

  test_fnc_test = {
  _idc = ctrlIDC (_this select 0);
  _selectedIndex = _this select 1;
  _unit = player;
  _item = lbData [_idc, _selectedIndex];

  if (_item isEqualTo "30Rnd_556x45_Stanag") then {
      player removePrimaryWeaponItem "30Rnd_556x45_Stanag";
      player addPrimaryWeaponItem "30Rnd_556x45_Stanag";
  };

  };

  while {true} do {
    waituntil {!(isnull (finddisplay 602))};
    ((findDisplay 602) displayCtrl 638) ctrlSetEventHandler ["LBDblClick", "_this call test_fnc_test"];
    waituntil {isnull (finddisplay 602)};
  };
};

And the first time, I try, it's work. But when I retry (close inventory and reopen) >> Game Crash
But when I use "LBSelChanged" instead of "LBDblClick", it's works fine.

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
10.0.14393
Category
Game Crash
Steps To Reproduce

Create mission, use the script in the description in init.sqf . And use soldier with arifle_SPAR_01_blk_F, open inventory, double click on magazine "30Rnd_556x45_Stanag" in vest. Close inventory, reopen, and double click on magazine in vest. And crash...

Additional Information

Event Timeline

Seem to be resolved. You can close the ticket.

Wulf closed this task as Resolved.Feb 27 2018, 12:22 PM
Wulf claimed this task.