[python-win32] PythonWin won't start the second time

Zeev B zeevb.public at gmail.com
Mon Jul 2 21:05:40 CEST 2007


No, It doesn't crash if I import it from the python console.

I ran python.exe -v (after replacing the file with the original pyc
that does work - the one that was generated in the installation) and
indeed it recompiles because of a bad timestamp. Following are the
relevant lines from the verbose output:

# c:\Python25\lib\site-packages\Pythonwin\pywin\framework\intpyapp.pyc
has bad mtime
import pywin.framework.intpyapp # from
c:\Python25\lib\site-packages\Pythonwin\pywin\framework\intpyapp.py
# wrote c:\Python25\lib\site-packages\Pythonwin\pywin\framework\intpyapp.pyc

Of course once recompiled it crashed Pythonwin (but not the console
when importing)


This is the DrWatson report:


Microsoft (R) DrWtsn32
Copyright (C) 1985-2001 Microsoft Corp. All rights reserved.



Application exception occurred:
        App: C:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe (pid=3924)
        When: 02/07/2007 @ 21:59:12.190
        Exception number: c0000005 (access violation)

*----> System Information <----*
        Computer Name: HOMEPC
        User Name: Zeev
        Terminal Session Id: 0
        Number of Processors: 2
        Processor Type: x86 Family 15 Model 4 Stepping 10
        Windows Version: 5.1
        Current Build: 2600
        Service Pack: 2
        Current Type: Multiprocessor Free
        Registered Organization: Home
        Registered Owner: SZ-SB

*----> Task List <----*
   0 System Process
   4 System
 628 smss.exe
 676 csrss.exe
 700 winlogon.exe
 744 services.exe
 756 lsass.exe
 924 svchost.exe
 992 svchost.exe
1088 MsMpEng.exe
1128 svchost.exe
1236 svchost.exe
1348 svchost.exe
1412 ccSetMgr.exe
1952 ccEvtMgr.exe
2040 ccProxy.exe
 124 SNDSrvc.exe
 220 SPBBCSvc.exe
 388 symlcsvc.exe
 368 spoolsv.exe
2328 ALUSchedulerSvc.exe
2760 MDM.EXE
2796 navapsvc.exe
2976 SR_Service.exe
3072 SR_WatchDog.exe
3096 svchost.exe
3192 ULCDRSvr.exe
3260 CALMAIN.exe
 608 alg.exe
1532 NSCSRVCE.EXE
1968 Explorer.EXE
1880 SR_GUI.Exe
3480 TSVNCache.exe
3288 igfxtray.exe
2968 hkcmd.exe
4056 igfxpers.exe
2216 RTHDCPL.EXE
1472 MSASCui.exe
3360 PicasaMediaDetector.exe
2336 PDVDServ.exe
 200 hpztsb04.exe
3744 ccApp.exe
1440 jusched.exe
1056 PowerBar.exe
3024 ctfmon.exe
3028 msmsgs.exe
1068 GoogleToolbarNotifier.exe
4008 firefox.exe
1648 TOTALCMD.EXE
3996 Skype.exe
1096 skypePM.exe
 648 cmd.exe
2352 notepad.exe
1508 cmd.exe
3008 notepad.exe
3924 Pythonwin.exe
1084 drwtsn32.exe

*----> Module List <----*
(0000000000400000 - 0000000000406000:
C:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe
(000000001e000000 - 000000001e206000: C:\WINDOWS\system32\python25.dll
(000000001e280000 - 000000001e322000:
C:\Python25\Lib\site-packages\pythonwin\win32ui.pyd
(000000001e530000 - 000000001e53c000:
C:\Python25\Lib\site-packages\pythonwin\dde.pyd
(000000001e770000 - 000000001e789000: C:\WINDOWS\system32\pywintypes25.dll
(000000001e890000 - 000000001e8a5000:
C:\Python25\lib\site-packages\win32\win32api.pyd
(000000005ad70000 - 000000005ada8000: C:\WINDOWS\system32\UxTheme.dll
(000000005cb70000 - 000000005cb96000: C:\WINDOWS\system32\ShimEng.dll
(000000005d090000 - 000000005d12a000: C:\WINDOWS\system32\comctl32.dll
(00000000629c0000 - 00000000629c9000: C:\WINDOWS\system32\LPK.DLL
(00000000651b0000 - 00000000651d2000:
C:\PROGRA~1\COMMON~1\SYMANT~1\ANTISPAM\ASOEHOOK.DLL
(000000006af90000 - 000000006afee000: C:\Program Files\Common
Files\Symantec Shared\ccL40.dll
(000000006f880000 - 000000006fa4a000: C:\WINDOWS\AppPatch\AcGenral.DLL
(0000000073000000 - 0000000073026000: C:\WINDOWS\system32\WINSPOOL.DRV
(0000000074720000 - 000000007476b000: C:\WINDOWS\system32\MSCTF.dll
(0000000074d90000 - 0000000074dfb000: C:\WINDOWS\system32\USP10.dll
(00000000769c0000 - 0000000076a73000: C:\WINDOWS\system32\USERENV.dll
(0000000076b40000 - 0000000076b6d000: C:\WINDOWS\system32\WINMM.dll
(0000000077120000 - 00000000771ac000: C:\WINDOWS\system32\OLEAUT32.dll
(00000000773d0000 - 00000000774d3000:
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
(00000000774e0000 - 000000007761d000: C:\WINDOWS\system32\ole32.dll
(0000000077b40000 - 0000000077b62000: C:\WINDOWS\system32\Apphelp.dll
(0000000077be0000 - 0000000077bf5000: C:\WINDOWS\system32\MSACM32.dll
(0000000077c00000 - 0000000077c08000: C:\WINDOWS\system32\VERSION.dll
(0000000077c10000 - 0000000077c68000: C:\WINDOWS\system32\msvcrt.dll
(0000000077dd0000 - 0000000077e6b000: C:\WINDOWS\system32\ADVAPI32.dll
(0000000077e70000 - 0000000077f01000: C:\WINDOWS\system32\RPCRT4.dll
(0000000077f10000 - 0000000077f57000: C:\WINDOWS\system32\GDI32.dll
(0000000077f60000 - 0000000077fd6000: C:\WINDOWS\system32\SHLWAPI.dll
(0000000077fe0000 - 0000000077ff1000: C:\WINDOWS\system32\secur32.dll
(000000007c140000 - 000000007c246000: C:\WINDOWS\system32\MFC71.DLL
(000000007c360000 - 000000007c3b6000: C:\WINDOWS\system32\MSVCR71.dll
(000000007c3c0000 - 000000007c43c000: C:\WINDOWS\system32\MSVCP71.dll
(000000007c800000 - 000000007c8f5000: C:\WINDOWS\system32\kernel32.dll
(000000007c900000 - 000000007c9b0000: C:\WINDOWS\system32\ntdll.dll
(000000007c9c0000 - 000000007d1d5000: C:\WINDOWS\system32\SHELL32.dll
(000000007e410000 - 000000007e4a0000: C:\WINDOWS\system32\USER32.dll

*----> State Dump for Thread Id 0xc2c <----*

eax=00000000 ebx=00000009 ecx=000002bc edx=1e1d9ab8 esi=00d45d20 edi=00000009
eip=1e0658a5 esp=0013f3c8 ebp=0013f52c iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246

*** WARNING: Unable to verify checksum for C:\WINDOWS\system32\python25.dll
*** ERROR: Symbol file could not be found.  Defaulted to export
symbols for C:\WINDOWS\system32\python25.dll -
function: python25!PyErr_Occurred
        1e065891 750a             jnz
python25!PyErr_SetString+0x2d (1e06589d)
        1e065893 8b5604           mov     edx,[esi+0x4]
        1e065896 56               push    esi
        1e065897 ff5218           call    dword ptr [edx+0x18]
        1e06589a 83c404           add     esp,0x4
        1e06589d 5e               pop     esi
        1e06589e c3               ret
        1e06589f cc               int     3
        python25!PyErr_Occurred:
        1e0658a0 a150261f1e       mov
eax,[python25!PyThreadState_Current (1e1f2650)]
FAULT ->1e0658a5 8b4028           mov     eax,[eax+0x28]
ds:0023:00000028=????????
        1e0658a8 c3               ret
        1e0658a9 cc               int     3
        1e0658aa cc               int     3
        1e0658ab cc               int     3
        1e0658ac cc               int     3
        1e0658ad cc               int     3
        1e0658ae cc               int     3
        1e0658af cc               int     3
        python25!PyErr_GivenExceptionMatches:
        1e0658b0 55               push    ebp

*----> Stack Back Trace <----*
*** ERROR: Symbol file could not be found.  Defaulted to export
symbols for C:\WINDOWS\system32\MFC71.DLL -
WARNING: Stack unwind information not available. Following frames may be wrong.
ChildEBP RetAddr  Args to Child
0013f52c 7c1c8e4a 00cf0000 00002b78 00bfc1e0 python25!PyErr_Occurred+0x5
0013f55c 7c1c9b6f 00c17e18 00cf0000 00000000 MFC71!Ordinal4019+0x62
ffffffff 00000000 00000000 00000000 00000000 MFC71!Ordinal4021+0x18

*----> Raw Stack Dump <----*
000000000013f3c8  04 2e 07 1e c8 69 1e 1e - 70 2e 07 1e 30 00 00 00
.....i..p...0...
000000000013f3d8  29 00 00 00 00 00 00 00 - 8d 19 0d 1e c8 69 1e 1e
)............i..
000000000013f3e8  09 00 00 00 09 00 00 00 - 00 00 00 00 be 00 09 1e
................
000000000013f3f8  09 00 00 00 29 00 00 00 - 40 f4 13 00 00 00 00 00
....)... at .......
000000000013f408  f6 fb 08 1e 40 f4 13 00 - 3c f4 13 00 29 00 00 00
.... at ...<...)...
000000000013f418  09 00 00 00 00 00 00 00 - a4 f4 13 00 00 00 00 00
................
000000000013f428  00 00 00 00 c8 01 09 1e - 40 f4 13 00 3c f4 13 00
........ at ...<...
000000000013f438  00 00 00 00 58 f4 13 00 - f5 45 2e 1e 01 02 09 1e
....X....E......
000000000013f448  58 f4 13 00 d4 f4 13 00 - 8e 8b 2b 1e f4 45 2e 1e
X.........+..E..
000000000013f458  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
................
000000000013f468  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
................
000000000013f478  00 00 cf 00 00 00 00 00 - 00 00 00 00 00 00 00 00
................
000000000013f488  a9 fb 2b 1e d4 f4 13 00 - d4 f4 13 00 e0 c1 bf 00
..+.............
000000000013f498  ea 79 2b 1e d4 f4 13 00 - 57 05 90 00 40 be bc 00
.y+.....W... at ...
000000000013f4a8  00 00 00 00 a4 b9 be 00 - 68 7e c1 00 00 00 00 00
........h~......
000000000013f4b8  50 f5 13 00 18 d4 2c 1e - 00 00 00 00 0a 76 1c 7c
P.....,......v.|
000000000013f4c8  d4 f4 13 00 78 2b 00 00 - e0 c1 bf 00 00 00 00 00
....x+..........
000000000013f4d8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
................
000000000013f4e8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 cf 00
................
000000000013f4f8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
................


----

This is the error report prepared by windows:

<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="Pythonwin.exe" FILTER="GRABMI_FILTER_PRIVACY">
    <MATCHING_FILE NAME="Pythonwin.exe" SIZE="15360"
CHECKSUM="0x62FF0184" BIN_FILE_VERSION="2.5.210.0"
BIN_PRODUCT_VERSION="2.5.210.0" PRODUCT_VERSION="2.5.210.0"
FILE_DESCRIPTION="" COMPANY_NAME="" PRODUCT_NAME="PyWin32"
FILE_VERSION="2.5.210.0" ORIGINAL_FILENAME="Pythonwin.exe"
INTERNAL_NAME="Pythonwin.exe" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0"
VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1"
MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0"
UPTO_BIN_FILE_VERSION="2.5.210.0" UPTO_BIN_PRODUCT_VERSION="2.5.210.0"
LINK_DATE="09/22/2006 15:34:36" UPTO_LINK_DATE="09/22/2006 15:34:36"
VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="scintilla.dll" SIZE="247808"
CHECKSUM="0xA219BADB" BIN_FILE_VERSION="1.5.6.0"
BIN_PRODUCT_VERSION="1.5.6.0" PRODUCT_VERSION="1.56"
FILE_DESCRIPTION="Scintilla.DLL - a Source Editing Component"
COMPANY_NAME="Neil Hodgson neilh at scintilla.org"
PRODUCT_NAME="Scintilla" FILE_VERSION="1.56"
ORIGINAL_FILENAME="Scintilla.DLL" INTERNAL_NAME="Scintilla"
LEGAL_COPYRIGHT="Copyright 1998-2003 by Neil Hodgson"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004"
VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.5.6.0"
UPTO_BIN_PRODUCT_VERSION="1.5.6.0" LINK_DATE="09/22/2006 15:35:09"
UPTO_LINK_DATE="09/22/2006 15:35:09" VER_LANGUAGE="English (United
States) [0x409]" />
</EXE>
<EXE NAME="python25.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="python25.dll" SIZE="2109440"
CHECKSUM="0x8A38AA40" BIN_FILE_VERSION="2.5.150.1013"
BIN_PRODUCT_VERSION="2.5.150.1013" PRODUCT_VERSION="2.5"
FILE_DESCRIPTION="Python Core" COMPANY_NAME="Python Software
Foundation" PRODUCT_NAME="Python" FILE_VERSION="2.5"
ORIGINAL_FILENAME="python25.dll" INTERNAL_NAME="Python DLL"
LEGAL_COPYRIGHT="Copyright (c) 2001-2006 Python Software Foundation.
Copyright (c) 2000 BeOpen.com. Copyright (c) 1995-2001 CNRI. Copyright
(c) 1991-1995 SMC." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32"
PE_CHECKSUM="0x0" LINKER_VERSION="0x0"
UPTO_BIN_FILE_VERSION="2.5.150.1013"
UPTO_BIN_PRODUCT_VERSION="2.5.150.1013" LINK_DATE="09/19/2006
07:52:18" UPTO_LINK_DATE="09/19/2006 07:52:18" VER_LANGUAGE="Language
Neutral [0x0]" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="kernel32.dll" SIZE="984576"
CHECKSUM="0xF0B331F6" BIN_FILE_VERSION="5.1.2600.3119"
BIN_PRODUCT_VERSION="5.1.2600.3119" PRODUCT_VERSION="5.1.2600.3119"
FILE_DESCRIPTION="Windows NT BASE API Client DLL"
COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft(r)
Windows(r) Operating System" FILE_VERSION="5.1.2600.3119
(xpsp_sp2_gdr.070416-1301)" ORIGINAL_FILENAME="kernel32"
INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="(c) Microsoft Corporation.
All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32"
PE_CHECKSUM="0xF9293" LINKER_VERSION="0x50001"
UPTO_BIN_FILE_VERSION="5.1.2600.3119"
UPTO_BIN_PRODUCT_VERSION="5.1.2600.3119" LINK_DATE="04/16/2007
15:52:53" UPTO_LINK_DATE="04/16/2007 15:52:53" VER_LANGUAGE="English
(United States) [0x409]" />
</EXE>
</DATABASE>



Ze'ev


On 7/1/07, Roger Upole <rwupole at msn.com> wrote:
> "Zeev B" wrote:
> > This is the comparison of the two files (starting at offset 0):
> >
> > -----------------------------------------------------
> > L0 B3 F2 0D 0A 94 BF 29 42 63 00 00 00 00 00 00 00  ³ò.."¿)Bc.......
> > R0 B3 F2 0D 0A A4 CD 29 42 63 00 00 00 00 00 00 00  ³ò..¤Í)Bc.......
> >
> > L - the working version
> > R - the crashing version
> >
> > The bytes that differ are the 5th and 6th. Any idea?
> >
> > Roger, Thanks for your patients.
> >
> > Ze'ev
>
> I'm just about out of ideas here.
> After looking at the code in import.c, it looks like those 2 bytes
> are part of the timestamp that python uses to check if the module
> has been modified since it was last compiled to pyc.
>
> Does it crash if you import intpyapp from the python console ?
> If you run python in verbose mode, it should tell you where it got
> the module from and why it's recompiling it.
>
> python.exe -vv
> >>> from pywin.framework import intpyapp
>
>          Roger
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>


More information about the Python-win32 mailing list