Page MenuHomeFeedback Tracker

"str" command triggers "Circular reference found in HashMap" warning
Closed, ResolvedPublic

Description

Referencing a hashmap inside a hashmap twice and calling str command on it triggers "Circular reference found in HashMap" warning.

Details

Severity
Minor
Resolution
Fixed
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Execute script:

_hm1 = createHashMap;
_hm2 = createHashMapFromArray [[1,_hm1],[2,_hm1]];
copyToClipboard str _hm2;

Observe the warning in RPT.

Additional Information

RPT output:

12:47:20 Warning Message: Circular reference found in HashMap, this will cause a memory leak!
12:47:20  ➥ Context: Hash Key: 2

str output:

[[1,[]],[2,!!HashMap circular reference!!]]

Event Timeline

SaMatra created this task.Dec 21 2021, 6:54 AM
SaMatra updated the task description. (Show Details)Dec 21 2021, 6:56 AM
SaMatra edited Steps To Reproduce. (Show Details)
SaMatra edited Steps To Reproduce. (Show Details)
Tenshi changed the task status from New to Reviewed.Dec 21 2021, 12:41 PM
Tenshi set Ref Ticket to Internal Ref.: AIII-54855.
Tenshi added a subscriber: Tenshi.

Thank you for reporting the issue.
We will see what we can do.

dedmen changed the task status from Reviewed to Feedback.Jan 6 2022, 11:52 AM
dedmen added a subscriber: dedmen.

Whoops, the recursion check didn't clean up after itself.
This happens everytime the same hashmap is referenced more than once in a hashmap.

Fixed next week dev branch

Fixed as of 2.10, please set to resolved.

BIS_fnc_KK closed this task as Resolved.Aug 28 2022, 8:31 AM
BIS_fnc_KK changed Resolution from Open to Fixed.