[ macperl-Bugs-467732 ] Crash on Quit with mirror() and nonexistant dir

[email protected]
Newsgroups perl.macperl.porters
Message-ID <[email protected]>
Bugs item #467732, was opened at 2001-10-03 21:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=107940&aid=467732&group_id=7940

Category: MacPerl Application
Group: Development Branch
Status: Open
Resolution: None
Priority: 7
Submitted By: Morbus Iff (morbus)
Assigned to: Matthias Neeracher (neeri)
Summary: Crash on Quit with mirror() and nonexistant dir

Initial Comment:
The following report was reproducible on my 9.2.1 
machine using Beta 1. Code follows. This behavior 
happened when the script was compiled as a 
runtime OR not, as well as when the script was in 
the MacPerl install dir OR not.

 #!/usr/bin/perl -w

 use strict;
 use LWP;
 use LWP::Simple;
 use IO::Socket;
 my $url = 
"http://www.disobey.com/amphetadesk/version.txt";
 my $file = "Splooge:valid-file.txt";
 print "Attempting mirror...";
 mirror($url, $file) or print "Hey! $! / $@";

In the above code, my $file points to a valid location 
in my hierarchy. The code will run fine. If, however, I 
change $file to something nonexistant, the code 
will *seem* to run - no errors are spit out, but no 
file is created as well. At this point, if you File > 
Quit, MacPerl will crash with a type 2 error.

open()ing a nonexistant location properly gives an 
error, and the crash does not happen.

----------------------------------------------------------------------

>Comment By: Morbus Iff (morbus)
Date: 2001-10-04 11:34

Message:
Logged In: YES 
user_id=69804

On a side note, yes, I think mirror() was returning with 
501 - I knew there wouldn't be any error (thus showing my 
complete ignorance with the 'or print' line). Anyways, you 
may want to try the following hosts/valid files to see if 
you get the same MacsBug:

  http://www.gamegrene.com/index.posts
  http://www.totalnetnh.net/tech/linecheck.htm

The first URL is the same server as Disobey.com. The second 
URL is same ISP, but different server. I sysadmin at the 
ISP in question, so can bring any additional information to 
bare if needed.


----------------------------------------------------------------------

Comment By: Chris Nandor (pudge)
Date: 2001-10-04 08:02

Message:
Logged In: YES 
user_id=3660

The fact that it does not give you an error is not a bug.  
That is the documented behavior.  mirror() does not return 
true/false, but a response code.

That MacPerl crashes on exit is a bug, of course.  Matthias, 
here is a test case:

  #!/usr/bin/perl -w
  use LWP::Simple; 
  mirror("http://www.disobey.com/amphetadesk/version.txt",
    "Bourque:Desktop Foldera:valid-file.txt");

Note the invalid folder name.  This script drops me into 
MacsBug with an error in OTLookupName.  It seems to be 
specific to this host (I tried with other hosts and didn't 
get the crash).


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=107940&aid=467732&group_id=7940
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.