Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Yet another flavor of extension debugging problem

25 views
Skip to first unread message

David Humphrey

unread,
Jul 31, 2001, 6:33:06 PM7/31/01
to
I managed to compile a debug version of ActiveState Python 2.0.203 using
MSVC++ 6.0 and work on my C++ extension under the MSVC debugger. Now, I'm
trying to do the same thing with Python 2.1.1 that I downloaded from
www.python.org and can't seem to get the extension to load. I'm painfully
aware of the _d naming convention.

The release version of the extension loads fine as shown below:

$ python
Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', 'c:\\BGIUtils', 'd:\\dlh\\bin', 'd:\\Utils\\Python21\\DLLs',
'd:\\Utils\\Python21\\lib', 'd:\\Utils\\Python21\\lib\\plat-win'
, 'd:\\Utils\\Python21\\lib\\lib-tk', 'd:\\Utils\\Python21']
>>> for p in sys.path:
... print p
...

c:\BGIUtils
d:\dlh\bin
d:\Utils\Python21\DLLs
d:\Utils\Python21\lib
d:\Utils\Python21\lib\plat-win
d:\Utils\Python21\lib\lib-tk
d:\Utils\Python21
>>> import bgilib
>>>

After building the debug version from source, I moved the libs, exes, and
executables around to make a Python 2.1 debug version tree in
d:\utils\python-2.1.1 just like the Python 2.1 release tree. Pure python
modules in the c:\BGIUtils directory load fine, but when I try to import
bgilib, I get the following result:

$ python_d
Adding parser accelerators ...
Done.
Python 2.1.1 (#20, Jul 31 2001, 11:59:53) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import sys
[5358 refs]
>>> for p in sys.path:
... print p
...

c:\BGIUtils
d:\dlh\bin
d:\utils\python-2.1.1\DLLs
d:\utils\python-2.1.1\lib
d:\utils\python-2.1.1\lib\plat-win
d:\utils\python-2.1.1\lib\lib-tk
d:\utils\python-2.1.1
[5360 refs]
>>> import bgilib
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: DLL load failed: Invalid access to memory location.
[5397 refs]
>>> ^Z

[5397 refs]
[1826 refs]

dhumphrey@ROADRUNNER /c/bgiutils

I can't find any reference to this exact string in a google search, so I'm
posting it here hoping that someone out there can spot the problem.

Regards and Thanks In Advance,
David L. Humphrey
Manager, Software Development
Bell Geospace, Inc


PS. Both the release and debug versions of the extension dll exist as shown
below. Using dumpbin /imports shows nothing suprising for either file: one
imports python21.dll while the other imports python21_d.dll.

$ ls -al *.dll
-rwxr-xr-x 1 dhumphre Domain U 73728 Jul 31 11:25 PyGx.dll
-rwxr-xr-x 1 dhumphre Domain U 266284 Jul 31 11:25 PyGx_d.dll
-rwxr-xr-x 1 dhumphre Domain U 258048 Jul 31 14:44 bgilib.dll
-rwxr-xr-x 1 dhumphre Domain U 794670 Jul 31 14:40 bgilib_d.dll
-rwxr-xr-x 1 dhumphre Domain U 338944 Jun 22 17:57 cvwmpi.dll
-rwxr-xr-x 1 dhumphre Domain U 143506 Jul 31 09:46 mpatrol.dll

dhumphrey@ROADRUNNER /c/bgiutils


0 new messages