Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server crash regarding queuing #3

Closed
andrewrk opened this issue Mar 2, 2012 · 5 comments
Closed

server crash regarding queuing #3

andrewrk opened this issue Mar 2, 2012 · 5 comments

Comments

@andrewrk
Copy link
Owner

andrewrk commented Mar 2, 2012

commit 2cf72dd

.
.
.
   error -  [50@0] {deleteid} No such song
   error -  [50@0] {deleteid} No such song

/home/andy/dev/groovebasin/server.js:263
 _results.push(my_mpd.library.track_table[current_file].last_queued = new Date
                                                                    ^
TypeError: Cannot set property 'last_queued' of undefined
    at Object.cb (/home/andy/dev/groovebasin/server.js:263:78)
    at DirectMpd.<anonymous> (/home/andy/dev/groovebasin/lib/mpd.js:181:39)
    at DirectMpd.handleMessage (/home/andy/dev/groovebasin/lib/mpd.js:4:61)
    at DirectMpd.<anonymous> (/home/andy/dev/groovebasin/lib/mpd.js:206:16)
    at DirectMpd.receive (/home/andy/dev/groovebasin/lib/mpd.js:4:61)
    at Socket.<anonymous> (/home/andy/dev/groovebasin/server.js:365:22)
    at Socket.emit (events.js:67:17)
    at TCP.onread (net.js:347:14)
@andrewrk
Copy link
Owner Author

andrewrk commented Mar 3, 2012

Appears to be an mpd bug regarding stickers. When I logged the file that sticker find song "/" "groovebasin.last-queued" is returning, I get:

.
.
.
Jónsi/Go/01. Go Do.mp3
Jónsi/Go/02. Animal Arithmetic.mp3
Jónsi/Go/03. Tornado.mp3
Jónsi/Go/04. Boy Lilikoi.mp3
Jónsi/Go/05. Sinking Friendships.mp3
Jónsi/Go/06. Kolnidur.mp3
Jónsi/Go/07. Around Us.mp3
J��nsi/Go/08. Grow Till Tall.mp3

Looks fine when I do the query in telnet though:

sticker find song "Jónsi" "groovebasin.last-queued"
file: Jónsi/Go/01. Go Do.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/02. Animal Arithmetic.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/03. Tornado.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/04. Boy Lilikoi.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/05. Sinking Friendships.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/06. Kolnidur.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/07. Around Us.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/08. Grow Till Tall.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z
file: Jónsi/Go/09. Hengilás.mp3
sticker: groovebasin.last-queued=2012-02-26T11:18:46.164Z

@andrewrk
Copy link
Owner Author

andrewrk commented Mar 3, 2012

I changed updateStickers to:

.
.
.
        if track?
          track.last_queued = new Date(value)
        else
          log.error "#{current_file} has a last-queued sticker of #{value} but we don't have it in our library cache."
          track = my_mpd.library.track_table["Jónsi/Go/08. Grow Till Tall.mp3"]
          console.log "and here's grow till tall manually: #{track?}"

and now the output looks like:

$ npm -g start groovebasin

> groovebasin@0.0.2 start /usr/local/lib/node_modules/groovebasin
> node server.js

The "sys" module is now called "util". It should have a similar interface.
   info  - socket.io started
   info  - Serving at http://localhost:16242/
   error - J��nsi/Go/08. Grow Till Tall.mp3 has a last-queued sticker of 2012-03-03T03:11:12.963Z but we don't have it in our library cache.
and here's grow till tall manually: true
   error - J��nsi/Go/08. Grow Till Tall.mp3 has a last-queued sticker of 2012-03-03T03:15:17.255Z but we don't have it in our library cache.
and here's grow till tall manually: true

@andrewrk
Copy link
Owner Author

andrewrk commented Mar 3, 2012

        if track?
          track.last_queued = new Date(value)
        else
          log.error "#{current_file} has a last-queued sticker of #{value} but we don't have it in our library cache."
          str = "Jónsi/Go/08. Grow Till Tall.mp3"
          track = my_mpd.library.track_table[str]
          console.log "and here's #{str} manually: #{track.file}"
   error - J��nsi/Go/08. Grow Till Tall.mp3 has a last-queued sticker of 2012-03-03T03:15:17.255Z but we don't have it in our library cache.
and here's Jónsi/Go/08. Grow Till Tall.mp3 manually: Jónsi/Go/08. Grow Till Tall.mp3
   error - J��nsi/Go/08. Grow Till Tall.mp3 has a last-queued sticker of 2012-03-03T03:22:13.973Z but we don't have it in our library cache.
and here's Jónsi/Go/08. Grow Till Tall.mp3 manually: Jónsi/Go/08. Grow Till Tall.mp3

@andrewrk
Copy link
Owner Author

andrewrk commented Mar 3, 2012

&#74;&#65533;&#65533;&#110;&#115;&#105;&#47;&#71;&#111;&#47;&#48;&#56;&#46;&#32;&#71;&#114;&#111;&#119;&#32;&#84;&#105;&#108;&#108;&#32;&#84;&#97;&#108;&#108;&#46;&#109;&#112;&#51;

vs

&#74;&#243;&#110;&#115;&#105;&#47;&#71;&#111;&#47;&#48;&#56;&#46;&#32;&#71;&#114;&#111;&#119;&#32;&#84;&#105;&#108;&#108;&#32;&#84;&#97;&#108;&#108;&#46;&#109;&#112;&#51;

@andrewrk
Copy link
Owner Author

andrewrk commented Mar 7, 2012

I'm writing this off as a fluke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant