From: SourceForge.net <no...@so...> - 2011-10-01 03:19:27
|
Bugs item #3416492, was opened at 2011-09-30 23:19 Message generated for change (Tracker Item Submitted) made by eaducac You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3416492&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 85. Win Build Group: current: 8.5.10 Status: Open Resolution: None Priority: 5 Private: No Submitted By: eaducac (eaducac) Assigned to: Mo DeJong (mdejong) Summary: Crash in open/save file dialog in Windows 7 libraries Initial Comment: Open (and presumably Save) file dialogs crash in Windows 7 when attempting to open a file located in a Library (e.g. Documents, Pictures, Videos, Music). Opening the same file through its actual path works fine (i.e., clicking on Libraries, then Documents, then whatever.txt, then Open will crash; actually clicking through the folders C:\Users\bob\Documents, clicking whatever.txt, and clicking Open will work fine). I haven't actually run the code through a debugger to verify 100%, but I believe this is a bug in OFNHookProcA/W in tkWinDialog.c. Since Libraries are collections of folders, they're not represented by one single path, so calling SendMessage() with CDM_GETFOLDERPATH fails (returns < 0) when the user navigates to a Library in the dialog; this would cause the buffer size in OFNHookProc to be calculated incorrectly, which is what I believe is causing the crash. I noticed this bug when trying to use tkinter.filedialog.askopenfilename() in Python 3.2.2 (Python 3.2 actually uses Tk 8.5.9, but the problematic SendMessage() code appears to be unchanged in 8.5.10, so I've filed this under the current version). I've attached a zip file containing a Python script to replicate the bug and C++ code to demonstrate how CDM_GETFOLDERPATH fails inside Libraries. Note that the dialog won't crash if you go into a folder inside a Library, as once you're inside that folder, there's a real, logical path for CDM_GETFOLDERPATH to return; it only fails if you select a file immediately inside the Library itself. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3416492&group_id=12997 |