Page MenuHomeFeedback Tracker

onUnload handler of rscTitles nested classes is never called
Feedback, WishlistPublic


Removing the current rscTitles resource should call onUnload of that resource. Please read steps to reproduce.


Legacy ID
Have Not Tried
Operating System
Windows 7
Steps To Reproduce

0. Create myClass in rscTitles, add onUnload to myClass

  1. ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
  2. Execute the code from step 1 again, onUnload is not called (onLoad called twice at this point) <<<--- BUG HERE
  1. ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
  2. ("myClass" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; - layer removed (please read Killzone_Kid's comment about cutText here - ), but onUnload is not called <<<--- BUG HERE
  1. ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
  2. ("myClass" call BIS_fnc_rscLayer) cutRsc ["Default","PLAIN"]; - layer removed, but onUnload is not called <<<--- BUG HERE

Event Timeline

sms edited Steps To Reproduce. (Show Details)Sep 2 2014, 11:06 AM
sms edited Additional Information. (Show Details)
sms set Category to Scripting.
sms set Reproducibility to Have Not Tried.
sms set Severity to None.
sms set Resolution to Open.
sms set Legacy ID to 3323827118.May 7 2016, 7:21 PM
Bohemia added a subscriber: sms.Sep 2 2014, 11:06 AM

Confirmed. It looks like both unloads (config and scripted) are broken:

class rsctitles
class rsc

		idd = 12345;
		onload = "_d = _this select 0; _d displayAddEventHandler ['unload', {player sidechat 'unload scripted'}]; player sidechat str ['load', _d, finddisplay 12345];";
		onunload = "player sidechat 'unload config'";
		fadein = 0;
		fadeout = 0;
		duration = 5;
		class controls
			class text: rscText
				idc = 12345;
				text = "okwerewrewrewr";
				x = 0;
				y = 0;
				w = 1;
				h = 1;


sms added a comment.Sep 2 2014, 1:57 PM

Killzone_Kid: Thanks for you comment. Btw, I think onUnload should be also called after 'duration' seconds.

It should as if you run test on created display it ceases to exist after indicated duration. The interesting thing is, although display is created, it cannot be found with finddisplay, I think this is the reason "unload" is not fired.

Still needs a fix

BIS_fnc_KK updated the task description. (Show Details)
BIS_fnc_KK edited Steps To Reproduce. (Show Details)
BIS_fnc_KK edited Additional Information. (Show Details)
BIS_fnc_KK set Operating System to Windows 7.
This comment was removed by BIS_fnc_KK.
BIS_fnc_KK changed the task status from Reviewed to Need More Info.Jun 13 2022, 8:39 AM
BIS_fnc_KK changed the task status from Need More Info to Assigned.Jun 13 2022, 8:56 AM

Should be fixed in 149513

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jun 13 2022, 11:26 AM
BIS_fnc_KK changed the task status from Assigned to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.