#31 importing win32com.client causes python to crash

v1.0 (example)
closed-fixed
nobody
com (105)
9
2014-08-14
2003-07-07
Viktor Ferenczi
No

Windows XP Professional SP1 - English
.NET framework not installed
python-2.2.3
win32all-152

Open an interactive python session, then execute the
following import statement:

import win32com.client

This causes the python interpreter to crash
with "memory could not be read" error (system error
dialog appears).

Google search: +"import win32com.client" +crash

Tons of error reports can be found. Strange, sometimes
unpredictable behaviour reported. This bug (?) broke
significant part of existing win32all codebase. Some
forum posts suggested, that win32all-150 with python-
2.2.2 did not crash (this is a "workaround", but should
be tested).

- Complex -

Discussion

    • milestone: --> v1.0 (example)
    • priority: 5 --> 9
     
  • Logged In: YES
    user_id=142612

    Using from win32com.client import ... raises a regular Python
    exception with the same meaning:

    Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit
    (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more
    information.
    >>> from win32com.client import Dispatch
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "C:\Python22\lib\site-
    packages\win32com\client\__init__.py", line 12, in
    ?
    import dynamic, gencache, pythoncom
    File "C:\Python22\lib\site-
    packages\win32com\client\dynamic.py", line 22, in ?

    import pythoncom
    File "C:\Python22\lib\site-packages\pythoncom.py", line 18,
    in ?
    __import("pythoncom")
    File "C:\Python22\lib\site-packages\pythoncom.py", line 10,
    in __import
    h = win32api.LoadLibrary(filename)
    pywintypes.error: (998, 'LoadLibrary', 'Invalid access to
    memory location.')

     
  • Mark Hammond
    Mark Hammond
    2003-07-12

    • status: open --> closed-fixed
     
  • Mark Hammond
    Mark Hammond
    2003-07-12

    Logged In: YES
    user_id=14198

    Fixed in 154 and 155.