Has anyone seen an issue where "sleep 1;" causes an infinite loop in
perl (100% CPU usage -- no movement in the script)?  Build 816 in case
it matters..  It just started happenning today in a script I wrote a
very long time ago and haven't modified in a while.  Similarly, running
perl from the command prompt and entering my only command as "sleep 1;",
doesn't exhibit this behavior (hang).

As well, in the script that is misbehaving, if I change "sleep 1;" to
"Win32:Sleep(1000);" it behaves as I expect it to.

It's almost like there's another sleep sub/func somewhere that is
getting called instead of the normal one, but I can't find such a case
in any of the modules that the script uses.

It's an IE script using Win32::OLE to attach to InternetExplorer via
COM.

Ok...  More wierdness...

Other sleep statements in the script work... And it hangs in 1
particular place in the login process to a website that I harvest my
wife's 401K data from.  It hangs between "7" and "8" in the sub below
after pressing a submit button for submitting my credentials.

sub check_ready_state {
  #where $obj is an InternetExplorer.Application COM object
  my $obj = $_[0];
  my $x=0;
  print "1\n";
  while ($obj->{Busy} == 1) {
    print "2\n";
    $x++;
    if ($x > 30) {
       print "3\n";
      print "IE Is taking a really long time to open\nI've decided to
return a failure\n";
      return 0;
    }
    print "4\n";
    if ($x == 1) { 
      print "5\n";
      print "  Ready State: ";
    }
    print "6\n";
    print $obj->{ReadyState};
    if ($obj->{Busy} == 1) {
      print "7\n";
      sleep 1; #Win32::Sleep(1000); works
    }
    print "8\n";
  }
  print "9\n";
  return 1;
}

Steven

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to