Share

PyS60

Tracker: Bugs

5 e32.ao_calllgate is not reference counted properly? - ID: 1458751
Last Update: Settings changed ( jplauril )

Consider this code:
def foo():
. x = e32.ao_callgate(lambda x: None)
. thread.start_new_thread(x, ())

This will cause Kern-Exec 3. However, following does work:
x = e32.ao_callgate(lambda x: None)
def foo():
thread.start_new_thread(x, ())

I assume this is caused by forgetting to add ref count?


Simo Salminen ( ssalmine ) - 2006-03-26 14:28

5

Closed

Fixed

Jukka Laurila

e32

None

Public


Comment ( 1 )

Date: 2007-06-12 17:35
Sender: jplaurilProject Admin


Fixed, fix will be in 1.3.23. You were right - the cause was a missing
Py_INCREF. It's necessary to INCREF the callgate object when a call is
made, and DECREF it when a call is completed. After a bit of thinking I
think this probably is the right thing to do.

Incidentally, this also fixes this other callgate related bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=1518165&group_id=154155&atid=790646




Attached File

No Files Currently Attached

Changes ( 8 )

Field Old Value Date By
close_date - 2007-06-13 12:14 jplauril
status_id Open 2007-06-13 12:14 jplauril
assigned_to vbartoni 2007-06-12 17:35 jplauril
resolution_id None 2007-06-12 17:35 jplauril
assigned_to nobody 2007-02-19 16:26 jplauril
assigned_to janimr 2007-02-09 09:08 jplauril
assigned_to nobody 2007-02-09 09:08 jplauril
category_id None 2007-02-09 09:08 jplauril