Crash on scrolling/unfolding of treeview implemention based on AUI_DECLARATIVE_FOR
@malik1988 thank you, I confirm the crash. Please give me some time to investigate the issue.
(sry for long response)
You're welcome.
I might have found the problem. I won't create a PR for now because my connection to GitHub is very unstable.
Here are the changes:
- first is in
contentTree function has to treat empty for nodes, already updated in TreeView Project name 'aui.example.tree'
- after that a crash will still occur. The reason for this error is that the size of mCache and views are inconsistent. The specific fix is as follows:
//codes in aui.views/src/AUI/View/AForEachUI.cpp line: 299
void AForEachUIBase::addView(List::iterator iterator, AOptional<std::size_t> index) {
if (!mCache) {
mCache.emplace();
} else {
AUI_ASSERT(getViews().size() == mCache->items.size());
}
Cache::LazyListItemInfo entry { *iterator };
if (index) {
AViewContainerBase::addView(*index, entry.view);
} else {
AViewContainerBase::addView(entry.view);
}
auto at = mCache->items.end();
if (index) {
at = mCache->items.begin() + *index;
}
entry.iterator = std::move(iterator);
mCache->items.insert(at, std::move(entry));
}
Originally posted by @malik1988 in #706
Memory leak
Found memory leak in large lists.
Crash on scrolling/unfolding of treeview implemention based on AUI_DECLARATIVE_FOR
Originally posted by @malik1988 in #706
Memory leak
Found memory leak in large lists.