Page MenuHomeFeedback Tracker

"str" command triggers "Circular reference found in HashMap" warning
Feedback, NormalPublic

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
Open
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.Tue, Dec 21, 6:54 AM
SaMatra updated the task description. (Show Details)Tue, Dec 21, 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.Tue, Dec 21, 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.Thu, Jan 6, 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