classification
Title: hotshot IndexError when loading stats
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ratsberg, werneck (2)
Priority: normal Keywords: easy

Created on 2007-11-02 19:17 by ratsberg, last changed 2008-08-24 22:20 by nnorwitz.

Files
File name Uploaded Description Edit Remove
issue_1375_hotshot.patch werneck, 2008-02-23 18:17 patches /hotshot/log.py
Messages (2)
msg57061 - (view) Author: Ruben Reifenberg (ratsberg) Date: 2007-11-02 19:17
Python 2.4.4 - 64 Bit
This code reproduceably fails with
IndexError: pop from empty list


def start(x):
	x.start()
	
if __name__ == "__main__":
	import hotshot
	prof = hotshot.Profile("test3_stats")
	start(prof)
	#prof.start()	
	prof.stop()
	prof.close()
	from hotshot import stats
	s = stats.load("test3_stats")

Note1: This issue may be identical with Issue1019882 (another situation
but same Error.)
Note2: Workaround exists: Replace the line "start(prof)" with
"prof.start()".
In this case, the resulting stats (binary) file is 1 Byte shorter, and
no error happens.
msg62789 - (view) Author: Pedro Werneck (werneck) Date: 2008-02-23 18:17
Fixed by raising StopIteration when the stack is empty.
History
Date User Action Args
2008-08-24 22:20:37nnorwitzsettype: crash -> behavior
2008-02-23 18:17:15wernecksetfiles: + issue_1375_hotshot.patch
nosy: + werneck
messages: + msg62789
2008-01-20 19:52:05christian.heimessetpriority: normal
keywords: + easy
2007-11-02 19:17:01ratsbergcreate