GNOME Bugzilla – Bug 558123
SqliteSyntaxException: unrecognized token: "'"
Last modified: 2009-03-04 16:28:00 UTC
Please describe the problem: I cannot import one file from my library into banshee. It plays fine with other players. With banshee --debug I see the following log in terminal[1]. The file can be found at: http://www.i-nz.net/files/tmp/05.06.27%20Thaddeus%20part%202-rerun.mp3 [1] Log. [Debug 16:18:02.747] FSQ Enqueue: file:///home/ivanz/storage/mp3/breakbeat/05.06.27%20Thaddeus%20part%202-rerun.mp3 [Debug 16:18:02.749] Exception executing command: SELECT CoreArtists.ArtistID,CoreArtists.Name,CoreArtists.MusicBrainzID FROM CoreArtists WHERE 1=1 AND CoreArtists.Name = '' [Error 16:18:02.750] /home/ivanz/storage/mp3/breakbeat/05.06.27 Thaddeus part 2-rerun.mp3 - unrecognized token: "'" [Debug 16:18:02.750] Full import exception: Mono.Data.SqliteClient.SqliteSyntaxException: unrecognized token: "'" at Mono.Data.SqliteClient.SqliteCommand.GetNextStatement (IntPtr pzStart, System.IntPtr& pzTail, System.IntPtr& pStmt) [0x00083] in /home/ivanz/src/git/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:368 at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00059] in /home/ivanz/src/git/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:596 at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in /home/ivanz/src/git/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:539 at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader () [0x00000] in /home/ivanz/src/git/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:545 at (wrapper remoting-invoke-with-check) Mono.Data.SqliteClient.SqliteCommand:ExecuteReader () at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Mono.Data.SqliteClient.SqliteConnection connection) [0x00071] in /home/ivanz/src/git/banshee/banshee/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs:126 Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
exiftool reports a lot of empty fields, Ex Falso and Cowbell report just a lot of missing metadata. I'm suspecting a misformed query here (or possibly a bug in TagLib#?). I tried adding an album and artist and that did not help, but I could not be setting the metadata correctly. Can you reproduce this with other tracks by removing their metadata? (I'll try to do some more testing down the road.)
Tell me how (command) to 'remove the metadata' and I will try.
I think `exiftool -all= filename.mp3` would delete all the metadata. Let me know if that doesn't work and we'll come up with something else. Either way, I'm still guessing there's a bug: Banshee should be able to handle whatever we throw its way.
Well exiftool doesn't like the mp3 either: [~/storage/mp3/breakbeat]$ exiftool --all= 05.06.27\ Thaddeus\ part\ 2-rerun.mp3 Tag '-*' does not exist or has a bad language code Nothing to do. So let's assume that the tags information is broken - shouldn't Banshee/TagLib# somehow detect that and still import the mp3 with blank tags or something.
The tag in question is actually "\x00", and SQLite is choking on the NULL byte. TagLib# ought to truncate such tags. I'll move this over to the taglib-sharp product.
Created attachment 129993 [details] [review] Truncate tags with NULL bytes in ID3v2 tags Patch + test case
Created attachment 129994 [details] tests/samples/corrupt/null_title_v2.mp3 Supporting test sample file, place in `tests/samples/corrupt/`.
Thanks John, committed!