[pywin32-bugs] [ pywin32-Bugs-1101347 ] Docking toolbar AV at shut down
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-03-05 03:25:43
|
Bugs item #1101347, was opened at 2005-01-13 13:01 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1101347&group_id=78018 Category: pythonwin Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Greg Chapman (glchapman) Assigned to: Mark Hammond (mhammond) Summary: Docking toolbar AV at shut down Initial Comment: In pythonwin build 203, the CPythonWndFramework::_BaseOnClose method has a try/except handler which masks an access violation which occurs on shutdown. I believe the reason for the AV is this bug in MFC (specifically in DestroyDockBars): http://support.microsoft.com/default.aspx?scid=kb;EN-US;884030 Explicitly destroying the bars in MainFrame.OnClose (from intpyapp.py) seems to fix the problem: see the attached diff. By the way, I think something was going wrong with the exception handling in _BaseOnClose. When run under the VS 7.1 debugger, Pythonwin would end up jumping to an illegal address and faulting. I believe that it has not been shutting down correctly, and that's why it always left an icon in the taskbar. Along with the change to initpyapp, I took out the exception handler and rebuilt win32ui.pyd. Pythonwin seems to shut down correctly. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2005-03-05 14:25 Message: Logged In: YES user_id=14198 I've checked this in along with other fixes that should solve the registry problems. The checkin comment is below: Checking in win32uiExt.h; new revision: 1.6; previous revision: 1.5 Checking in pywin/debugger/debugger.py; new revision: 1.15; previous revision: 1.14 Checking in pywin/framework/intpyapp.py; new revision: 1.9; previous revision: 1.8 Hopefully a final fix for "[ 944506 ] PythonWin Menus don't work" and many other bugs relating to the registry filling up with toolbar registry entries. The problem was the fact that the debugging package dynamically created docable toolbars. When pythonwin started for the first time, references to these debugging toolbars caused MFC to get upset, and left the "stale" entries for those toolbars in the list. Later, when a debugging session started, these toolbars again got new entries which were written to the registry along with the old ones. Next startup, the cycle started again (but this time creating even more new ones, ignoring even more stale ones) Also incorporates [ 1101347 ] Docking toolbar AV at shut down from Greg Chapman, which was also reflected in other bugs relating to the task-bar icon remaining and the MRU menus not updating in Python 2.4. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2005-03-05 10:38 Message: Logged In: YES user_id=14198 Thanks - this looks great to me! I don't suppose you have any ideas on the docking toolbars? :) I've failed a few times now - I'll give it another quick go now. My most recent checkin to debugger.py should be reverted - it didn't solve the problem (although the ToolbarDebugging entries no longer leak, now only ToolbarDefault). Not saving the state at all is wrong though. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1101347&group_id=78018 |