SystemError: ... cellobject.c:22: bad argument to internal ?

robert no-spam at no-spam-no-spam.com
Tue May 16 22:48:55 CEST 2006


nnorwitz at gmail.com wrote:
> robert wrote:
> 
>>From the trace of a 2.3.5 software i got:
>>
>>\'SystemError:
>>C:\\\\sf\\\\python\\\\dist23\\\\src\\\\Objects\\\\cellobject.c:22: bad
>>argument to internal
>>function\\n\']
> 
> 
> ...
> 
> 
>>Will there be another bug-fix release of Python 2.3   ?
> 
> 
> No, is this still a problem in 2.4?  2.4.4 is planned to be released

( Am bound to py2.3 for this app - as py2.4 more than doubled 
distributable app sizes with MSVCRTL71, CJK codecs in core etc... )

> this summer.  Can you post the entire code (that doesn't reference
> anything outside the stdlib) that causes this problem?
> 

Solved - no Python error.

The bug turned out to be a refcount bug in PythonWin's 
win32ui.HookMessage internals: the Python callback upon WM_TIMER didn't 
INCREF the called function object itself. When the function removed 
itself from the hook list (indirectly), the executing functions 
closure/cells.. were recycled while the function was still executing.

https://sourceforge.net/tracker/index.php?func=detail&aid=1489690&group_id=78018&atid=551954

-robert



More information about the Python-list mailing list