Page MenuHomeFeedback Tracker

onButtonClick EH can crash the game
Closed, ResolvedPublic

Description

If anything comes after ctrlDelete in the code of the EH, the game crashes. See repro. This might also be valid for other control EHs and even display EHs.

Details

Severity
Crash
Resolution
Won't Fix
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Execute in Eden Editor
 disableSerialization;
_ctrl = findDisplay 313 ctrlCreate ["RscButton", -1];  
_ctrl ctrlSetText "CLOSE"; 
_ctrl ctrlAddEventHandler ["buttonClick", { ctrlDelete (_this # 0); systemChat "CRASH!"; }];

Event Timeline

R3vo created this task.May 16 2021, 10:07 AM
R3vo edited Steps To Reproduce. (Show Details)
R3vo updated the task description. (Show Details)May 16 2021, 11:04 AM
dedmen added a subscriber: dedmen.Jun 9 2021, 1:16 PM

your event needs to return false if you want to prevent further EH trigger
it tries to trigger buttonclick EH of parent, but its gone so it cannot see its own parent

dedmen closed this task as Resolved.Jun 9 2021, 1:17 PM
dedmen changed Resolution from Open to Won't Fix.