Seg fault on inspecting objects
Status: Beta
Brought to you by:
jackdied
If you try to check the type or display as a string one
of the Combination objects, python seg faults. The
library behaves nicely otherwise (v0.912, python2.4).
I guess it's more of a wish than a necessity, but it
would be nice if instead of crashing python, these
calls gave something sensible. It'd be enough to just have:
> x = probstat.Combination([1,2,3,4], 3)
> print x
<Combination instance>
Basically anything other than seg faulting would be good =)
Thanks,
Lars
Logged In: YES
user_id=705742
Second this bug
Logged In: YES
user_id=259020
Originator: NO
{Maybe this should be a new bug, but it looks similar}
Using v0.912 with python 2.3 compiled with MSVC, I can print the object, but trying help(object) crashes:
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import probstat
>>> x = probstat.Combination([1,2,3,4], 3)
>>> print x
<Combination object at 0x0091A170>
>>> print len(x)
4
>>> print list(x)
[[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]
>>> help(x)
{crash at this point, Windows offers to debug}
Unhandled exception in python.exe (PYTHON23.DLL): 0xC0000005: Access Violation
Break point is the first line here:
1E05CAC0 mov eax,dword ptr [edi+48h]
1E05CAC3 test eax,eax
1E05CAC5 je 1E05CAD2
1E05CAC7 push esi
1E05CAC8 push ebx
1E05CAC9 call eax
1E05CACB add esp,8
1E05CACE pop edi
1E05CACF pop esi
1E05CAD0 pop ebx
1E05CAD1 ret
...
(Don't know if that helps at all)