-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qml: pyqtSlots which return a result are returning garbage when an exception occurs, resulting in unpredictable behavior #8358
Comments
Hmm can't reproduce, with the patch above I'm getting a proper exception screen and no enabling of the Next button |
Hmm, weird.
I was testing on desktop linux -- but have now tried on android and can reproduce there as well. |
Now I can reproduce.. weird. It's almost as if the exception case returns a random memory location as the result (?) I couldn't find anything in the PyQt docs describing this scenario, so I'm afraid we just have to |
removed from 4.4.2; we don't have to fix this now. but it is extremely weird and somewhat worrying |
It is weird, but at least the exception handler kicks in. Most applications terminate in such cases, but we are keeping the UI running as if nothing happened. Maybe we are too lenient there and we should terminate wallets and reset the UI in order to guard against undefined behavior after an uncaught exception. |
avoid the exception entirely 397019f |
well... I mean... 397019f is a workaround for the concrete example explained here, but I think there is a general issue re exception handling that might manifest itself in other places. We should keep this open and have a look when we have more time. |
Before commit f5f177f (so e.g. on the 4.4.0 tag), restoring from an old mpk (e.g.
e9d4b7866dd1e91c862aebf62a49548c7dbf7bcc6e4b7b8c9da820c7737968df9c09d5a3e271dc814a29981f81b3faaf2737b551ef5dcc6189cf0f8252c442b3
) in the qml wizard fails in a weird way:QEBitcoin.verifyMasterKey()
raises but theNext
button becomes enabled and the user can proceed (though there is another not relevant failure later in the wizard).Please test on master with the patch below.
Enter an xpub in the wizard, observe that
QEBitcoin.verifyMasterKey()
raises but in qml, this branch is not entered or there is no exception either, instead execution continues:electrum/electrum/gui/qml/components/wizard/WCHaveMasterKey.qml
Lines 37 to 39 in f5f177f
So I guess the pyqtSlot is turning the exception into True??
electrum/electrum/gui/qml/qebitcoin.py
Lines 108 to 109 in f5f177f
@accumulator please have a look
The text was updated successfully, but these errors were encountered: