[plt-scheme] Re: hint for debugging file navigator freezing bug in DrScheme 4.1.1, english, on Windows XP Professional, Service Pack 2

From: Benjamin L.Russell (DekuDekuplex at Yahoo.com)
Date: Fri Oct 10 01:11:32 EDT 2008

On Thu, 9 Oct 2008 23:42:42 -0400, Eli Barzilay
<eli at barzilay.org> wrote:

>On Oct 10, Benjamin L.Russell wrote:
>> 
>> Previously, discussion of this bug had led to the hypothesis that
>> perhaps it had been caused by Windows itself as a result of
>> navigating through local folders on a networked computer.
>
>That still sounds like the most likely option -- the save dialog on
>Windows is the standard Windows dialog, and while the dialog is up,
>there is no Scheme code that does anything with it.

Aha!  That's why!  I just visually compared the file navigators for
DrScheme and newLISP, and discovered that while the navigator for
DrScheme is the standard Windows dialog, the one for newLISP
apparently seems a part of newLISP itself, and behaves as a separate
window for a Windows application program.

For example, the upper-left corner of the DrScheme navigator is just
part of the title bar, but the upper-left corner of the newLISP
navigator has a newLISP icon that behaves in exactly the same way as
for a Windows application program, opening a sub-menu with such
options as Restore, Move, Minimize, Maximize, Close, etc. when clicked
(in particular, see the third snapshot below).

Here are links to hosted snapshots of the three files:

DrScheme file navigator snapshot:
DrScheme_file_navigator_snapshot.20081010.1334.JPG
http://www.sendmefile.com/00651026

newLISP file navigator snapshot (some of the titles are in Japanese,
because it is running on a Japanese-localized version of Windows XP
Professional, Service Pack 2, but since I had the same freezing
problem before on an English-language version of Windows XP
Professional on another computer, too, the localization cannot be the
cause of the problem):
newLISP_file_navigator_snapshot.20081010.1335.JPG
http://www.sendmefile.com/00651027

newLISP file navigator with sub-menu opened snapshot:
newLISP_file_navigator_with_sub-menu_opened_snapshot.20081010.1346.JPG
http://www.sendmefile.com/00651029

Probably the newLISP developers ran into exactly the same problem with
the Windows file navigator, and decided to re-create a non-buggy
version of the file navigator to avoid this specific problem.  Their
navigator runs as a separate Windows application program, and not as
the standard Windows dialog box.  Somehow, this resolves the problem,
and their file navigator does not hang.

>Now, it might be that things are setup in a way that causes such
>delays.  But to be able to start debugging it, we need some practical
>way to recreate the problem.

To recreate the problem, just start DrScheme on Windows XP
Professional, Service Pack 2, and start navigating through a dozen or
so directories.  At some point, your standard Windows navigator will
suddenly freeze for a few seconds.

Then try their custom file navigator (go to
http://www.newlisp.org/index.cgi?page=Downloads, download and install
newLISP, and try navigating through a dozen or so directories in their
file navigator for comparison).  In particular, click in the
upper-left corner of both navigators:  You'll notice that the
difference is that your standard Windows file navigator will not
respond to this input, but that their custom version will behave as a
separate Windows application, and will open a sub-menu with such
options as Restore, Move, Minimize, Maximize, Close, etc.  Apparently,
they aren't using the standard Windows file navigator.

You probably need to avoid relying on the standard Windows file
navigator to resolve this problem--that may be the reason for their
choice of creating a custom file navigator.  Basically, just create a
separate dialog box that is part of DrScheme itself using the Windows
API (do not use the (apparently buggy) standard Windows file
navigator), and give it the same functionality as the newLISP file
navigator, which has the same functionality as the Windows file
navigator, sans the freezing bug.

Voila`!  Now you'll have a DrScheme file navigator that no longer
freezes, and that allows convenient opening/saving of files!

-- Benjamin L. Russell



Posted on the users mailing list.