Opened 3 years ago

Last modified 3 years ago

#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:


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 (4)

comment:1 Changed 3 years ago by bowtie

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 3 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 3 years ago by bowtie

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

comment:4 Changed 3 years ago by bowtie

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