[Bf-committers] Re: [Bf-blender-cvs] CVS commit:blender/source/blender/blenlib/intern util.c

Ton Roosendaal ton at blender.org
Wed Nov 2 09:03:21 CET 2005


Hi,

No problem... :) what I heard yesterday is that is related to how you  
start Blender in Windows. If you double-click the executable it goes,  
using it with a shortcut (via start menu) it crashes. This is something  
a windows developer could find out. What is the difference in paths  
being sent to this function in util.c?

Andrea; the function BLI_make_file_string() is called in Blender with  
const strings, like:

BLI_make_file_string("/", name, BLI_gethome(), ".Blog");
but also with dynamic strings:
BLI_make_file_string(curWd, fnameCfgPath, outDir, fnameCfg);

This API could need a more strict design, here using 'const' can be  
useful yes. :)

-Ton-


On 2 Nov, 2005, at 8:44, Andrea Weikert wrote:

> Hi,
>
> sorry about that, I have temporarily disabled my fix for now so  
> testbuilds can
> go on.
>
> I have no time right now (work) but will provide a propper fix as soon  
> as
> possible.
>
> --- Andrea
>
> ----- Original Message -----
> From: "Ken Hughes" <khughes at pacific.edu>
> Cc: "Andrea Weikert" <elubie at gmx.net>; <bf-committers at blender.org>
> Sent: Wednesday, November 02, 2005 4:50 AM
> Subject: Re: [Bf-committers] Re: [Bf-blender-cvs] CVS
> commit:blender/source/blender/blenlib/intern util.c
>
>
>> Stephane SOPPERA wrote:
>>>
>>>> elubie (Andrea Weikert) 2005/11/01 21:25:23 CET
>>>>
>>>>  Modified files:
>>>>    blender/source/blender/blenlib/intern util.c
>>>>  Log:
>>>>  Fix for item #3316 : make sure that BLI_make_file_string converts  
>>>> all
>>>>  slashes in the filenames to the system preferred direction.
>>>>  Leaving unix slashes caused the error in the Python module
>>>>  blender.Get('filename')
>>>>
>>>>  Revision  Changes    Path
>>>>  1.29      +5 -1      blender/source/blender/blenlib/intern/util.c
>>>>
>>>>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/ 
> blender/blenlib/
> intern/util.c.diff?r1=1.28&r2=1.29&cvsroot=bf-blender>
>>>>
>>>>
>>>>
>>>
>>> This modification make my scons-vc7 build (on windowsXPhome) crash  
>>> when
>>> starting blender.
>>>
>>>
>>> The call stack is:
>>> 00 009317fc 0000002f 0000005c blender!BLI_char_switch(unsigned char *
>>> string = 0x009317fc "/locale", unsigned char from = 0x2f '/',  
>>> unsigned
>>> char to = 0x5c '\')+0x29 (FPO: [Non-Fpo]) (CONV: cdecl)
>>> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 645]
>>> 01 009317f4 00000a28 00a7fef8 blender!BLI_clean(unsigned char * path  
>>> =
>>> 0x009317f4 ".blender/locale")+0x32 (FPO: [Non-Fpo]) (CONV: cdecl)
>>> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 634]
>>> 02 00931804 0158c78c 00a7fef8 blender!BLI_make_file_string(unsigned  
>>> char
>>> * relabase = 0x00931804 "/", unsigned char * string = 0x0158c78c
>>> "C:\blender\blender\.blender\.blender\locale", unsigned char * dir =
>>> 0x00a7fef8 "C:\blender\blender\.blender", unsigned char * file =
>>> 0x009317f4 ".blender/locale")+0x1a2 (FPO: [Non-Fpo]) (CONV: cdecl)
>>> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 733]
>>> 03 7ffd9000 0158c788 00000000  
>>> blender!FTF_TTFont::FTF_TTFont(void)+0xc9
>>> (FPO: [Non-Fpo]) (CONV: thiscall)
>>> [c:\blender\blender\source\blender\ftfont\intern\ftf_ttfont.cpp @  
>>> 119]
>>> 04 0158016c 0012fd98 00478ed0 blender!_FTF_GetFont(void)+0x49 (FPO:
>>> [Non-Fpo]) (CONV: cdecl)
>>
>> Phooey; Forgot about passing constant strings to  
>> BLI_make_file_string().
>> Line 119 in source\blender\ftfont\intern\ftf_ttfont.cpp:
>>
>> BLI_make_file_string("/", messagepath,  
>> BLI_gethome(),".blender/locale");
>>
>> Strange that the earlier "BLI_char_switch(file, '\\', '/');" doesn't
>> cause a problem.  Guess the string is already in *nix format at that
>> time.  We assumed that if it was modifying the string already, it was  
>> OK
>> to modify it again.
>>
>> Ken
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list