Priority: Not specified
Affects Version/s: None
Fix Version/s: None
Component/s: Core Libraries
The code in environment.cpp that caches component information, and then returns iterators for various types of objects in the cache could hit problems if the cache is updated (and cleared) whilst an iterator is being walked.
See any of the ByIndex(..) methods in environment.
I think there may also be related issues when looking up a single item due to the way the returned item references the dali info without cloning it (or fetching it all) meaning it could become stale before used.
Comment from related JIRA (
there's slight issue to this and all the other similar iterators..
If the environment updates whilst iterating, then the results will be indeterminate.
Not something to tackle now, but I suspect the way this should work, is to gather them into lists, once (e.g. on 1st request) - then the contents of the list at iterator construction time, so underlying list can be rebuild if env. changes without effecting the iterator.
It would also be more efficient this way, as generally doesn't change often and it wouldn't have to be recreating an environment factory/openEnvironment etc., every time an interator was required.