Skip to content
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

Crash while opening an Android contacts db #1687

Closed
10 tasks
cmvizitiu opened this issue Dec 24, 2018 · 5 comments
Closed
10 tasks

Crash while opening an Android contacts db #1687

cmvizitiu opened this issue Dec 24, 2018 · 5 comments

Comments

@cmvizitiu
Copy link

cmvizitiu commented Dec 24, 2018

Details for the issue

Fedora 28, sqlitebrowser-3.10.1-5 (from Fedora repo)
Brought a contacts2.db from Lineage OS 15.1 (Android 8.1) (file claims it to be SQLite 3.x database, user version 1202, last written using SQLite version 3019004) and application crashes immediately with no error message (even when launched from terminal).

Useful extra information

 systemd-coredump[15027]: Process 12451 (sqlitebrowser) of user 1000 dumped core.
                                                     
                                                     Stack trace of thread 12451:
                                                     #0  0x0000559fd85c2d75 _ZN5antlr11ASTRefCountINS_3ASTEED2Ev (sqlitebrows
er)
                                                     #1  0x0000559fd8530460 _ZN13Sqlite3Parser4exprEv.cold.88 (sqlitebrowser)
                                                     #2  0x0000559fd85f7668 _ZN13Sqlite3Parser11createtableEv (sqlitebrowser)
                                                     #3  0x0000559fd85bf767 _ZN4sqlb5Table8parseSQLERK7QString (sqlitebrowser
)
                                                     #4  0x0000559fd85c014b _ZN4sqlb6Object8parseSQLENS0_5TypesERK7QString (s
qlitebrowser)
                                                     #5  0x0000559fd85a46c4 _ZN11DBBrowserDB12updateSchemaEv (sqlitebrowser)
                                                     #6  0x0000559fd85aa143 _ZN11DBBrowserDB4openERK7QStringb (sqlitebrowser)
                                                     #7  0x0000559fd8578d74 _ZN10MainWindow8fileOpenERK7QStringbb (sqlitebrow
ser)
                                                     #8  0x0000559fd8579237 _ZN10MainWindow16fileOpenReadOnlyEv (sqlitebrowse
r)
                                                     #9  0x0000559fd8632881 _ZN10MainWindow18qt_static_metacallEP7QObjectN11Q
MetaObject4CallEiPPv (sqlitebrowser)
                                                     #10 0x00007fd35f484e1e _ZN11QMetaObject8activateEP7QObjectiiPPv (libQt5C
ore.so.5)
                                                     #11 0x00007fd35fd4ec26 _ZN7QAction9triggeredEb (libQt5Widgets.so.5)
                                                     #12 0x00007fd35fd512f0 _ZN7QAction8activateENS_11ActionEventE (libQt5Wid
gets.so.5)
                                                     #13 0x00007fd35fec647c _ZN12QMenuPrivate19activateCausedStackERK7QVector
I8QPointerI7QWidgetEEP7QActionNS7_11ActionEventEb (libQt5Widgets.so.5)
                                                     #14 0x00007fd35fecdb24 _ZN12QMenuPrivate14activateActionEP7QActionNS0_11ActionEventEb (libQt5Widgets.so.5)
                                                     #15 0x00007fd35feceb6b _ZN5QMenu17mouseReleaseEventEP11QMouseEvent (libQt5Widgets.so.5)
                                                     #16 0x00007fd35fd945c8 _ZN7QWidget5eventEP6QEvent (libQt5Widgets.so.5)
                                                     #17 0x00007fd35fed121b _ZN5QMenu5eventEP6QEvent (libQt5Widgets.so.5)
                                                     #18 0x00007fd35fd55475 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5)
                                                     #19 0x00007fd35fd5cdd8 _ZN12QApplication6notifyEP7QObjectP6QEvent (libQt5Widgets.so.5)
                                                     #20 0x00007fd35f45cc36 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5)
                                                     #21 0x00007fd35fd5c0cd _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb (libQt5Widgets.so.5)
                                                     #22 0x00007fd35fdaf723 _ZN13QWidgetWindow16handleMouseEventEP11QMouseEvent (libQt5Widgets.so.5)
                                                     #23 0x00007fd35fdb1f0e _ZN13QWidgetWindow5eventEP6QEvent (libQt5Widgets.so.5)
                                                     #24 0x00007fd35fd55475 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5)
                                                     #25 0x00007fd35fd5cb90 _ZN12QApplication6notifyEP7QObjectP6QEvent (libQt5Widgets.so.5)
                                                     #26 0x00007fd35f45cc36 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5)
                                                     #27 0x00007fd35f802f43 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE (libQt5Gui.so.5)
                                                     #28 0x00007fd35f805085 _ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE (libQt5Gui.so.5)
                                                     #29 0x00007fd35f7e046b _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Gui.so.5)
                                                     #30 0x00007fd34f3e97cf _ZN22QPAEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5XcbQpa.so.5)
                                                     #31 0x00007fd35f45bb7b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #32 0x00007fd35f463c46 _ZN16QCoreApplication4execEv (libQt5Core.so.5)
                                                     #33 0x0000559fd85392d2 main (sqlitebrowser)
                                                     #34 0x00007fd35e52b11b __libc_start_main (libc.so.6)
                                                     #35 0x0000559fd85396da _start (sqlitebrowser)
                                                     
                                                     Stack trace of thread 12453:
                                                     #0  0x00007fd35e5f7429 __poll (libc.so.6)
                                                     #1  0x00007fd35a257bc6 g_main_context_iterate.isra.21 (libglib-2.0.so.0)
                                                     #2  0x00007fd35a257cf0 g_main_context_iteration (libglib-2.0.so.0)
                                                     #3  0x00007fd35f4ad293 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #4  0x00007fd35f45bb7b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #5  0x00007fd35f2c36b6 _ZN7QThread4execEv (libQt5Core.so.5)
                                                     #6  0x00007fd35f2ccb4b _ZN14QThreadPrivate5startEPv (libQt5Core.so.5)
                                                     #7  0x00007fd35e2f0594 start_thread (libpthread.so.0)
                                                     #8  0x00007fd35e601f4f __clone (libc.so.6)
                                                     
                                                     Stack trace of thread 12452:
                                                     #0  0x00007fd35e5f7429 __poll (libc.so.6)
                                                     #1  0x00007fd35809b04f _xcb_conn_wait (libxcb.so.1)
                                                     #2  0x00007fd35809ccaa xcb_wait_for_event (libxcb.so.1)
                                                     #3  0x00007fd34f3565a9 _ZN15QXcbEventReader3runEv (libQt5XcbQpa.so.5)
                                                     #4  0x00007fd35f2ccb4b _ZN14QThreadPrivate5startEPv (libQt5Core.so.5)
                                                     #5  0x00007fd35e2f0594 start_thread (libpthread.so.0)
                                                     #6  0x00007fd35e601f4f __clone (libc.so.6)
                                                     
                                                     Stack trace of thread 12454:
                                                     #0  0x00007fd35e5f7429 __poll (libc.so.6)
                                                     #1  0x00007fd35a257bc6 g_main_context_iterate.isra.21 (libglib-2.0.so.0)
                                                     #2  0x00007fd35a257cf0 g_main_context_iteration (libglib-2.0.so.0)
                                                     #3  0x00007fd35f4ad293 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #4  0x00007fd35f45bb7b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #5  0x00007fd35f2c36b6 _ZN7QThread4execEv (libQt5Core.so.5)
                                                     #6  0x00007fd34f04d7b9 _ZN22QDBusConnectionManager3runEv (libQt5DBus.so.5)
5)
                                                     #7  0x00007fd35f2ccb4b _ZN14QThreadPrivate5startEPv (libQt5Core.so.5)
                                                     #8  0x00007fd35e2f0594 start_thread (libpthread.so.0)
                                                     #9  0x00007fd35e601f4f __clone (libc.so.6)

I'm opening this issue because:

  • [ X ] DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: ___ )
  • [ X ] Linux: ( Fedora 28 )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.11.0-alpha1 or 3.11.0-beta*
  • [ X ] 3.10.1
  • Other: ___

I have also:

@justinclift
Copy link
Member

Interestingly. Does the database file open ok when using the sqlite cli on that Fedora version?

As a workaround for now, are you able to compile our application from source?

There's lots of bug fixes since the last release, so there's a pretty decent chance it'll work better. 😄

@MKleusberg
Copy link
Member

This crash is happening inside the SQL grammar parser, apparently even in the generated code. I'm not aware of any recent issues in this part of the code, but Justin is right that this might very well be fixed in the newest version of DB4S.

If you don't want to compile DB4S yourself for now, you can also send us the DB schema which doesn't contain any of the data. You can do so by opening the file using the sqlite3 command line tool and then exporting the schema:

$ cd /path/to/the/file
$ sqlite3 contacts2.db
.output schema.sql
.schema
.quit

Then paste the contents of the schema.sql file in here. With this file we can check if it is still crashing in newer versions and - if it does - look for the cause of the issue 😄

@cmvizitiu
Copy link
Author

Building from git solves the problem and CLI tool seems unaffected. Any chance we'll get a .spec to produce a rpm? o:-) One thing to note though is that the newly built version gives a warning:

"A table in this database requires a special collation function 'PHONEBOOK' that this application can't provide without further knowledge.
If you choose to proceed, be aware bad things can happen to your database.
Create a backup!"

... which warning was not presented to me by the (older) CLI tool.

Given these, do we still need the schema?

Oh and BTW: the warning window dialog I was referring to is titled "Collation needed! Proceed?" and it has two buttons: "No" "Yes". Since the warning was "be aware bad things can happen to your database" and the window's question was "proceed?" I thought pressing "No" would prevent the database from being opened; it didn't! After pressing "No" several times (with the dialog window being redrawn), the db was opened anyway. Should I file another bug or is this normal behavior?

@MKleusberg
Copy link
Member

Awesome! 😄 No need for the DB schema then.

As for the spec file: You can probably use the one from Fedora for that. It's in this package. But I have no idea how much you need to change besides the version number 😉

The collation warning is intended to work like this. But I agree that it is quite misleading. Maybe you can open another issue for that, so we don't forget to change the wording? 😄

@chrisjlocke
Copy link
Member

Building from git solves the problem

Closing the issue as its fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants