GNOME Bugzilla – Bug 599806
SQLite Error when Importing Library
Last modified: 2010-02-19 09:20:43 UTC
A lot of my tracks aren't successfully imported because of an 'Sqlite error unrecognized token: "'" error. Here's an example full banshee runtime error that occurs for each failed track: [Debug 16:24:52.312] Exception executing command: INSERT INTO CoreTracks (Rating,LastStreamError,PrimarySourceID,ArtistID,AlbumID,TagSetID,MusicBrainzID,MimeType,FileSize,FileModifiedStamp,LastSyncedStamp,Attributes,Title,TitleSort,MetadataHash,TrackNumber,TrackCount,Disc,DiscCount,Duration,Year,Genre,Composer,Conductor,Grouping,Copyright,LicenseUri,Comment,BPM,BitRate,Score,PlayCount,SkipCount,ExternalID,LastPlayedStamp,LastSkippedStamp,DateAddedStamp,DateUpdatedStamp,Uri,TitleSortKey,TitleLowered) VALUES (0,0,1,877,1813,0,NULL,'taglib/mp3',3093396,1219659578,1256660692,5,'Walk Among The Cobras Pt.1',NULL,'7cefc592e93ad553a6ea385bef66edb8',4,0,0,0,193780,2003,'Country Rock','','',NULL,'',NULL,NULL,0,128,0,0,0,0,NULL,NULL,1256660692,1256660692,'file:///home/thomas/Music/My%20Music/d/Dan%20Sartain/Dan%20Sartain%20Vs.%20The%20Serpientes/04%20-%20Wak%20Among%20The%20Cobras%20P.T.1.mp3',X'0EA40E020E480E3607020E020E510E7C0E700E2507020E990E2C0E2107020E0A0E7C0E090E8A0E020E9107020E7E0E9907330C210101010100','walk among the cobras pt1') [Warn 16:24:52.313] Caught an exception - Sqlite error unrecognized token: "'" (in `Mono.Data.Sqlite') at Mono.Data.Sqlite.Sqlite3.Prepare (System.String strSql, Mono.Data.Sqlite.SqliteStatement previous, System.String& strRemain) [0x00126] in /home/thomas/latest/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs:267 at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00019] in /home/thomas/latest/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs:226 [Debug 16:24:52.313] type of key value: System.Int32 [Error 16:24:52.318] /home/thomas/Music/My Music/d/Dan Sartain/Dan Sartain Vs. The Serpientes/04 - Wak Among The Cobras P.T.1.mp3 - Sqlite error unrecognized token: "'" [Debug 16:24:52.318] Full import exception: Mono.Data.Sqlite.SqliteException: Sqlite error unrecognized token: "'" at Mono.Data.Sqlite.Sqlite3.Prepare (System.String strSql, Mono.Data.Sqlite.SqliteStatement previous, System.String& strRemain) [0x00126] in /home/thomas/latest/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs:267 at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00019] in /home/thomas/latest/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs:226 [Warn 16:24:52.351] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Debug 16:24:53.158] Importing Media duration: 00:05:12.8335850 [Debug 16:24:53.159] Finished - Importing 20898 of 20907 I can import these files fine in other media players. I've uploaded a file that fails [Fifteen Minutes Past Three.mp3]- I own full copyright to it.
File too large for attached. Uploaded here: http:// crawlbackinbed.com/DragRacer.mp3
Confirming
Created attachment 146404 [details] [review] Ignore '\0' characters in strings returned by TagLib# The patch works around the problem in TagLib# which sometimes returns strings containing only '\0' characters. Mono.Data.Sqlite cannot handle queries containing NULL characters, returning the parsing error. I filed bug 599873 at TagLib#
Comment on attachment 146404 [details] [review] Ignore '\0' characters in strings returned by TagLib# Looks fine. Are there cases where there are actually more than one \0 in the string? If not, an optimization to check s.Length == 1 before the trim might be good.
Thank Gabriel! I committed a slightly modified version of the patch that avoids unnecessary string allocations. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
*** Bug 537873 has been marked as a duplicate of this bug. ***