After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 558123 - SqliteSyntaxException: unrecognized token: "'"
SqliteSyntaxException: unrecognized token: "'"
Status: RESOLVED FIXED
Product: taglib-sharp
Classification: Other
Component: General
unspecified
Other All
: Normal major
: ---
Assigned To: Gabriel Burt
Depends on:
Blocks:
 
 
Reported: 2008-10-27 16:25 UTC by Ivan Zlatev
Modified: 2009-03-04 16:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Truncate tags with NULL bytes in ID3v2 tags (2.02 KB, patch)
2009-03-04 04:54 UTC, John Millikin
committed Details | Review
tests/samples/corrupt/null_title_v2.mp3 (12.01 KB, application/octet-stream)
2009-03-04 04:56 UTC, John Millikin
  Details

Description Ivan Zlatev 2008-10-27 16:25:30 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:
Comment 1 Andrew Conkling 2008-10-31 02:47:10 UTC
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.)
Comment 2 Ivan Zlatev 2008-10-31 20:02:13 UTC
Tell me how (command) to 'remove the metadata' and I will try.
Comment 3 Andrew Conkling 2008-11-11 16:46:30 UTC
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.
Comment 4 Ivan Zlatev 2008-11-16 16:18:28 UTC
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.
Comment 5 John Millikin 2009-03-04 03:01:22 UTC
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.
Comment 6 John Millikin 2009-03-04 04:54:26 UTC
Created attachment 129993 [details] [review]
Truncate tags with NULL bytes in ID3v2 tags

Patch + test case
Comment 7 John Millikin 2009-03-04 04:56:20 UTC
Created attachment 129994 [details]
tests/samples/corrupt/null_title_v2.mp3

Supporting test sample file, place in `tests/samples/corrupt/`.
Comment 8 Gabriel Burt 2009-03-04 16:28:00 UTC
Thanks John, committed!