"theme_path" was getting a corrupted value as a result of
the snippet below:
const char* theme_path = selection_handles_edj.AsUTF8Unsafe().c_str();
My theory is that the temporary shadow std::string variable
resulting of the call to AsUTF8Unsafe was getting unpredictably
deleted, and the c_str pointer held in "theme_path" gets its
content corrupted.
As theme_path is passed as a path to edje_xxx APIs, this was
causing selection handles to randomly fail to show.
Bug reproduces on both desktop and mobile builds.
Original beta/m42 patch:
- http://165.213.202.130/gerrit/#/c/88401/ , reviewed by
DONGJUN KiM, arno renevier.
Reviewed by: a.renevier
Change-Id: I34024d7341d29de6c1ad778747fb348c240e998c
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
base::FilePath selection_handles_edj =
edj_dir.Append(FILE_PATH_LITERAL("SelectionHandles.edj"));
- const char* theme_path = selection_handles_edj.AsUTF8Unsafe().c_str();
+ std::string theme_path = selection_handles_edj.AsUTF8Unsafe();
const char* group = GetEdjeObjectGroupPath(type);
- if (edje_file_group_exists(theme_path, group)) {
- edje_object_file_set(handle_, theme_path, group);
+ if (edje_file_group_exists(theme_path.c_str(), group)) {
+ edje_object_file_set(handle_, theme_path.c_str(), group);
}
edje_object_signal_emit(handle_, "edje,focus,in", "edje");