MovieClip.objects.new() segfault when no name is passed
Closed, ResolvedPublic

Description

1) open a movie or image in the Movie Clip Editor
2) in the console do:
>>> mc=bpy.data.movieclips[0]
>>> mc.tracking.objects.new(name="dalai") # It works
3) now to crash it do:
>>> mc=bpy.data.movieclips[0]
>>> mc.tracking.objects.new()

* note, step (2) is optional. If you do (1) and (3) it segfaults just as well

Backtrace:
###########

#0 0x00007fff8c16a4f0 in strlen ()
#1 0x0000000100af0a60 in BLI_strncpy (dst=0x10e472cb8 "", src=0x0, maxncpy=64) at string.c:72
#2 0x00000001009a20e9 in BKE_tracking_new_object (tracking=0x107c908e8, name=0x0) at tracking.c:2956
#3 0x00000001012f9ce3 in rna_trackingObject_new (tracking=0x107c908e8, name=0x0) at rna_tracking.c:441
#4 0x00000001012fff7a in MovieTrackingObjects_new_call (C=0x107722ec8, reports=0x7fff5fbfddc0, _ptr=0x1101383a0, _parms=0x7fff5fbfe0a8) at rna_tracking_gen.c:2903
#5 0x00000001011bfe8a in RNA_function_call (C=0x107722ec8, reports=0x7fff5fbfddc0, ptr=0x1101383a0, func=0x103d12b80, parms=0x7fff5fbfe0a8) at rna_access.c:5092
#6 0x00000001005fb560 in pyrna_func_call (self=0x110138390, args=0x10c984050, kw=0x0) at bpy_rna.c:5106
#7 0x0000000101c68878 in PyObject_Call (func=0x110138390, arg=0x10c984050, kw=0x0) at Objects/abstract.c:2149
#8 0x0000000101d103d2 in do_call [inlined] () at :4101
#9 0x0000000101d103d2 in call_function [inlined] () at :3904
#10 0x0000000101d103d2 in PyEval_EvalFrameEx (f=0x10e485660, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:2679
#11 0x0000000101d13f8f in PyEval_EvalCodeEx (_co=0x11012af10, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3317
#12 0x0000000101d1426f in PyEval_EvalCode (co=<value temporarily unavailable, due to optimizations>, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:767
#13 0x0000000101d097ce in builtin_exec (self=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>) at Python/bltinmodule.c:813
#14 0x0000000101d12c0c in PyEval_EvalFrameEx (f=0x10fcb0020, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3881
#15 0x0000000101d1226b in PyEval_EvalFrameEx (f=0x108142c20, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3969
#16 0x0000000101d13f8f in PyEval_EvalCodeEx (_co=0x110125360, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x108142bd8, argcount=3, kws=0x108142bf0, kwcount=0, defs=0x10fb566e0, defcount=2, kwdefs=0x0, closure=0x0) at Python/ceval.c:3317
#17 0x0000000101d12193 in fast_function [inlined] () at :3979
#18 0x0000000101d12193 in PyEval_EvalFrameEx (f=0x108142a40, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3902
#19 0x0000000101d1226b in PyEval_EvalFrameEx (f=0x10e4985a0, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3969
#20 0x0000000101d1226b in PyEval_EvalFrameEx (f=0x10e489f10, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3969
#21 0x0000000101d13f8f in PyEval_EvalCodeEx (_co=0x10ebc42d8, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=0x10eba02f0, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3317
#22 0x0000000101c9560a in function_call (func=0x10ef0e518, arg=0x10eba02d8, kw=0x0) at Objects/funcobject.c:629
#23 0x0000000101c68878 in PyObject_Call (func=0x10ef0e518, arg=0x10eba02d8, kw=0x0) at Objects/abstract.c:2149
#24 0x00000001005fe332 in bpy_class_call (C=0x107722ec8, ptr=0x7fff5fbff750, func=0x103d6fc80, parms=0x7fff5fbff730) at bpy_rna.c:7015
#25 0x000000010132571e in operator_execute (C=0x107722ec8, op=0x10e4882f8) at rna_wm.c:866
#26 0x000000010001112d in wm_operator_invoke (C=0x107722ec8, ot=0x10fc2c258, event=0x10e487748, properties=0x1130968c8, reports=0x0, poll_only=0) at wm_event_system.c:846
#27 0x0000000100012b0a in wm_handler_operator_call (C=0x107722ec8, handlers=0x10e4d1520, handler=0x1130a8118, event=0x10e487748, properties=0x1130968c8) at wm_event_system.c:1430
#28 0x0000000100013429 in wm_handlers_do (C=0x107722ec8, event=0x10e487748, handlers=0x10e4d1520) at wm_event_system.c:1680
#29 0x000000010001446d in wm_event_do_handlers (C=0x107722ec8) at wm_event_system.c:2037
#30 0x000000010000aad4 in WM_main (C=0x107722ec8) at wm.c:366
#31 0x0000000100009e40 in main (argc=1, argv=0x7fff5fbffbb0) at creator.c:1351
(gdb)

########

Blender 2.63 test build and trunk. Tested in Linux and OSX

Details

Type
Bug

Fixed in svn rev45528. Thanks for the report, closing.

Sergey Sharybin (sergey) closed this task as Resolved.Apr 11 2012, 9:35 AM