out of memory when creating db in non existent directory

Bug #1390166 reported by Michał Karnicki
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Telegram app
Fix Released
Critical
Unassigned
U1DB Qt/ QML
In Progress
Critical
Cris Dywan
u1db-qt (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

U1db-qt runs out of memory when creating a database in a directory that doesn't exist. That makes little sense in context of click apps, who's .config/<package name!> doesn't not exist by default.

I.e. if I indicate I want a database in /home/phablet/.config/com.ubuntu.telegram/settings.u1db, I believe u1db-qt should do something along mkdir -p. You may, or may not, agree with me on that part. But it shouldn't fail with out of memory regardless.

u1db: Failed to open /home/phablet/.config/com.ubuntu.telegram/settings.u1db: out of memory Error opening database
file:///opt/click.ubuntu.com/com.ubuntu.telegram/0.8.12.73/telegram.qml:311: TypeError: Cannot read property 'phoneNumber' of undefined // because the db doesn't exist

Tags: rtm14

Related branches

Michał Karnicki (karni)
Changed in libqtelegram:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → m9
Cris Dywan (kalikiana)
Changed in u1db-qt:
status: New → Confirmed
assignee: nobody → Christian Dywan (kalikiana)
importance: Undecided → Critical
Cris Dywan (kalikiana)
Changed in u1db-qt:
status: Confirmed → In Progress
Dave Morley (davmor2)
tags: added: rtm14
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package u1db-qt - 0.1.5+15.04.20141111~rtm-0ubuntu1

---------------
u1db-qt (0.1.5+15.04.20141111~rtm-0ubuntu1) 14.09; urgency=low

  [ Christian Dywan ]
  * Create parent folder for full database path (LP: #1390166)
 -- Ubuntu daily release <email address hidden> Tue, 11 Nov 2014 15:27:42 +0000

Changed in u1db-qt (Ubuntu RTM):
status: New → Fix Released
Michał Karnicki (karni)
Changed in libqtelegram:
status: Confirmed → Fix Released
Revision history for this message
Aaron Hastings (thecosmicfrog) wrote :

I'm running into this problem too. It's fairly critical as my app relies on U1DB and crashes on startup as a result.

I get the following output when running my app on the Ubuntu emulator:

Sdk-Launcher> Application started: 17278
u1db: Failed to open /home/phablet/.local/share/org.thecosmicfrog.dublinwheels/dublinwheels.u1db: out of memory Error opening database
QIODevice::read: device not open
tile request error "Problem with tile image"
UbuntuWindow::handleSurfaceFocusChange(focused=true)
UbuntuWindow::handleSurfaceResize(width=480, height=770)
QIODevice::write: device not open
Sdk-Launcher> Received a failed event
Sdk-Launcher> The Application exited, cleaning up
Sdk-Launcher> Finished

Is there some sort of workaround or alternate form of persistance I should be using?

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.