Ticket #1417 (assigned defect)
Debugger hangs with 'Show Local Variables' and very deep data-structures
| Reported by: | whumann | Owned by: | bowtie |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Debugger for Perl 5 | Version: | 0.97 |
| Keywords: | Cc: |
Description
Try to step through this
use strict;
use warnings;
my $foo = {};
sub deep {
my ($depth, $ref) = @_;
return if $depth > 3;
deep($depth+1, ($ref->{$_}={})) for 'a'..'f';
}
deep(0, $foo);
my $bar = 17;
After deep(0, $foo); Padre needs a long time to recover and show $foo's new value. Change max. $depth to 6 and it hangs 'forever'.
Change History
comment:2 Changed 15 months ago by whumann
Sorry, can't reproduce '100 levels deep in subroutine calls!'. Tried on perls 5.8.8, 5.10.1, 5.14.2. Without debugger, with debugger commandline perl -d, with Padre debugger ('Show Local Variables' off). Never happens to me. And I would not expect it: Recursive calls are with $depth+1 so recursion should never go deeper than 3 or 6 in the above examples.
Note: See
TracTickets for help on using
tickets.

perl5db.pl
throws this error, and stops
we my need to look at changing the default
Add the line:
to the start of your program.
or in the case of $depth = 6 > 50000 :)