[Bf-taskforce25] RNA/keymap issue (was svn commit)

Ton Roosendaal ton at blender.org
Thu Jan 22 17:25:47 CET 2009


Hi Brecht,

Someone else using MSVC9 'release build' reports a TAB crash too (on  
default cube). Debug build goes fine...

Maybe you can run valgrind on this?

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands

On 13 Jan, 2009, at 22:19, Nathan Letwory wrote:

> Ton, Brecht,
>
> this one is probably a good one for either of you :)
>
> /Nathan
>
> 2009/1/13 Nathan Letwory <jesterking at letwory.net>:
>> Revision: 18490
>>           
>> http://projects.blender.org/plugins/scmsvn/viewcvs.php? 
>> view=rev&root=bf-blender&revision=18490
>> Author:   jesterking
>> Date:     2009-01-13 22:18:05 +0100 (Tue, 13 Jan 2009)
>>
>> Log Message:
>> -----------
>> 2.5 / Keymap definition
>> * For some reason builds on Windows would crash when tabbing into  
>> edit mode with default .b.blend
>>  Problem is that it is not very clear why it happens. The debug trace  
>> I managed to get pointed at
>>  SCRIPT_OT_run_pyfile being run when pressing TAB.
>>  Changing the way how this quickhack for running scripts is added  
>> made the crash go away, but this
>>  points at a potential problem in the creation of keymaps. The  
>> original form is the plenty used:
>>
>>  RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile",  
>> PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py");
>>
>>  But changing that to:
>>
>>  km = WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY,  
>> KM_PRESS, 0, 0);
>>  RNA_string_set(km->ptr, "filename", "test.py");
>>
>>  Properly prevents the execution of the script operator. It looks  
>> like somewhere
>>  something goes wrong, but no idea what, yet. Probably a good thing  
>> to investigate now!
>>  Apparently this doesn't happen on Linux (and probably not on OSX  
>> either).
>>
>> Modified Paths:
>> --------------
>>     
>> branches/blender2.5/blender/source/blender/editors/space_view3d/ 
>> view3d_ops.c
>>
>> Modified:  
>> branches/blender2.5/blender/source/blender/editors/space_view3d/ 
>> view3d_ops.c
>> ===================================================================
>> ---  
>> branches/blender2.5/blender/source/blender/editors/space_view3d/ 
>> view3d_ops.c        2009-01-13 20:50:07 UTC (rev 18489)
>> +++  
>> branches/blender2.5/blender/source/blender/editors/space_view3d/ 
>> view3d_ops.c        2009-01-13 21:18:05 UTC (rev 18490)
>> @@ -163,7 +163,8 @@
>>        WM_keymap_add_item(keymap, "VIEW3D_OT_wpaint_toggle", TABKEY,  
>> KM_PRESS, KM_CTRL, 0);
>>
>>        /* TODO - this is just while we have no way to load a text  
>> datablock */
>> -       RNA_string_set(WM_keymap_add_item(keymap,  
>> "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename",  
>> "test.py");
>> +       km = WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY,  
>> KM_PRESS, 0, 0);
>> +       RNA_string_set(km->ptr, "filename", "test.py");
>>
>>        transform_keymap_for_space(wm, keymap, SPACE_VIEW3D);
>>
>>
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
>>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>



More information about the Bf-taskforce25 mailing list