ActiveState Perl crashs, why ?

P

perl

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";}
 
S

Sisyphus

perl said:
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
 
P

perl

when i run my little perl script, Perl crashes (using
Win2000+ActiveState
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
 
B

Bart Lateur

perl said:
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?
 
P

perl

The error message i got is the typical
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.
 
S

Sisyphus

..
..
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
 
J

J. Gleixner

perl said:
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. :)
 
P

perl

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 :)
 
P

perl

I detected an older
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,520
Members
44,996
Latest member
rainocode

Latest Threads

Top