Comment 4 for bug 1192049

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Attached merge request fixes this.

Turns out, maliit-server destroys QtQuickView's rootObject(). I guess that's needed to hide the OSK properly and destroying the whole QtQuickView might not be feasable.

Chris Lee asked me to write a summary how I managed to debug this:

- edited /etc/device-services and removed maliit-server from there
- rebooted the phone
- run maliit-server manually with -testability
- run the python script to reproduce
- installed qdbus-qt5 to be able to reproduce this with a single introspect command:
# qdbus :1.134 /com/canonical/Autopilot/Introspection GetState /maliit-server/QQuickView/Keyboard[id=5]
- run maliit-server in gdb (which just confirmed what Chris Gagnon posted - QtNode::GetName() is the culprit)
- cloned and compiled autopilot-qt on the phone to be able to easily run modified versions with
# LD_LIBRARY_PATH=/path/to/builddir maliit-server -testability
- figured that qDebug() prints are not printed for some reason => tried qWarning() => works!
- asked Thomas, turns out you can enable qDebug() too with "export MALIIT_DEBUG=true"
- hammered in debugs all over the place until I eventually found that QtNode::GetChildren returns a 0-pointer when returning view->rootObject().
=> fixed it.