Python/Windows issue: "import uuid" results in an error popup #27666

Closed
opened 2011-06-15 13:30:55 +02:00 by Gaia Clary · 25 comments
Member

%%%Reproduce:

  • Open Blender on a computer with any Windows Operating system
  • Open the python console
  • Enter: import uuid

I get a popup window stating:

R6034 An application has made an attempt to load the C runtime library incorrectly...

This popup occurs only on the very first attempt to load it.
Subsequent "import uuid" statements do not raise the error again.%%%

%%%Reproduce: - Open Blender on a computer with any Windows Operating system - Open the python console - Enter: import uuid I get a popup window stating: R6034 An application has made an attempt to load the C runtime library incorrectly... This popup occurs only on the very first attempt to load it. Subsequent "import uuid" statements do not raise the error again.%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

blender/blender#38966 was marked as duplicate of this issue

blender/blender#38966 was marked as duplicate of this issue
Author
Member

%%%Additional info: This error only occurs on Windows systems.
Linux and OSX do not suffer from this problem!
%%%

%%%Additional info: This error only occurs on Windows systems. Linux and OSX do not suffer from this problem! %%%

%%%This is very strange, it seems to be an MSVC dependancy issue.

Info I dug up on this issue:
http://bugs.python.org/issue4022
http://weblogs.asp.net/george_v_reilly/archive/2007/02/10/shell-extension-throwing-r6034-errors.aspx

Oddly enough it works in msvc2008 and msvc2010, on my windows XP system but 2.57b release and MinGW builds give the error.%%%

%%%This is very strange, it seems to be an MSVC dependancy issue. Info I dug up on this issue: http://bugs.python.org/issue4022 http://weblogs.asp.net/george_v_reilly/archive/2007/02/10/shell-extension-throwing-r6034-errors.aspx Oddly enough it works in msvc2008 and msvc2010, on my windows XP system but 2.57b release and MinGW builds give the error.%%%
Member

%%%I'm preparing a fix.%%%

%%%I'm preparing a fix.%%%
Member

%%%A fix in r37573.%%%

%%%A fix in r37573.%%%

%%%closing. (if for some reason the fix isn't working reply and I'll re-open)%%%

%%%closing. (if for some reason the fix isn't working reply and I'll re-open)%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

%%%I just updated to revision 37604. Unfortunately i still get the exact same problem when i open the python console and then:

import uuid

I am on windows 7 and i used scons for building:

python scons/scons.py

%%%

%%%I just updated to revision 37604. Unfortunately i still get the exact same problem when i open the python console and then: import uuid I am on windows 7 and i used scons for building: python scons/scons.py %%%
Member

%%%Make sure you don't have any runtime dlls in BF_INSTALLDIR, these will interfere with the fix.%%%

%%%Make sure you don't have any runtime dlls in BF_INSTALLDIR, these will interfere with the fix.%%%
Author
Member

%%%I am building Blender with Visual c++ 2008 Express edition
and 32 bit python and using the following command:

  python scons/scons.py

Here is the list of libraries i have in the installation directory after
the build completes:

BlendThumb.dll
BlendThumb64.dll
OpenAL32.dll
SDL.dll
avcodec-52.dll
avdevice-52.dll
avformat-52.dll
avutil-50.dll
gnu_gettext.dll
iconv.dll
libpng.dll
libsndfile-1.dll
pthreadVC2.dll
python32.dll
swscale-0.dll
wrap_oal.dll
zlib.dll

The fix does still not work for me after completely rebuilding Blender:

  • i deleted the entire installation directory
  • i called: "python scons/scons.py clean"
  • i called: "python scons/scons.py"

After i open Blender, i go to the python console and:

import uuid

still gives me the error as initially reported.

I also tried to build for 64 bit. But i was not able to create a 64-bit Blender
based on my current setup. I also hesiotate to follow the "hack" described
on the Blender wiki, which is not even "officially supported by blebnder developers"

Maybe someone with a working 32-bit version can verify that the issue is not solved
for 32-bit builds.
%%%

%%%I am building Blender with Visual c++ 2008 Express edition and 32 bit python and using the following command: ``` python scons/scons.py ``` Here is the list of libraries i have in the installation directory after the build completes: BlendThumb.dll BlendThumb64.dll OpenAL32.dll SDL.dll avcodec-52.dll avdevice-52.dll avformat-52.dll avutil-50.dll gnu_gettext.dll iconv.dll libpng.dll libsndfile-1.dll pthreadVC2.dll python32.dll swscale-0.dll wrap_oal.dll zlib.dll The fix does still not work for me after completely rebuilding Blender: - i deleted the entire installation directory - i called: "python scons/scons.py clean" - i called: "python scons/scons.py" After i open Blender, i go to the python console and: import uuid still gives me the error as initially reported. I also tried to build for 64 bit. But i was not able to create a 64-bit Blender based on my current setup. I also hesiotate to follow the "hack" described on the Blender wiki, which is not even "officially supported by blebnder developers" Maybe someone with a working 32-bit version can verify that the issue is not solved for 32-bit builds. %%%

%%%The uuid.py module in Python uses ctypes to get platform specific uuid creation routines (for performance benefits). So I think this is probably related to previous ctypes problems on Windows.

A workaround is to remove all the ctypes stuff from Python's uuid.py to avoid triggering the problem.%%%

%%%The uuid.py module in Python uses ctypes to get platform specific uuid creation routines (for performance benefits). So I think this is probably related to previous ctypes problems on Windows. A workaround is to remove all the ctypes stuff from Python's uuid.py to avoid triggering the problem.%%%
Member

Added subscriber: @MartijnBerger

Added subscriber: @MartijnBerger
Member

python bug -> http://bugs.python.org/issue17213 (from terrachild in irc)

I think most simple solution is that we apply this work around

python bug -> http://bugs.python.org/issue17213 (from terrachild in irc) I think most simple solution is that we apply this work around
Nathan Letwory was unassigned by Martijn Berger 2014-02-14 22:04:15 +01:00
Martijn Berger self-assigned this 2014-02-14 22:04:15 +01:00
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Added subscriber: @Wiz

Added subscriber: @Wiz

Added subscribers: @sindra1961, @mont29

Added subscribers: @sindra1961, @mont29

◀ Merged tasks: blender/blender#38966.

◀ Merged tasks: blender/blender#38966.
Member

Current windows x64 msvc 2013 build does not suffer from this problem.
Can someone reconfirm this ?

Current windows x64 msvc 2013 build does not suffer from this problem. Can someone reconfirm this ?

It still occurs in windows XP/32bits msvc 2008.

It still occurs in windows XP/32bits msvc 2008.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closing, with Python3.4x and MSVC2013 this is now resolved.

Closing, with Python3.4x and MSVC2013 this is now resolved.

It still occurs in windows XP/32bits msvc 2008.
SHA-1: 9f16428cb5f047bf46bc338746a0fa84add6e720

It still occurs in windows XP/32bits msvc 2008. SHA-1: 9f16428cb5f047bf46bc338746a0fa84add6e720

We wont be using MSVC2008 for the official release.

We wont be using MSVC2008 for the official release.

Understood it; then I change the wording.
An error still occurs in blender-2.70-7660218-win32.zip for official release.

Understood it; then I change the wording. An error still occurs in blender-2.70-7660218-win32.zip for official release.
Sign in to join this conversation.
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#27666
No description provided.