PDA

View Full Version : database-involved breakage at change 3849



cdoherty
2005-08-03, 11:49
nothing loads up--no songs, no playlists (which are present). if I try to
rescan just the playlists, the server ignores that (maybe an ExBrowse2
problem) and starts scanning the entire library, and dies with

Can't call method "id" on an undefined value at
/home/chris/slimdev/trunk/server/Slim/
DataStores/DBI/DBIStore.pm line 767.

tweaking the code to look at the structures retrieved from the database, I
don't see an artist anywhere in the Slim::DataStores::DBI::Track object,
though it does have an id() method. I don't know enough to say if

$artists{ $track->artist->id }++;

should be

$artists{ $track->id }++;

but I'm inclined to think not, and instead it's a DBI retrieval
issue. anyone else having a problem?

chris



-------------------------------
Chris Doherty
chris [at] randomcamel.net

"I think," said Christopher Robin, "that we ought to eat
all our provisions now, so we won't have so much to carry."
-- A. A. Milne
-------------------------------

mcfly
2005-08-03, 13:00
Chris Doherty wrote:
> Can't call method "id" on an undefined value at
> /home/chris/slimdev/trunk/server/Slim/
> DataStores/DBI/DBIStore.pm line 767.
>
> but I'm inclined to think not, and instead it's a DBI retrieval
> issue. anyone else having a problem?
>
Same problem here... SVN revision 3851.

Hakan Tandogan
2005-08-04, 05:44
> Chris Doherty wrote:

> nothing loads up--no songs, no playlists (which are present). if I try to
> rescan just the playlists, the server ignores that (maybe an ExBrowse2
> problem) and starts scanning the entire library, and dies with
>
> [ ... ]
>
> Can't call method "id" on an undefined value at
> /home/chris/slimdev/trunk/server/Slim/
> DataStores/DBI/DBIStore.pm line 767.
>
> but I'm inclined to think not, and instead it's a DBI retrieval
> issue. anyone else having a problem?
>

I'm using SVN revision 3855 with an empty database, both with mysql and
SQLite:

Can't call method "namesort" on an undefined value at
..../Slim/DataStores/DBI/DBIStore.pm line 1502, <GEN28> line 1.

By the way, the mysql database creation script has a small little buglet:

Index: SQL/mysql/dbcreate.sql
================================================== =================
--- SQL/mysql/dbcreate.sql (revision 3855)
+++ SQL/mysql/dbcreate.sql (working copy)
@@ -153,7 +153,7 @@
INDEX contributor_trackSortIndex (namesort),
PRIMARY KEY (id),
FOREIGN KEY (`track`) REFERENCES `tracks` (`id`) ON DELETE NO ACTION,
- FOREIGN KEY (`contributor`) REFERENCES `contributors` (`id`) ON DELETE
NO ACTION,
+ FOREIGN KEY (`contributor`) REFERENCES `contributors` (`id`) ON DELETE
NO ACTION
) TYPE=InnoDB;




Regards,
Hakan


--
Simpler is better. But try telling that to any young fool who hasn't
even fought in the clone wars...

Dan Sully
2005-08-04, 10:09
* Hakan Tandogan shaped the electrons to say...

>I'm using SVN revision 3855 with an empty database, both with mysql and
>SQLite:
>
>Can't call method "namesort" on an undefined value at
>.../Slim/DataStores/DBI/DBIStore.pm line 1502, <GEN28> line 1.

I'll take a look.

Can you tell if any particular file is causing this?

>By the way, the mysql database creation script has a small little buglet:

Fix checked in.

Thanks.

-D
--
<faisal> my life is collapsing to what will soon be NEGATIVE INTEGER degrees of separation.

Hakan Tandogan
2005-08-04, 12:04
Dan Sully wrote:
> * Hakan Tandogan shaped the electrons to say...
>
>> I'm using SVN revision 3855 with an empty database, both with mysql and
>> SQLite:
>>
>> Can't call method "namesort" on an undefined value at
>> .../Slim/DataStores/DBI/DBIStore.pm line 1502, <GEN28> line 1.
>
>
> I'll take a look.
>
> Can you tell if any particular file is causing this?

I found a file that makes my server crash. I created bug #1930
(http://bugs.slimdevices.com/show_bug.cgi?id=1930) and attached the mp3
file to it.

If I remove that file from my library, a full rescan finishes successfully.


Regards,
Hakan


--
Simpler is better. But try telling that to any young fool who hasn't
even fought in the clone wars...