Blender hangs when I try to open this file (MSVC12 only)
Closed, ResolvedPublic

Description

Operating System, Graphics card

O.S.: Windows 7, 64-bit (SP1)
Processor: Intel Q9550, memory: 8GB DDR3
Graphic Card: Nvidia Geforce 550 Ti (2x in SLI)
Nvidia graphics driver version: 332.21

Blender version with error, and version that worked

blender-2.69-5c74ac2-win64-vc12

Short description of error

When I try to open the attached file (5MB, 7-zip Mediafire link, due to Phabricator size limit), Blender hangs and I have to kill the application... This is happening with builds since 2 or 3 days ago... But weirdly enough, I can open the file and work fine with the Graphicall builds I've tried ( e.g.: http://www.graphicall.org/444 ). So it seems to be some compilation stuff in official builds.

http://www.mediafire.com/download/gcff9k906udtqt3/BlenderHangs.7z

vc12 builds are not official still. Please try using "Windows 64 bit" from an official group at http://builder.blender.org/download/ (currently it's blender-2.69-5611fb6-win64.zip).

Brecht Van Lommel (brecht) triaged this task as "Normal" priority.

The official build (not VC12) works fine!

Thanks.
tuqueque.

Campbell Barton (campbellbarton) changed the title from "Blender hangs when I try to open this file" to "Blender hangs when I try to open this file (MSVC12 only)".Jan 21 2014, 4:27 AM
Brecht Van Lommel (brecht) raised the priority of this task from "Normal" to "Confirmed".EditedJan 23 2014, 1:30 AM

I can redo this issue, it's a crash in the IK solver, calling the the hypot() function. The tricky thing is that it's the Python headers causing this an there's no simple way to fix this besides editing the headers as far as I can tell.

For older MSVC versions hypot was defined only as _hypot, so you have "#define hypot _hypot" in various Blender headers and also the Python header pyconfig.h. In the Blender headers that is now only done if _MSC_VER < 1800, because it causes an infinite loop in the visual studio math.h, which has code like this:

__inline double __CRTDECL hypot(_In_ double _X, _In_ double _Y)
{
    return _hypot(_X, _Y);
}

If you replace hypot by _hypot then that gives infinite recursive calls. It's pretty easy to change the pyconfig.h file to add an "#if _MSC_VER < 1800" to avoid this, and we should submit a patch upstream because it doesn't seem to be fixed there either.

Brecht Van Lommel (brecht) closed this task as "Resolved".Jan 23 2014, 9:36 PM

Closed by commit rBL61278.

Python bug report:
http://bugs.python.org/issue20221

@Martijn Berger (juicyfruit), @Thomas Dinges (dingto): CC-ing you to notify you of this fix, in case you will rebuild the Python libraries for visual studio 2013 before it's fixed upstream.