ActiveState Perl crashs, why ?

Discussion in 'Perl Misc' started by perl, Oct 24, 2006.

  1. perl

    perl Guest

    Hello,

    when i run my little perl script, Perl crashes (using Win2000+ActiveState
    Perl 5.8.8).
    I have no idea why.

    Here the little script:
    ---------------------------------
    #!/usr/bin/perl -w

    use LWP::UserAgent;
    use strict;

    my $url = "http://www.google.de";
    my $ua = LWP::UserAgent->new(); # create virtual browser
    $ua->agent("someagent/v 0.1a"); # giving browser a name

    my $req = HTTP::Request->new(GET => $url);
    my $webpage = $ua->request($req);

    if ($webpage->is_success){ print $webpage->content;}
    else {print $webpage->status_line, "\n";}
    -----------------------------------

    It works under Linux, so there should be no reason to crash. I discovered
    that the crash happens, when GET is called.
     
    perl, Oct 24, 2006
    #1
    1. Advertising

  2. perl

    Sisyphus Guest

    "perl" <> wrote in message
    news:ehla17$nto$...
    > Hello,
    >
    > when i run my little perl script, Perl crashes (using Win2000+ActiveState
    > Perl 5.8.8).
    > I have no idea why.
    >
    > Here the little script:
    > ---------------------------------
    > #!/usr/bin/perl -w
    >
    > use LWP::UserAgent;
    > use strict;
    >
    > my $url = "http://www.google.de";
    > my $ua = LWP::UserAgent->new(); # create virtual browser
    > $ua->agent("someagent/v 0.1a"); # giving browser a name
    >
    > my $req = HTTP::Request->new(GET => $url);
    > my $webpage = $ua->request($req);
    >
    > if ($webpage->is_success){ print $webpage->content;}
    > else {print $webpage->status_line, "\n";}
    > -----------------------------------
    >


    Can't reproduce the problem. That script works fine for me using ActiveState
    perl 5.8.8 (build 817) on Windows 2000.

    What exactly happens when "Perl crashes" ? Do you get any error messages ?

    Cheers,
    Rob
     
    Sisyphus, Oct 24, 2006
    #2
    1. Advertising

  3. perl <> wrote:

    > Perl crashes



    What does "crashes" mean when you say it?

    That is, what symptoms do you observe?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Oct 25, 2006
    #3
  4. perl

    perl Guest

    > > when i run my little perl script, Perl crashes (using
    Win2000+ActiveState
    > > Perl 5.8.8).
    > > I have no idea why.
    > >
    > > Here the little script:
    > > ---------------------------------
    > > #!/usr/bin/perl -w
    > >
    > > use LWP::UserAgent;
    > > use strict;
    > >
    > > my $url = "http://www.google.de";
    > > my $ua = LWP::UserAgent->new(); # create virtual browser
    > > $ua->agent("someagent/v 0.1a"); # giving browser a name
    > >
    > > my $req = HTTP::Request->new(GET => $url);
    > > my $webpage = $ua->request($req);
    > >
    > > if ($webpage->is_success){ print $webpage->content;}
    > > else {print $webpage->status_line, "\n";}
    > > -----------------------------------
    > >

    >
    > Can't reproduce the problem. That script works fine for me using

    ActiveState
    > perl 5.8.8 (build 817) on Windows 2000.
    >
    > What exactly happens when "Perl crashes" ? Do you get any error messages ?



    Thnx for your quick answer, Rob. The error message i got is the typical
    popup window (translated from german):
    perl.exe caused an error an will be closed. Start the program again. An
    errrorprotocol is created.
    Now that's really helpfull :-( . I looked where the error could be stored,
    but
    i have not found it.

    Fortunately i solved the problem. I was quite stupid. I detected an older
    version of ActiveState Perl (5.6.1) which was also installed. I simply
    removed both ones and reinstalled the actual 5.8.8. Now it seems to work.

    I feel ashamed :)

    Zed
     
    perl, Oct 25, 2006
    #4
  5. perl

    Bart Lateur Guest

    perl wrote:

    >The error message i got is the typical
    >popup window (translated from german):
    >perl.exe caused an error an will be closed.


    Ouch. That sounds bad.

    I think LWP is pure perl, otherwise I'd first think of an incompatible
    DLL from a module somewhere.

    Can you reproduce it, or not reproduce it, with other modules?

    --
    Bart.
     
    Bart Lateur, Oct 25, 2006
    #5
  6. perl

    perl Guest

    > >The error message i got is the typical
    > >popup window (translated from german):
    > >perl.exe caused an error an will be closed.

    >
    > Ouch. That sounds bad.
    >
    > I think LWP is pure perl, otherwise I'd first think of an incompatible
    > DLL from a module somewhere.
    >
    > Can you reproduce it, or not reproduce it, with other modules?


    I had the same kind of crash with XML:Twig. I first thought i was writing
    really bad code, but i got suspicious when it also happend with LWP.

    I cannot reproduce it anymore, since i solved the problem.
     
    perl, Oct 27, 2006
    #6
  7. perl

    Sisyphus Guest

    "perl" <> wrote in message
    ..
    ..
    > I detected an older
    > version of ActiveState Perl (5.6.1) which was also installed. I simply
    > removed both ones and reinstalled the actual 5.8.8. Now it seems to work.
    >


    Perl 5.6.1 and 5.8.8 are "binary incompatible". The error you reported is
    fairly typical of what happens when the perl 5.8.8 executable finds a binary
    built for perl 5.6.1 (or, conversely, when the perl 5.6.1 executable finds a
    binary built for 5.8.8).

    By removing the older version of perl, you've eliminated one way for a
    "binary incompatibility" to arise :)

    Cheers,
    Rob
     
    Sisyphus, Oct 27, 2006
    #7
  8. perl

    J. Gleixner Guest

    perl wrote:
    >>> The error message i got is the typical
    >>> popup window (translated from german):
    >>> perl.exe caused an error an will be closed.

    >> Ouch. That sounds bad.
    >>
    >> I think LWP is pure perl, otherwise I'd first think of an incompatible
    >> DLL from a module somewhere.
    >>
    >> Can you reproduce it, or not reproduce it, with other modules?

    >
    > I had the same kind of crash with XML:Twig. [...]


    Maybe if you tried XML::Twig it would have helped. :)
     
    J. Gleixner, Oct 27, 2006
    #8
  9. perl

    perl Guest

    > >>> The error message i got is the typical
    > >>> popup window (translated from german):
    > >>> perl.exe caused an error an will be closed.
    > >> Ouch. That sounds bad.
    > >>
    > >> I think LWP is pure perl, otherwise I'd first think of an incompatible
    > >> DLL from a module somewhere.
    > >>
    > >> Can you reproduce it, or not reproduce it, with other modules?

    > >
    > > I had the same kind of crash with XML:Twig. [...]

    >
    > Maybe if you tried XML::Twig it would have helped. :)


    Ahm, that's what i was meaning of course :)
     
    perl, Oct 30, 2006
    #9
  10. perl

    perl Guest

    > > I detected an older
    > > version of ActiveState Perl (5.6.1) which was also installed. I simply
    > > removed both ones and reinstalled the actual 5.8.8. Now it seems to

    work.
    > >

    >
    > Perl 5.6.1 and 5.8.8 are "binary incompatible". The error you reported is
    > fairly typical of what happens when the perl 5.8.8 executable finds a

    binary
    > built for perl 5.6.1 (or, conversely, when the perl 5.6.1 executable finds

    a
    > binary built for 5.8.8).
    >
    > By removing the older version of perl, you've eliminated one way for a
    > "binary incompatibility" to arise :)


    I did not expect of such trouble having 2 different (incompatible) versions.
    Good to know this.

    Thank you,
    Zed
     
    perl, Oct 30, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hongtu
    Replies:
    3
    Views:
    1,028
    Hongtu
    Oct 8, 2004
  2. Peter Row
    Replies:
    1
    Views:
    316
    Peter Row
    Apr 19, 2004
  3. jim
    Replies:
    0
    Views:
    398
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,969
    Smokey Grindel
    Dec 2, 2006
  5. Dilbert
    Replies:
    0
    Views:
    843
    Dilbert
    Nov 10, 2011
Loading...

Share This Page