[Patches] [ python-Patches-997284 ] Allow pydoc to work with XP Themes (.manifest file)

SourceForge.net noreply at sourceforge.net
Sun Jul 25 00:52:51 CEST 2004


Patches item #997284, was opened at 2004-07-24 14:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997284&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Allow pydoc to work with XP Themes (.manifest file)

Initial Comment:
In Python 2.3.4, if you run pydoc -g under Windows XP
when one of the special XP theme manifest files has
been defined for python.exe or pythonw.exe, pydoc will
cause an access violation when it closes.  One solution
is obviously to get rid of the manifest files, but
wxPython installs them by default and apps written with
it work without a problem.  So it would be nice if
pydoc would also work, and it turns out it didn't take
a big change.  Attached is a patch which fixes the
problem (at least on my system).  I noticed that idle
did not have the access violation problem, and so
copied what it does in PyShell.main.

It might be better to introduce a more general fix for
Tkinter.  The problem seems to be that Uxtheme.dll
frees up some global data before all the windows have
called CloseThemeData (at app shutdown).  The AV seems
to happen when a call to CloseThemeData (presumably in
response to a WM_DESTROY message) passes a bad pointer
to RtlEnterCriticalSection.  Anyway, it seems that if
you get the window handles destroyed earlier in
shutdown, the problem is fixed.  Perhaps there is some
way to provide the Tkinter module with an atexit
handler which would destroy any existing widgets?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997284&group_id=5470


More information about the Patches mailing list