Re: Async HTTP download with Glib event loop doesn't work on windows



The plot thickens.

I've got a very helpful tip about Berrybrew ( https://github.com/stevieb9/berrybrew ), which is a Windows analog to Perlbrew, allowing multiple versions of Strawberry Perl to coexist on the same system. I've installed Glib (1.305), Gtk2 (1.2498), AnyEvent (7.13), AnyEvent::HTTP (2.23) on all versons between 5.12 and 5.24, and ran the test script on all of them. 5.16.3 and below works, 5.18.4 and above fails.

The following test program demonstrates the issue even more dramatically:
##################
#!/usr/bin/perl

use strict;
use warnings;
use feature qw/say/;
use Gtk2 -init;

use AnyEvent;
use AnyEvent::HTTP;

my $w = Gtk2::Window->new();
my $l = Gtk2::Label->new();

$l->set_text("init");
$w->add($l);
$w->show_all();

my $wa; $wa = AnyEvent->timer(after => 2.0, interval => 2.0, cb => sub {
    http_request('GET',
        'http://www.fsz.bme.hu/cgi-bin/ltime',
        sub {
                my ($response_body, $response_headers) = @_;
                $l->set_text($response_body);
        }
    );

    $l->set_text("ready");
});


Gtk2->main();
#######################

On Perl 5.16.3 and below it fetches the data from the network and displays it in a window, on 5.18.4 and above it hangs.

I've looked at the perldelta docs for 5.18 but nothing obvious stood out.

Now what?

Peter


On Thu, Mar 9, 2017 at 5:32 PM, Brian Manning <cpan xaoc org> wrote:
On Wed, Mar 8, 2017 at 4:58 AM, Peter Juhasz <peter juhasz83 gmail com> wrote:
> Dear Gtk-Perl experts,
>
> We have a legacy Gtk2 application that occasionally has to send HTTP
> requests asynchronously.
> We've noticed that it hangs on Windows with recent perls.

What was the last versions of Perl/Gtk2/Glib/AnyEvent that worked for
you on Windows?

> Finally, my question:
> is there any hope that this issue will be fixed, or at least its cause be
> found, or should we abandon this approach entirely?

I'm going to guess that you're the only person trying to do this; you
may want to take that into consideration.

Thanks,

Brian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]