[pywin32-bugs] [ pywin32-Bugs-1085454 ] Py 2.4 + MS Excel COM --> crash
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-01-26 09:32:15
|
Bugs item #1085454, was opened at 2004-12-15 09:47 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1085454&group_id=78018 Category: com Group: None >Status: Open >Resolution: None Priority: 5 Submitted By: sitecap (sitecap) Assigned to: Nobody/Anonymous (nobody) Summary: Py 2.4 + MS Excel COM --> crash Initial Comment: Any code that tries to dispatch an Excel (2003) application ends up crashing Python 2.4. (Used bForDemand=1 in makepy to generate MS Excel 11.0 Object Library, otherwise makepy itself crashes.) ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2005-01-26 20:32 Message: Logged In: YES user_id=14198 Thanks Roger - I'll dig a little deeper on this. ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2005-01-26 16:27 Message: Logged In: YES user_id=771074 Python still crashes when you invoke one of the methods whose generated code caused the original crash. Looks to be related to this bug in the tokenizer: www.python.org/sf/1089395 It hits an assertion failure on lines longer than 512. For a workaround, remove the mbcs encoding tag in genpy.py and makepy works correctly even with bForDemand=0. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2005-01-25 20:53 Message: Logged In: YES user_id=14198 gencache.py (1.30) makepy.py (1.19) From that checkin message: Avoid crashes on Python 2.4 by defaulting to bForDemand=True - ie, each typelib actually creates a "skeleton" Python package, and populates the package as each interface is requested. Cause of the underling crash is that the generated .py causes an overflow as the byte-code is generated - something in 2.4 bloated the byte-code for these modules. ---------------------------------------------------------------------- Comment By: barney dalton (barneyd) Date: 2004-12-16 21:07 Message: Logged In: YES user_id=49828 I'm having a similar problem with Excel 2002 in Python 2.4. The script: #> from win32com.client import gencache gencache.EnsureModule('{00020813-0000-0000-C000-000000000046}', 0, 1, 3, bForDemand=1) import win32com.client ExcelApp=win32com.client.Dispatch("Excel.Application") #< Causes a access violation in python AppName: python.exe AppVer: 0.0.0.0 ModName: ntdll.dll ModVer: 5.1.2600.1217 Offset: 00033905 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1085454&group_id=78018 |