[NumPy-Tickets] [NumPy] #1962: import multi array: DLL load failed: a dynamic link library <DLL> initialization routine failed
NumPy Trac
numpy-tickets@scipy....
Fri Oct 14 13:45:24 CDT 2011
#1962: import multi array: DLL load failed: a dynamic link library <DLL>
initialization routine failed
-------------------------+--------------------------------------------------
Reporter: linden_paul | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
-------------------------+--------------------------------------------------
I am trying to embed a Python2.6 (also using numpy and scipy) into a large
C program. Simple programs worked fine. However, if the python module
that I am calling from C includes the line
from numpy import *
The whole thing fails and I get an error in visual studios when the python
module runs.
R6034: an application has made an attempt to load the c runtime library
incorrectly. Using dependency walker I narrowed down the problem to:
GetProcAddress(0x73C10000 [DWMAPI.DLL], "DwmGetWindowAttribute") called
from "UXTHEME.DLL" at address 0x7404C3DB and returned 0x73C11C76.
GetProcAddress(0x75520000 [GDI32.DLL], "GdiIsMetaPrintDC") called from
"USP10.DLL" at address 0x75AA8306 and returned 0x75528AB9.
DllMain(0x5C7B0000, DLL_PROCESS_ATTACH, 0x00000000) in "MSVCR90.DLL"
returned 0 (0x0).
DllMain(0x5C7B0000, DLL_PROCESS_DETACH, 0x00000000) in "MSVCR90.DLL"
called.
DllMain(0x5C7B0000, DLL_PROCESS_DETACH, 0x00000000) in "MSVCR90.DLL"
returned 0 (0x0).
Unloaded "MULTIARRAY.PYD" at address 0x69B80000.
Unloaded "MSVCR90.DLL" at address 0x5C7B0000.
LoadLibraryExA("C:\Python26\Lib\site-packages\numpy\core\multiarray.pyd",
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: A dynamic
link library (DLL) initialization routine failed (1114).
Second chance exception 0xC0000005 (Access Violation) occurred in
"PYTHON26.DLL" at address 0x1E01A2FA.
Exited "PYTHON_TEST.EXE" (process 0x1064) with code -1073741819
(0xC0000005).
Then I just adjusted the Python module to just import numarray
from numpy import numarray
def my_eig(a,b,c,d):
print 'hello world'
return x
In the command window the error displayed is:
Import multiarray
ImportError: DLL load failed: A dynamic link library (DLL) initialization
routine failed.
I should note that numpy and scipy work fine if run from IDLE.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1962>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list