Skip Menu |
 

This queue is for tickets about the POE-Component-Client-UserAgent CPAN distribution.

Report information
The Basics
Id: 11263
Status: stalled
Priority: 0/
Queue: POE-Component-Client-UserAgent

People
Owner: Nobody in particular
Requestors: ed [...] donorware.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: (no value)



Subject: postback invoked twice, causing app to die
Download (untitled) / with headers
text/plain 2.8k
(note: this is PoCoCl:UA v0.06, Perl v5.81-RC3 on OS X) I have not managed to reproduce this bug in a demo, unfortunately. quoting my email to the POE list: ------------------------------------ Hi -- I'm pretty new to POE, and still getting my bearings, so I apologize in advance for any vagueness and imprecision in this question. I'm working with a colleague on a client-server application which previously used plain vanilla LWP to query the server, and recently we've overhauled and POE-ified it and replaced the ordinary LWP with PoCoCl::UA. (Version 0.06) It works great most of the time, but every so often, the app will die with a message that looks like this: Can't use string ("") as a subroutine ref while "strict refs" in use at /Library/Perl/5.8.1/POE/Component/Client/UserAgent.pm line 325. (note that the line number is a bit off from the standard distribution because I've been hacking up my copy of UserAgent.pm with debug output around this point.) I have not managed to duplicate this in any kind of a demo, but by putting in debug messages I've got a clearer picture of the circumstances which obtain when this happens. It happens within POE/Component/Client/UserAgent.pm, of course, within the subroutine "_pococ_ua_postback", on this line: $entry -> postback -> ($request, $response, $entry); It happens because $entry->postback is at this point "undef." using the caller() function, I've found out $entry->postback becomes "undef" under the following conditions: LWP::Parallel::UserAgent::_perform_read(), line 1153, calls $self->on_failure Po::Co::Cl::UserAgent::on_failure calls $object -> _pococ_ua_postback At this point, _pococ_ua_postback calls $entry->postback, which is defined and does NOT crash. at this point, $entry->postback is, according to Data::Dumper: $VAR1 = bless( sub { "DUMMY" }, 'POE::Session::Postback' ); Very soon thereafter, though: LWP::Parallel::UserAgent::_perform_read(), line 1171, calls $self->on_return Po::Co::Cl::UserAgent::on_return calls $object -> _pococ_ua_postback At this point, _pococ_ua_postback calls $entry->postback, which is undefined, and the app crashes. at this point, $entry->postback is: $VAR1 = undef; The problem does not occur except under these conditions -- _perform_read first fails, then calls the postback, and then succeeds, and tries to call it again, and can't, because it's undef. I definitely am not well enough versed in POE's guts to say whether this is a problem with PoCoCl::UA or something about the postbacks we're sending it or what. If anyone could suggest some useful further steps to take to try to figure out what is going on, I'd be very grateful. This happens only sporadically, and it is less common when I'm on a particularly fast, low-latency network connection and more common when I'm on a slower one. So it may have something to do with the length of time it takes for a request to return. Thanks very much!
Download (untitled) / with headers
text/plain 322b
Please let me know if you or someone you know wishes to contribute to this project. POE::Component::Client::UserAgent dependencies no longer install properly, which limits my ability to maintain this module. I have instead been focusing on POE::Component::Client::HTTP which has fewer and better-maintained dependencies.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.