Crash if GUI used while rescanning library

Bug #1090888 reported by Osoitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
New
Critical
Steven Boswell

Bug Description

Using Mixxx 1.11 beta 2 for Ubuntu Studio Quantal (12.10)

1) Rescan library

2) While the library is being scanned, click trough "Library", "AutoDJ", "Analyze"... Sooner or later it will crash with the following error:

ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 214

Tags: crash

Related branches

Osoitz (oelkoro)
tags: added: crash
Revision history for this message
Max Linke (max-linke) wrote :

I tried to get mixxx crashing this way without success using the lastest version.

Can you try with the newest version if the problem still exists
http://builds.mixxx.org/builds/release-1.11.x/r3644/

Revision history for this message
Osoitz (oelkoro) wrote :

builds.mixxx.org doesn't seem to work right now I'll have to try later with r3644.

However this is a 100% sure way to make mixx r3632 crash in my computer, so I'll try to give more info meanwhile:

I noticed that this doesn't happen if you start with an empty Library, some songs must be already in the Library.

I'm using the 64 version of Ubuntu Studio 12.10

I Have +- 20000 MP3, flac, OGG, and MP4 files in a different partition that I mount manualy with Thunar (Thunar uses gvfs). I don't know if this is important or not.

mv ~/.mixxx ~/.mixxx_bak

start mixxx, tell mixx where the library is and start scanning.

Cancel the scan, so there are a few songs in the database and a lot to add yet.

Rescan library.

While rescanning click though Library related options in the GUI (Library, Hidden, Analyze...)

Eventualy, the GUI will freeze and seconds later mixxx will crash.

The GUI opens a dialogue with 'ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 214'

If mixx was opened via terminal these are the last messages:
TagLib: MPEG::Header::parse() -- Invalid sample rate.
Debug [Main]: MissingTableModel(0x57ced60) select() error: src/library/basesqltablemodel.cpp 205 "SELECT id FROM missing_songs " QSqlError(5, "Unable to fetch row", "database is locked")
Fatal [Main]: ASSERT: "record.indexOf(column) == m_tableColumnIndex[column]" in file src/library/basesqltablemodel.cpp, line 214

Revision history for this message
Osoitz (oelkoro) wrote :

Oops, not MP4 files, but M4a files. Anyway mixx has crashed allways while rescanning a different MP3 file (The format I use most often), file format seems unelated to me.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.11.0
importance: Undecided → Critical
Revision history for this message
Steven Boswell (ulatekh) wrote :

This looks like a duplicate of bug #870128 to me, i.e. https://bugs.launchpad.net/mixxx/+bug/870128 .

In one sense, fixing the bug is easy: if the query fails in BaseSqlTableModel::select(), it shouldn't try to use the results, i.e. there should be a "return;" or something after line 206 (relative to the current 1.11 branch).

However, the database shouldn't be locked during library-rescan to the point where higher-priority functions, like user interaction, get blocked. Fixing that is undoubtedly more work, and I only recently started hacking the code, so don't expect much out of me very soon...but I'm keen to try :-)

Revision history for this message
Steven Boswell (ulatekh) wrote :

This patch works around the problem by moving the database query to the top of the function.
If the query fails, it returns without doing anything else.
This should take care of the crash.

A further step would be to make the library-rescan dialog modal, so that the Mixxx window can't be used while it's running, but that'll take some further discussion with the main Mixxx developers. For now, this patch should be enough.

Changed in mixxx:
assignee: nobody → Steven Boswell (ulatekh)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Committed to lp:mixxx/1.11. Thanks Steven!

Could you please fill out the Mixxx contributor agreement? https://docs.google.com/a/mixxx.org/spreadsheet/viewform?formkey=dEpYN2NkVEFnWWQzbkFfM0ZYYUZ5X2c6MQ#gid=0

This gives us your permission to distribute your changes with Mixxx.

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6782

lock status: Metadata changes locked and limited to project staff
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.