Sections
Timeline
Browse Source
New Ticket
Sub-Sections
Download
Comma-delimited Text
Tab-delimited Text
RSS Feed
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Ticket #21 (closed defect: fixed)

Opened 3 months ago

Last modified 8 weeks ago

pycallgraph-dot.py cannot be called on itself

Reported by: Sandro Tosi <matrixhasu@…> Owned by: gak
Priority: critical Component: general
Version: 0.5.0 Keywords:
Cc:

Description

Hi!
I'm part of the team that maintain pycallgraph in Debian, and a user reported an error about calling pycallgraph-dot.py on itself; here is the stack trace (version is 0.4.1):

$ which pycallgraph-dot 
/usr/bin/pycallgraph-dot
$ /usr/bin/pycallgraph-dot /usr/bin/pycallgraph-dot out.png
Traceback (most recent call last):
  File "/usr/bin/pycallgraph-dot", line 111, in <module>
    execfile(args[0])
  File "/usr/bin/pycallgraph-dot", line 109, in <module>
    time_filter_func=time_filter_func,
  File "/var/lib/python-support/python2.5/pycallgraph.py", line 178, in start_trace
    reset_trace()
  File "/var/lib/python-support/python2.5/pycallgraph.py", line 111, in reset_trace
    call_stack_timer = []
  File "/var/lib/python-support/python2.5/pycallgraph.py", line 280, in tracer
    t = call_stack_timer.pop(-1)
IndexError: pop from empty list

I did some tests (copying the script and modifying it):

  • removing pycallgraph.start_trace call, we receive a RuntimeError: maximum recursion depth exceeded in cmp
  • removing pycallgraph.start_trace call and execfile(args[0]) call too, the program runs fine.

It would be great if you can find a solution to this.

Thanks in advance,
Sandro

Attachments

Change History

Changed 8 weeks ago by gak

  • status changed from new to closed
  • version set to 0.5.0
  • resolution set to fixed

Add/Change #21 (pycallgraph-dot.py cannot be called on itself)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.