Bug 17212 - Transcoding on download URL fails with error 'Can't call method "push_write" on an undefined value'
: Transcoding on download URL fails with error 'Can't call method "push_write" ...
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Audio
: 7.6.0
: PC Windows Vista
: P2 normal with 3 votes (vote)
: 7.6.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-10 06:43 UTC by sle118
Modified: 2011-07-16 08:00 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
Full debug logs for a flag->mp3 download & transcode (4.87 KB, text/plain)
2011-05-10 06:43 UTC, sle118
Details
Adjustment to $out constructor (77.16 KB, text/plain)
2011-07-15 21:53 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sle118 2011-05-10 06:43:20 UTC
Created attachment 7269 [details]
Full debug logs for a flag->mp3 download & transcode

Attempting to download & transcode a file fails with the following error:

Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling
Slim::Web::HTTP::processHTTP: Can't call method "push_write" on an undefined
value at /<C:\PROGRA~1\SQUEEZ~1\server\SqueezeSvr.exe>Slim/Web/HTTP.pm line
2625.
; fh=Slim::Web::HTTP::ClientConn=GLOB(0x8cebdbc)

This happens when trying with the SqueezeCommander client or with a manual
download from a PC browser (chrome, internet explorer, etc).

following the download request, it seems that 3 windows processes are created:
cmd.exe, lame.exe and flac.exe
Comment 1 Chris 2011-07-15 21:53:14 UTC
Created attachment 7336 [details]
Adjustment to $out constructor

I think I have a fix for this bug.  It seems that there are references to the output socket ($out) within the $writer function which is undefined when the $writer callback is first run.  I moved the $writer on_drain() callback below the actual object instantiation, which seems to have fixed the issue on my test machines.  I've attached my new HTTP.pm file, but I'm not sure how I'd go about getting this into the repo for testing/verification.  Let me know what else you guys need.
Comment 2 Chris 2011-07-15 23:09:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 SVN Bot 2011-07-16 08:00:26 UTC
 == Auto-comment from SVN commit #32722 to the slim repo by agrundman ==
 == http://svn.slimdevices.com/slim?view=revision&revision=32722 ==

Fixed bug 17212, patch to avoid error calling writer callback before out is defined