Bug 3617 - Browse by artwork crash - data too long
: Browse by artwork crash - data too long
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.5b1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-20 16:59 UTC by Philip Meyer
Modified: 2008-09-15 14:39 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2006-06-20 16:59:20 UTC
2006-06-21 00:52:12.5263 find:
$VAR1 = {};
2006-06-21 00:52:12.5267 running resultset on: album
2006-06-21 00:52:17.7656 DBD::mysql::st execute failed: Data too long for column 'thumb' at row 1 at P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 525.
DBIx::Class::InflateColumn::update(): Error executing 'UPDATE tracks SET thumb = ? WHERE ( id = ? )' (`M:\Music\Phil's Music\Electronic Music\Fanger & Sch�nw�lder\Analog Overdose 4\folder.jpg', `2761'): DBD::mysql::st execute failed: Data too long for column 'thumb' at row 1 at P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 525.
Comment 1 KDF 2006-06-20 17:49:01 UTC
and if you remove the non-latin chars form the pathname?
Comment 2 Philip Meyer 2006-06-21 01:53:19 UTC
I renamed the folder, rescanned, and browsed artwork.
Fell over on another folder with unicode chars.

Good spot.
Comment 3 KDF 2006-06-21 08:35:57 UTC
perhaps this is one of those cases where the field needs to be "text" type instead of "varchar(255)"?
Comment 4 Dan Sully 2006-06-21 13:31:03 UTC
Fix in change 8081

You'll need to wipe & rescan.
Comment 5 Philip Meyer 2006-06-21 14:34:22 UTC
I updated, did a complete rescan, and still see the same error.

I believe that I am now seeing less album artwork,
and the trace has many new warnings in it, like:

Use of uninitialized value in string eq at P:\Music\SlimServer\trunk\server/Slim/Schema.pm line 1616, <GEN78> line 6.

I'm seeing the above for <GEN78> and <GEN80>,
with lots of different reported line numbers.
Comment 6 Dan Sully 2006-06-21 14:36:49 UTC
Phil - can you try changing those text columns I changed to blob instead?
Comment 7 Philip Meyer 2006-06-21 15:42:14 UTC
I think I misunderstood your previous post.

I did a "Clear library and rescan everything", which apparently
didn't cause the table changes to be applied.  I assumed it would
drop all slimserver-created tables and recreate them and then
do a full rescan.

I checked in MySQL - the table still had varchar types, so I
manually dropped the database and recreated it manually following
the wiki MySQL instructions.

I noticed that there was a note that I had previously ignored about
needing to set the character encoding.

As my paths aren't 255 chars long, I don't think the change to text
or blob is the crucial thing (more likely the character encoding
caused the problem).

I tried to set the DB to use UTF-16 (mp3tag app is configured to
write id3 v2.3 tags in unicode utf-16), however, MYSQL doesn't seem
to support UTF-16, so I used UTF-8.

It would be nice if slimserver could create the DB if it doesn't
exist.  Is that the intention (Nb. I installed my own MySQL instance)?
If so, what character encoding would it get created with?

I *still* get the same crash though.  I will try converting those
columns to blob.
Comment 8 Dan Sully 2006-06-21 15:45:05 UTC
Phil - SlimServer will create the tables if they don't exist, but you need to create the DB itself if you are running your own MySQL instance (db permissions would stop us from creating the DB)

The DB should be using UTF-8 - see the MySQL/my.tt file for an example.

Don't worry about the UTF-16 encoded data, it's converted to UTF-8 at scan time.
Comment 9 Philip Meyer 2006-06-21 17:46:04 UTC
MySQL/my.tt - does slimserver use this file, or am I supposed
to do something to MySQL manually to use those settings?

I tried again with blobs instead of text, and I managed to get
the first page of browse artwork to work.  I moved to "B" alpha
page link, which was okay, and then jumped to "Y".

Whilst loading the thumbnails, I had a perl interpreter crash:

Faulting application perl.exe, version 5.8.8.817, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00001095.
Comment 10 Dan Sully 2006-06-21 17:47:48 UTC
SlimServer uses that file if you let it use the internal MySQL.

What was the reason for setting up your own MySQL instance?

We can better support you if you use the internal one.
Comment 11 Philip Meyer 2006-06-22 01:13:09 UTC
I wanted a bit more control over the MySQL installation,
when it gets upgraded, etc, as I may put additional
databases into it.

I haven't had any problems, although I understand that I
may have to apply optimisation settings manually.

How would I switch slimserver such that it uses an internal
instance?
Comment 12 Dan Sully 2006-06-22 08:09:25 UTC
If you remove the dbsource line from the prefs file, it will use the defaults, and start a MySQL instance.
Comment 13 Philip Meyer 2006-06-24 12:39:46 UTC
I tried changing the text columns to blob, and it's now
working fine (still using my instance of MySQL).
Comment 14 Dan Sully 2006-06-29 09:20:18 UTC
Fixed in change 8175