[Bf-python] Theme related crashes

Stefan Gartner stefang at aon.at
Thu Nov 11 15:17:26 CET 2004


Hi all,
while "porting" blender to Linux/x86_64, I noticed that blender crashes when 
using the Scripts Help Browser, specifically, when selecting the Scripts Help 
Browser from the Help dropdown in the script (does that make sense?). 
Investigating the cause of the crash, I realized that line 103 of 
source/blender/python/api2_2x/windowTheme.c should probably say 

sizeof( BPy_ThemeSpace ),       /* tp_basicsize */

instead of

sizeof( BPy_Theme ),    /* tp_basicsize */

Changing that line doesn't quite fix the problem, as it still crashes, but on 
a different line, saying

free(): invalid pointer 0x1158d40!

and changing the UI to an let's say "interesting" theme.

Here's a backtrace (from a blender build with the above change):

#0  0x0000000000aeb405 in PyObject_Malloc ()
#1  0x0000000000aea30d in _PyObject_New ()
#2  0x00000000007e43e2 in M_Theme_Get (self=0x0, args=0x2a979fd088) at 
windowTheme.c:555
#3  0x0000000000ae7aac in PyCFunction_Call ()
#4  0x0000000000b150eb in call_function ()
#5  0x0000000000b1338c in eval_frame ()
#6  0x0000000000b14049 in PyEval_EvalCodeEx ()
#7  0x0000000000ad845a in function_call ()
#8  0x0000000000acd3a0 in PyObject_Call ()
#9  0x0000000000b14e93 in PyEval_CallObjectWithKeywords ()
#10 0x00000000007d76d9 in exec_callback (sc=0x1149560, callback=0x2a97d3a230,
    args=0x2a979fd088) at Draw.c:433
#11 0x00000000007d785c in BPY_spacescript_do_pywin_draw (sc=0x1149560) at 
Draw.c:477
#12 0x00000000006bf846 in drawscriptspace (sa=0x114f9d0, spacedata=0x1149560)
    at drawscript.c:109
#13 0x0000000000644b86 in scrarea_do_windraw (area=0x114f9d0) at 
spacetypes.c:109
#14 0x0000000000644dfd in screen_swapbuffers_REDRAW (sc=0x114c8e0) at 
swapbuffers.c:118
#15 0x000000000064539e in screen_swapbuffers () at swapbuffers.c:289
#16 0x00000000005a4fd9 in screen_dispatch_events () at editscreen.c:987
#17 0x00000000005a5750 in screenmain () at editscreen.c:1205
#18 0x00000000005605bb in main (argc=6, argv=0x7fbffff698) at creator.c:602


greetings,
sgefant



More information about the Bf-python mailing list