<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://morison.biz/technotes/feeds/rss.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/" 
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:icbm="http://postneo.com/icbm/" 
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/" 
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" 
	xmlns:wfw="http://wellformedweb.org/CommentAPI/" >

<channel>
	<title>Comments for: wxPython 2.8 Vista 64 bit crash - workaround found</title>
	<link>http://morison.biz/technotes/articles/55</link>
	<description>Originally posted on the wxpython-users list

I've puzzled over the Vista 64 crashes this past week, and the reports similar to my problem:

  http://www.nabble.com/wxPython-Crash-td20605396.html
  http://trac.wxwidgets.org/ticket/10203
  http://trac.wxwidgets.org/ticket/10082
  http://www.python-forum.org/pythonforum/viewtopic.php?f=4&amp;p=46918

I tried hand patching the supposed fix, http://trac.wxwidgets.org/changeset/56863, from the trunk into WX_2_8_BRANCH, but no joy.

Finally, after going back to wxWidgets C++ apps to see why they didn't crash, I realized wxWidgets apps get built with a different manifest than the python.exe. The diff between the two manifests is in the Common Controls DLL. wxWidgets apps specifically call out the 6.0.0.0 common controls. Common controls is not in the python manifest.

However, running my debug python, I can see that python.exe loads the 5.82 common controls, and assumed that mismatch was the source of the problem. So, I backed up my c:\Python26\python.exe, merged a manifest with 6.0 common controls into the python.exe and there was rejoicing, i.e., no crash.

Here's the trick (you'll need the msft manifest tool, mt.exe, comes with visual studio, plus a manifest file with common controls 6.0.0.0, like the one out of the wxPython src distro):

cd c:\Python26
copy python.exe python-backup.exe
copy pythonw.exe pythonw-backup.exe
mt -inputresource:python.exe;#1 -manifest \PathToWxPySrc\src\winxp.vc9.manifest  -outputresource:python.exe;#1
mt -inputresource:pythonw.exe;#1 -manifest \PathToWxPySrc\src\winxp.vc9.manifest  -outputresource:pythonw.exe;#1

The fix http://trac.wxwidgets.org/changeset/56863 in the wxWidgets trunk (2.9 release, I expect) is reported to solve the problem, but I wonder whether it really pulls in the 6.0 common controls dll (for wxPython, that is)</description>
	<language>en</language>
	<copyright>2006-2008, Rod Morison Software</copyright>
	<managingEditor>technotes@morison.biz</managingEditor>
	<lastBuildDate>Sun, 01 Aug 2010 08:56:17 GMT</lastBuildDate>
	<generator>Yet Another Community System</generator>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>70</ttl>

	<item>
		<title>Kuhlschrank:i do not find the mentioned winxp.vc9.manifest...

there ... (65 words to read) </title>
		<link>http://morison.biz/technotes/comments/7</link>
		<guid isPermaLink="true">http://morison.biz/technotes/comments/7</guid>
		<description>i do not find the mentioned winxp.vc9.manifest...



there is only a winxp.manifest in the current distribution of sources of wxPython
with this one, i get an error message, when trying to run mt.exe as mentioned in your article:
mt.exe:general error c101008c:Failed to read the manifest from the resource of file &quot;python.exe&quot;. Der angegebene Ressourcenname wurde nicht in der Image-Datei gefunden.



last sentence is german and means &quot;Given resource name was not found in image-file&quot;



thanks for any help



Kuhlschrank</description>
		<body xmlns="http://www.w3.org/1999/xhtml">i do not find the mentioned winxp.vc9.manifest...<br />
<br />
there is only a winxp.manifest in the current distribution of sources of wxPython
with this one, i get an error message, when trying to run mt.exe as mentioned in your article:
mt.exe:general error c101008c:Failed to read the manifest from the resource of file "python.exe". Der angegebene Ressourcenname wurde nicht in der Image-Datei gefunden.<br />
<br />
last sentence is german and means "Given resource name was not found in image-file"<br />
<br />
thanks for any help<br />
<br />
Kuhlschrank</body>
		<dc:creator>Kuhlschrank</dc:creator>
		<category>WxPython 2.8 Vista 64 bit crash - workaround found</category>
		<pubDate>Fri, 16 Jan 2009 05:23:44 GMT</pubDate>
	</item>

</channel>
</rss>