[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/blenkernel BKE_font.h BKE_global.h blender/source/blender/blenkernel/intern blender.c font.c blender/source/blender/blenlib BLI_vfontdata.h blender/source/blender/blenlib/intern freetypefont.c psfont.c blender/source/blender/blenloader/intern ...

Stephane SOPPERA stephane.soppera at wanadoo.fr
Wed Sep 14 19:05:31 CEST 2005


Stephane SOPPERA wrote:

> Stephane SOPPERA wrote:
>
>> Alexander Ewering wrote:
>>
>>>
>>> On Wed, 14 Sep 2005, Johnny Matthews wrote:
>>>
>>>> Blender now crashes when I add a text object...sorry :(
>>>>
>>>> Windows XP
>>>> MSVC/Scons Build
>>>
>>>
>>>
>>>
>>> Backtrace?
>>
>>
>>
>> blender!wcs2utf8s+0x6
>> blender!update_string+0x5b
>> blender!make_editText+0x1c2
>> blender!enter_editmode+0x1ca
>> blender!add_primitiveFont+0x184
>> blender!do_info_addmenu+0x2c
>> blender!uiDoBlocks+0x47a
>> blender!toolbox_n+0x6e8
>> blender!screenmain+0x62f
>> blender!main+0x7ea
>> blender!mainCRTStartup+0x16c
>> WARNING: Stack unwind information not available. Following frames may 
>> be wrong.
>> kernel32!RegisterWaitForInputIdle+0x49
>>
>> It looks like the stack is corrupted by wcs2utf8 after a few 
>> iteration (it disappears from the debugger after iterating).
>> I haven't debugged it further yet. I don't understand what are all 
>> these variables yet and don't understand why for UTF8 strings, 
>> wchar_t are used.
>>
>> Stephane
>
>
> In "htoutf8", there is:
> memset(o, 0, 16);
>
> but o is only 5 chars long. I think that the stack corruption, 
> resulting in an IP register == 0 resulting in core-dump comes from there.
>
> What do you think about that Alexander?

I just tried this correction, and the core-dump disappeared.
The correction is just to replace this memset(o,0,16) by an 
memset(o,0,5).  That seems quite logical to me.

Stephane



More information about the Bf-committers mailing list