Bug 1516 - search on the player crashes slimserver
: search on the player crashes slimserver
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: 6.1.0
: PC All
: P2 major (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-08 00:36 UTC by Michael Herger
Modified: 2008-09-15 14:37 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Don't crash on album/artist search (649 bytes, patch)
2005-05-08 00:41 UTC, Michael Herger
Details | Diff
fix song search (1.23 KB, patch)
2005-05-08 01:16 UTC, Michael Herger
Details | Diff
a better fix for the search crash (1.11 KB, patch)
2005-05-10 01:05 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2005-05-08 00:36:10 UTC
From the forum:

> Since nightly-build 2005_05_06 (the one i see this first) SS crashes on
> my linux-box (cent-os 3.4) if use the search function from SB.
>
> slimserver.pl --diag reports the following:
>
> Can't use string ("*TOP*") as an ARRAY ref while "strict refs" in use
> at
> /usr/local/slimserver/Slim/Buttons/BrowseDB.pm line 506 (#1)
> (F) Only hard references are allowed by "strict refs".  Symbolic
> references are disallowed.  See perlref.

Additionally search for song crashes in Web/Pages:

Can't use string ("*GROW*") as an ARRAY ref while "strict refs" in use at /home/mh/eclipse/SVN/Slim/Web/
Pages.pm line 75.
Comment 1 Michael Herger 2005-05-08 00:41:16 UTC
Created attachment 502 [details]
Don't crash on album/artist search

Too simple to be true, but this might help for artists and albums.
Comment 2 Michael Herger 2005-05-08 01:16:44 UTC
Created attachment 503 [details]
fix song search

Was there any reason the search term was handled as an array for title search
only? If not - this patch might fix the search from player interface crash.
Comment 3 KDF 2005-05-08 02:25:38 UTC
the change you have made to pages, also occur in Pages::Search()
be sure to test web UI searches as well with these changes.
Comment 4 Michael Herger 2005-05-08 03:36:02 UTC
I checked them, too (livesearch, advanced and standard). And, hey, it worked.
Comment 5 Daniel Abegglen 2005-05-08 07:14:39 UTC
for me the fix only work for album and artists - not for songs ...
Comment 6 Michael Herger 2005-05-08 12:05:17 UTC
Daniel, did you try the second patch? Could you send the last lines of your slimserver's log before the 
crash?
Comment 7 Michael Herger 2005-05-09 23:53:50 UTC
This one is very strange... As I did not find any change I could set in relation to this problem I wanted to do 
a diff between the two nightlies where the behaviour changed. I went back to the oldest still available (05-
01) - and it crashed.

As the 04-29 on my server is running fine, I copied it over to my dev machine. And guess what? It crashes 
on this machine, too! My server is running perl 5.8.6 (home brew), the dev machine 5.8.5 (Mandrake 10.
1). 

Luckily enough I have a third machine where I recently installed Mandrake 10.2. It ships with perl 5.8.6. 
And yes, it runs that nightly just fine.

And just to have a little more fun I rebooted into Windows and installed 05-01. Bot the binary and run 
using ActivePerl 5.8.4 are fine... 

I don't understand what's wrong here.  Anyone got an idea what's wrong here?
Comment 8 Michael Herger 2005-05-10 01:05:05 UTC
Created attachment 510 [details]
a better fix for the search crash

Ok, ok... I knew it can't be the perl version :-). It was the searchSubString
setting: Buttons::Search::searchTerm() was returning a string when searching in
substrings, but an array if only at the beginning of a word. Now always return
an array, and we should be fine.
Comment 9 Daniel Abegglen 2005-05-11 10:17:00 UTC
Thanks Michael
The better fix is working like a charme from SB as from Web-GUI with 2005-05-11
@ Centos 3.4 (perl v5.8.4)

Daniel
Comment 10 Michael Herger 2005-05-11 14:35:49 UTC
Thanks for testing! Now if only one of the officials would say something... Maybe I'll have to check this in 
to see some reaction ;-)
Comment 11 Michael Herger 2005-05-11 23:33:38 UTC
Checked in as change 3165.
Comment 12 Chris Owens 2006-06-16 14:39:58 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.