FileSelector SEGV on dynamic callback
Closed, ArchivedPublic


Group: V 2.31 release
Resolution: Fixed
Category: Python

Running the following script provokes causes Blender to
fail with a SIGSEGV:

import Blender.Window

def make_callback(func):
def callback(filename):
print "start callback"
print "end callback"
return callback

def poing(filename):
print "filename =", filename


The problem is caused by
which fails to Py_INCREF(EXPP_FS_PyCallback) before
returning. If this is added, then the corresponding
Py_DECREF must be done prior to setting
EXPP_FS_PyCallback = NULL, ie in getSelectedFile(), and
also at the top of M_Window_FileSelector(), prior to
calling PyArg_ParseTuple(), to handle the case where
the user canceled the file select hence
getSelectedFile() never got called hence
EXPP_FS_PyCallback is still not NULL.

Willian Padovani Germano (ianwill) closed this task as "Archived".Via Old WorldApr 11 2004, 6:05 AM
Nobody (None) added a comment.Via Old WorldFeb 24 2004, 6:25 AM

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.

Add Comment