[Bf-committers] About instant crash when reloading python (F8)

Bastien Montagne montagne29 at wanadoo.fr
Wed Apr 3 17:53:17 CEST 2013


Hi devs,

Posting this to keep track of what I have found so far, and see whether 
others devs have ideas about the problem...

So, this is about instant segfault that is regularly reported by users 
when trying to reload python code with F8 shortcut. I finally managed to 
find (I think!) what is the issue: it appears when one or more addons 
which define keymaps are enabled.

Now, I gdb-tracked it down to WM_keyconfig_update(), wm_keymap.c:1104. 
Here, kmdi->add_item->ptr PointerRNA seems to be corrupted some way, 
just after reload (at least its type (StructRNA) member, sometimes it 
has a NULL identifier, and invalid description/translation_context 
pointers, sometimes it points to a wrong type...).

I tried to force this pointer to NULL (see *ugly* patch attached, or 
http://www.pasteall.org/41030/diff ), and everything seems to work fine 
again.

Questions are: why those PointerRNA become corrupted? Because of py 
reloading, which deletes/recreates some RNA structs (operators, menus, 
etc.)?
And would that kind of patch be considered as acceptable?

Best regards,
Bastien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.diff
Type: text/x-patch
Size: 983 bytes
Desc: not available
Url : http://lists.blender.org/pipermail/bf-committers/attachments/20130403/637b8cc3/attachment.bin 


More information about the Bf-committers mailing list