Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.8.0
-
None
-
dfd70f4768b24b9885818e8df8fb9adffbe23477
Description
use inputpanel in dialog, if current input mode is chinese when close dialog, then the reload dialog will result in crash.
after dig into the code, I found it is caused by the relation of inputmethod and engine. when close and destroy dialog, the inputmethod will also destroy, but the selectionListModels in engine is still keeping datasource pointing to the destroyed inputmethod.
reload dialog will result in load data in selectionlistmodels, but crash when accessing datasource.
QVariant SelectionListModel::data(const QModelIndex &index, int role) const
Stack trace:
1 QtVirtualKeyboard::SelectionListModel::data selectionlistmodel.cpp 186 0x7fffd3118a4c 2 QModelIndex::data qabstractitemmodel.h 432 0x7ffff74705d6 3 QQmlDMAbstractItemModelData::value qqmladaptormodel.cpp 420 0x7ffff74705d6 4 QQmlDMCachedModelData::metaCall qqmladaptormodel.cpp 292 0x7ffff746fb4e 5 VDMModelDelegateDataType::metaCall qqmladaptormodel.cpp 249 0x7ffff7475d71 6 QMetaObject::metacall qmetaobject.cpp 299 0x7ffff70e168d 7 QQmlPropertyData::readPropertyWithArgs qqmlpropertycache_p.h 312 0x7ffff764e5d7 8 QQmlPropertyData::readProperty qqmlpropertycache_p.h 302 0x7ffff76486c7 9 loadProperty qv4qobjectwrapper.cpp 171 0x7ffff76486c7 10 QV4::QObjectWrapper::getProperty qv4qobjectwrapper.cpp 261 0x7ffff7648e44 11 QV4::QObjectWrapper::getQmlProperty qv4qobjectwrapper.cpp 376 0x7ffff764bf9b 12 QV4::QQmlContextWrapper::get qv4qmlcontext.cpp 212 0x7ffff75d823b 13 QV4::Object::get qv4object_p.h 345 0x7ffff758831f 14 QV4::ExecutionContext::getProperty qv4context.cpp 443 0x7ffff758831f 15 QV4::Runtime::method_getActivationProperty qv4runtime.cpp 720 0x7ffff7665af4 16 ?? 0x7fffca376c85 17 ??