u1db-qt-example-5.qml crashes

Bug #1168034 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
U1DB Qt/ QML
Fix Committed
Critical
Kevin Wright

Bug Description

Looking at http://bazaar.launchpad.net/~uonedb-qt/u1db-qt/trunk/view/head:/examples/u1db-qt-example-5/u1db-qt-example-5.qml as of today (revision 67), the example is supposed to demonstrate the use of the Query and Index components, but in fact it doesn’t demonstrate anything useful, as the query that is instantiated doesn’t have its 'query' property set (it’s commented out), so it doesn’t filter anything, and just returns the whole contents of the database.

If I uncomment line 76, then when running the example in qmlscene I get a segmentation fault, with the following backtrace:

#0 0x00007fffd73e6850 in U1db::Index::getDatabase() () from /usr/lib/libu1db-qt5.so.3
#1 0x00007fffd73e9eb0 in U1db::Query::onDataInvalidated() () from /usr/lib/libu1db-qt5.so.3
#2 0x00007fffd73ea4fb in U1db::Query::setQuery(QVariant) () from /usr/lib/libu1db-qt5.so.3
#3 0x00007fffd73eafea in U1db::Query::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libu1db-qt5.so.3
#4 0x00007ffff750bea0 in QQmlVME::run(QList<QQmlError>*, QQmlVME::Interrupt const&, void* const**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#5 0x00007ffff751092b in QQmlVME::execute(QList<QQmlError>*, QQmlVME::Interrupt const&) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6 0x00007ffff74fff06 in QQmlComponentPrivate::beginCreate(QQmlContextData*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7 0x00007ffff74fde54 in QQmlComponent::create(QQmlContext*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8 0x0000000000403e16 in ?? ()
#9 0x00007ffff56d3ea5 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x000000000040629d in ?? ()

Related branches

Revision history for this message
Kevin Wright (kevin-wright-1) wrote :

The U1db.Query property "query" does not yet work as it is under development (which is why it is commented out in the example). This will be at least a few more days before the Query capabilities are working properly.

What the example demonstrates is more the functionality of the U1db.Index element, such as how to find records based on fields and sub-fields. Once Query has the "query" property working properly then exact match and wildcard searches will be possible, in addition to working together with the Index element.

It does not necessarily return the entire database, depending on the strucure of the documents in the database. If there is very little data then it might appear so, but if the structure of the data is more complex, and there is more data it is much more obvious that not the entire database is being returned.

Changed in u1db-qt:
importance: Undecided → Critical
assignee: nobody → Kevin Wright (kevin-wright-1)
milestone: none → 0.33
status: New → In Progress
Changed in u1db-qt:
status: In Progress → Fix Committed
Cris Dywan (kalikiana)
summary: - u1db-qt-example-5.qml doesn’t demonstrate anything useful
+ u1db-qt-example-5.qml crashes
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:u1db-qt at revision 69, scheduled for release in u1db-qt, milestone 0.33

Revision history for this message
Kevin Wright (kevin-wright-1) wrote :

u1db-qt-example-5.qml will only crash if the Query element's 'query' property is set (in the example it is commented out) and revision 69 has not been installed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.