Skip to content

debug assert in walletcontroller.cpp in func getOrCreateWallet, if thread is not gui #18835

@tarboss

Description

@tarboss

hello guys,

code to inspect:
wallet_model->moveToThread(thread());
wallet_model->setParent(this)

fires on my machine under visual studio 2017, Qt 5.9.7 a debug assert, if thread is from QTimer::singleShot. if u roll back the code with the slot implementation, then u have no problems. On release it works, but u have a bad feeling.

here is the orginal error msg:
GUI: ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x351f1ec0. Receiver '' (of type 'WalletController') was created in thread 0x0x21a27c0", N:\Qt\Qtv5.9.7_src\qtbase\src\corelib\kernel\qcoreapplication.cpp, line 563

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions