atom feed4 messages in [Bf-committers] MSVC2008 debug bu...
FromSent OnAttachments
Benoit BolseeDec 6, 2012 3:12 pm 
Antony RiakiotakisDec 6, 2012 4:39 pm 
Campbell BartonDec 6, 2012 10:27 pm 
Brecht Van LommelDec 6, 2012 11:29 pm 
Subject:Re: [Bf-committers] MSVC2008 debug build crash on exit with latest SVN
From:Campbell Barton (
Date:Dec 6, 2012 10:27:39 pm

This assertion is caused by a workaround to set pythons encoding for the stdout/stderr - r52739, to fix bug [0], the issue is reported on Pythons bug tracker [1] but looks like a way around this won't be available in a Python release any time soon.

Theres not much info available on how to change the encoding on a running python interpreter and I couldn't find a way to stop this assertion. If someone knows how then would be great, perhaps its really simple but I tried restoring the previous stdout/stderr before exiting, then removing the backup's (which hangs on exit). also storing the backup files as members of the newly created file objects (which does nothing).

As far as I can see the options are... - remove the workaround and suffer bug [#31555] - keep the workaround and suffer the assert(). - apply the patch to python that adds PyOS_PutEnv(), means rebuilding python on all OS's. - link python statically (apparently this way we'd be able to control its env vars) - start blender from a BAT-file/shell-script which sets the environment variable from the parent process. - use a C hack which modifies the encoding for stdout/stderr in-place (error prone but may work). - spend more time trying to find a workaround that doesn't assert.

[0] [1]

On Fri, Dec 7, 2012 at 11:39 AM, Antony Riakiotakis <> wrote:

I can confirm that on MinGW too. Debug builds only