Ticket #1417 (assigned defect)

Opened 2 years ago

Last modified 20 months ago

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:1 Changed 2 years ago by bowtie

perl5db.pl

throws this error, and stops

100 levels deep in subroutine calls!

we my need to look at changing the default

Add the line:

$DB::deep = 500; # or more if necessary

to the start of your program.

or in the case of $depth = 6 > 50000 :)

comment:2 Changed 2 years 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.

comment:3 Changed 2 years ago by bowtie

  • Owner set to bowtie
  • Status changed from new to assigned

comment:4 Changed 20 months ago by bowtie

  • Version changed from 0.95 to 0.97
Note: See TracTickets for help on using tickets.