Segmentation fault at "normalizeName(name) == name"

Bug #1787820 reported by nik.martin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Low
Unassigned

Bug Description

I ran mix for about an hour, making a new playlist, I exited normally, then when I tried to restart, I get:

Critical [Main]: DEBUG ASSERT: "normalizeName(name) == name" in function void DbNamedEntity<T>::setName(const QString&) [with T = CrateId] at src/util/db/dbnamedentity.h:25
Segmentation fault (core dumped)

And mixxx exits. I assume this is related to something in the database, but I'm not sure how to fix it.

Revision history for this message
nik.martin (nik-martin) wrote :
Download full text (4.2 KiB)

Here is the relevant portion of the same sequence with mixxx --developer:

Info [Main]: DbConnection - Available drivers for database connections: ("QIBASE", "QSQLITE", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7", "QTDS", "QTDS7")
Debug [Main]: DbConnection - Opening database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=false)
Info [Main]: DbConnectionPool - Cloned thread-local database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=true)
Info [Main]: MixxxMainWindow - Connecting to database
Debug [Main]: DbConnectionPooled - Found thread-local database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=true)
Info [Main]: MixxxMainWindow - Initializing or upgrading database schema
Info [Main]: SchemaManager - Database schema is up-to-date at version 28
Debug [Main]: LibraryScanner - Starting thread
Debug [Main]: DbConnectionPooled - Found thread-local database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=true)
Info [Main]: Library - Connecting database
Debug [LibraryScanner 1]: LibraryScanner - Entering thread
Debug [LibraryScanner 1]: DbConnection - Opening database connection "MIXXX-2" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=false)
Info [LibraryScanner 1]: DbConnectionPool - Cloned thread-local database connection "MIXXX-2" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=true)
Debug [LibraryScanner 1]: DbConnectionPooled - Found thread-local database connection "MIXXX-2" QSqlDatabase(driver="QSQLITE", database="/home/nmartin/.mixxx/mixxxdb.sqlite", host="localhost", port=-1, user="mixxx", open=true)
Debug [Main]: Committing transaction on "MIXXX-1" result: true
Debug [LibraryScanner 1]: LibraryScanner - Event loop starting
Debug [Main]: CrateFeature::rebuildChildModel() -1
Critical [Main]: DEBUG ASSERT: "normalizeName(name) == name" in function void DbNamedEntity<T>::setName(const QString&) [with T = CrateId] at src/util/db/dbnamedentity.h:25
Debug [Main]: Default quick links: ("/run/media/nmartin/6abc4643-4cef-4dc6-b8e2-f30d4c99ca19/DJLib/", "/home/nmartin/Music/", "/home/nmartin/Downloads/", "/home/nmartin/Desktop/", "/home/nmartin/Documents/")
Debug [Main]: Appending Quick Link: "DJLib" --- "/run/media/nmartin/6abc4643-4cef-4dc6-b8e2-f30d4c99ca19/DJLib/"
Debug [Main]: Appending Quick Link: "Music" --- "/home/nmartin/Music/"
Debug [Main]: Appending Quick Link: "Downloads" --- "/home/nmartin/Downloads/"
Debug [Main]: Appending Quick Link: "Desktop" --- "/home/nmartin/Desktop/"
Debug [Main]: Appending Quick Link: "Documents" --- "/home/nmartin/Documents/"
Debug [Main]: Committing transaction on "MIXXX-1" result: true
Debug [Main]: Found "Traktor 2.11.2"
Debug [Main]: Trakt...

Read more...

Revision history for this message
nik.martin (nik-martin) wrote :

I have seen this same error in the past, and it was after I updated my OS (Arch Linux), and it required a rebuild of mixx from source.Why would/should an OS update break an app?

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Your database seems to contain crate names with leading or trailing white spaces. Mixxx should prevent that entries with invalid names are created.

This is just a debug assertion to detect unexpected anomalies in existing databases during development. The release version should not be affected when using the correct build settings and command line args.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Shouldn’t we give here a more explicit error message, that the user has the chance to fix this via a db tool? What do you think?

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

No, this is not necessary. Leading/trailing whitespaces in the database are unexpected, but don't cause any issues as far as I know. Moreover at this point we don't have enough context information for generating meaningful error messages.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

At least it as confusing enough to file this bug ..
Can we print the effected name?

Revision history for this message
nik.martin (nik-martin) wrote :

I'd agree more debug is needed, as I was totally stuck here with no idea how to continue.

To add to the docs: This error goes away if I rebuild mixxx from source again, leading me to believe that this has something to do with dependency linking, and not an actual issue with my library (?).

In comment #3, are you saying I'm only seeing this since I run from compiled source and not a proper release? If so, then more debug output would definitely help me, because I almost always run from source, and this had me locked out good.

Revision history for this message
nik.martin (nik-martin) wrote :

FWIW, I did find a crate with trailing whitespace, but it has been there for several weeks, so the crash may be 100% unrelated to the debug assert which you probably already assumed. I'm guessing since I run from source when I update my OS, I need to rebuild mixxx. Is this a correct assumption?

Revision history for this message
Be (be.ing) wrote :

I would advise rebuilding when you update your OS, yes. IIRC when I update Fedora Mixxx will not run until I rebuild it.

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/9409

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.