unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug: can not start a w32 GUI program from Emacs
@ 2006-12-27  0:38 Lennart Borgman (gmail)
  2006-12-27  2:30 ` Lennart Borgman (gmail)
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27  0:38 UTC (permalink / raw)


I have been trying different ways to start explorer.exe from Emacs on 
w32. I can not find any way that works. It is a quite annoying bug.

I suspect this has something to do with the code in w32proc.c that defines

   start.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
   start.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
   start.hStdError = GetStdHandle (STD_ERROR_HANDLE);

This is done even if Emacs thinks it is a GUI app. Is this the problem? 
Why is this handles set also for GUI programs.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27  0:38 Bug: can not start a w32 GUI program from Emacs Lennart Borgman (gmail)
@ 2006-12-27  2:30 ` Lennart Borgman (gmail)
  2006-12-27  8:24 ` Eli Zaretskii
  2006-12-28  9:26 ` Jason Rumney
  2 siblings, 0 replies; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27  2:30 UTC (permalink / raw)


Lennart Borgman (gmail) wrote:
> I have been trying different ways to start explorer.exe from Emacs on 
> w32. I can not find any way that works. It is a quite annoying bug.
> 
> I suspect this has something to do with the code in w32proc.c that defines
> 
>   start.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
>   start.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
>   start.hStdError = GetStdHandle (STD_ERROR_HANDLE);
> 
> This is done even if Emacs thinks it is a GUI app. Is this the problem? 
> Why is this handles set also for GUI programs.


It seems to be more complicated than I thought. Before I could not start 
for example Windows Explorer by

   (call-process "explorer.exe" nil 0 nil ".")
   (call-process "cmd.exe" nil 0 nil "/c" "explorer .")
   (start-process "some name" nil "cmd.exe" "/c" "explorer.exe" ".")

None of them worked. A window was opened, but it was blank or rather 
transparent. And in Task Manager was windows did not have the Explorer icon.

Now, after reboot they all work. Something is however wrong, but what?

This is on Windows XP (all the latest patches applied of course), using 
CVS Emacs a few days old.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27  0:38 Bug: can not start a w32 GUI program from Emacs Lennart Borgman (gmail)
  2006-12-27  2:30 ` Lennart Borgman (gmail)
@ 2006-12-27  8:24 ` Eli Zaretskii
  2006-12-27 10:52   ` Lennart Borgman (gmail)
  2006-12-28  9:26 ` Jason Rumney
  2 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-27  8:24 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Wed, 27 Dec 2006 01:38:13 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> 
> I have been trying different ways to start explorer.exe from Emacs on 
> w32. I can not find any way that works. It is a quite annoying bug.

Did you try w32-shell-execute?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27  8:24 ` Eli Zaretskii
@ 2006-12-27 10:52   ` Lennart Borgman (gmail)
  2006-12-27 12:00     ` Mathias Dahl
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27 10:52 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:
>> Date: Wed, 27 Dec 2006 01:38:13 +0100
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>>
>> I have been trying different ways to start explorer.exe from Emacs on 
>> w32. I can not find any way that works. It is a quite annoying bug.
> 
> Did you try w32-shell-execute?


Thanks, I thought I did, but I should have tried more. For example

    (w32-shell-execute "open" ".")

just gives "ShellExecute failed: No application is associated with the 
specified file for this operation". But trying again I see that

   (w32-shell-execute "open" default-directory)

actually starts explorer.exe.

So now I can define these to integrate more with w32:

(defun w32-explorer(dir)
   "Open Windows Explorer in directory DIR."
   (interactive "DStart in directory: ")
   (setq dir (expand-file-name dir))
   (w32-shell-execute "open" dir))

(defun w32-cmd(dir)
   "Open a Windows command prompt in directory DIR."
   (interactive "DStart in directory: ")
   (let ((default-directory (expand-file-name dir)))
     (call-process "cmd.exe" nil 0 nil "/c" "start")))

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 10:52   ` Lennart Borgman (gmail)
@ 2006-12-27 12:00     ` Mathias Dahl
  2006-12-27 12:19       ` Eli Zaretskii
  2006-12-27 12:36       ` Lennart Borgman (gmail)
  0 siblings, 2 replies; 20+ messages in thread
From: Mathias Dahl @ 2006-12-27 12:00 UTC (permalink / raw)
  Cc: emacs-devel

>     (w32-shell-execute "open" ".")
>
> just gives "ShellExecute failed: No application is associated with the
> specified file for this operation".

If you thought the above to work, in the same way that "start ." works
from cmd.exe I think you simply missed that "." is "magic" only inside
cmd.exe. So it's natural that ShellExecute does not recognize it. I
guess if you put the correct data in Windows registry, it might be
possible to open a "." file though...

> (defun w32-explorer(dir)
>    "Open Windows Explorer in directory DIR."
>    (interactive "DStart in directory: ")
>    (setq dir (expand-file-name dir))
>    (w32-shell-execute "open" dir))

I have something similar for dired that I use a lot:

   (defun w32-dired-open-explorer ()
     "Open a file in dired mode by explorer.exe as you double click it."
     (interactive)
     (let ((file-name (dired-get-file-for-visit)))
       (if (file-exists-p file-name)
           (w32-shell-execute "open" (concat "\"" (slash-to-backslash
file-name) "\"") nil 1))))

  (defun slash-to-backslash (text)
   (substitute ?\\ ?/ text))

  (define-key dired-mode-map "j" 'w32-dired-open-explorer)

While on the subject of w32-shell-execute I have found that it is
often much easier to use than struggling with `call-process' et al,
when you just want to "start" something. Of course when you want to
control output and input, then it's another story.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 12:00     ` Mathias Dahl
@ 2006-12-27 12:19       ` Eli Zaretskii
  2006-12-27 12:50         ` Lennart Borgman (gmail)
  2006-12-27 12:36       ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-27 12:19 UTC (permalink / raw)
  Cc: lennart.borgman, emacs-devel

> Date: Wed, 27 Dec 2006 13:00:06 +0100
> From: "Mathias Dahl" <mathias.dahl@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> >     (w32-shell-execute "open" ".")
> >
> > just gives "ShellExecute failed: No application is associated with the
> > specified file for this operation".
> 
> If you thought the above to work, in the same way that "start ." works
> from cmd.exe I think you simply missed that "." is "magic" only inside
> cmd.exe.

"." is magic not only for cmd.exe, it is recognized by all
file-related primitives of the Windows API.  The error message
actually tells what is wrong in this case: Windows doesn't have any
application associated with ".", so it doesn't know what application
to run for the "open" verb.  But if you try

   (w32-shell-execute nil "explorer.exe" ".")

you will see that "." _is_, in fact, supported outside cmd.exe.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 12:00     ` Mathias Dahl
  2006-12-27 12:19       ` Eli Zaretskii
@ 2006-12-27 12:36       ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27 12:36 UTC (permalink / raw)
  Cc: emacs-devel

Mathias Dahl wrote:
>>     (w32-shell-execute "open" ".")
>>
>> just gives "ShellExecute failed: No application is associated with the
>> specified file for this operation".
> 
> If you thought the above to work, in the same way that "start ." works
> from cmd.exe I think you simply missed that "." is "magic" only inside
> cmd.exe. So it's natural that ShellExecute does not recognize it. I
> guess if you put the correct data in Windows registry, it might be
> possible to open a "." file though...


Maybe it is more about file name expansion? For example

    (expand-file-name ".")

works in Emacs. And directory-files (which depends on a basic w32 API) 
returns also "." in the list of files.


> I have something similar for dired that I use a lot:
> 
>   (defun w32-dired-open-explorer ()
>     "Open a file in dired mode by explorer.exe as you double click it."
>     (interactive)
>     (let ((file-name (dired-get-file-for-visit)))
>       (if (file-exists-p file-name)
>           (w32-shell-execute "open" (concat "\"" (slash-to-backslash
> file-name) "\"") nil 1))))

Seems useful, but maybe it is better to use convert-standard-filename 
and expand-file-name here?

> While on the subject of w32-shell-execute I have found that it is
> often much easier to use than struggling with `call-process' et al,
> when you just want to "start" something. Of course when you want to
> control output and input, then it's another story.

I believe that w32-shell-execute can start only programs by file 
association, or am I missing something? call-process can also wait (even 
for a gui app I believe).

As I pointed out in another message there is perhaps a problem with 
w32proc in that it binds stdin etc for gui applications. I believe that 
exe-files on w32 that are marked as gui do not have consoles. But I am 
not at all sure that this is a problem. Anyway I patched away that in my 
patched version now to see if any problems shows up.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 12:19       ` Eli Zaretskii
@ 2006-12-27 12:50         ` Lennart Borgman (gmail)
  2006-12-27 14:19           ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27 12:50 UTC (permalink / raw)
  Cc: emacs-devel, Mathias Dahl

Eli Zaretskii wrote:
>    (w32-shell-execute nil "explorer.exe" ".")


Ah, thanks. It is quite surprising. I never guessed that ShellExecute 
could take a program as a parameter too. And I see it is even already 
mentioned in the doc string.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 12:50         ` Lennart Borgman (gmail)
@ 2006-12-27 14:19           ` Eli Zaretskii
  2006-12-27 14:33             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-27 14:19 UTC (permalink / raw)
  Cc: emacs-devel, mathias.dahl

> Date: Wed, 27 Dec 2006 13:50:33 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: Mathias Dahl <mathias.dahl@gmail.com>,  emacs-devel@gnu.org
> 
> Eli Zaretskii wrote:
> >    (w32-shell-execute nil "explorer.exe" ".")
> 
> 
> Ah, thanks. It is quite surprising. I never guessed that ShellExecute 
> could take a program as a parameter too.

The MS documentation for ShellExecute clearly says that it can accept
programs, not only documents.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 14:19           ` Eli Zaretskii
@ 2006-12-27 14:33             ` Lennart Borgman (gmail)
  2006-12-27 19:21               ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-27 14:33 UTC (permalink / raw)
  Cc: emacs-devel, mathias.dahl

Eli Zaretskii wrote:
> The MS documentation for ShellExecute clearly says that it can accept
> programs, not only documents.
>   

You are right, I see it now. It says that you can "open" an executable 
file ... ;-)

BTW the remarks also says that folder names for opening a folder should 
be absolute.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27 14:33             ` Lennart Borgman (gmail)
@ 2006-12-27 19:21               ` Eli Zaretskii
  0 siblings, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-27 19:21 UTC (permalink / raw)
  Cc: emacs-devel, mathias.dahl

> Date: Wed, 27 Dec 2006 15:33:53 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC:  mathias.dahl@gmail.com,  emacs-devel@gnu.org
> 
> BTW the remarks also says that folder names for opening a folder should 
> be absolute.

Yes, that's true.  But I don't think we can canonicalize file names
inside w32-shell-execute, since it doesn't know which arguments are
file names and which aren't.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-27  0:38 Bug: can not start a w32 GUI program from Emacs Lennart Borgman (gmail)
  2006-12-27  2:30 ` Lennart Borgman (gmail)
  2006-12-27  8:24 ` Eli Zaretskii
@ 2006-12-28  9:26 ` Jason Rumney
  2006-12-28  9:32   ` Lennart Borgman (gmail)
  2006-12-30  1:09   ` Lennart Borgman (gmail)
  2 siblings, 2 replies; 20+ messages in thread
From: Jason Rumney @ 2006-12-28  9:26 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman (gmail) wrote:
> I have been trying different ways to start explorer.exe from Emacs on 
> w32. I can not find any way that works. It is a quite annoying bug.
(start-process "explorer" nil "explorer.exe")

Works for me.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-28  9:26 ` Jason Rumney
@ 2006-12-28  9:32   ` Lennart Borgman (gmail)
  2006-12-30  1:09   ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-28  9:32 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> I have been trying different ways to start explorer.exe from Emacs on 
>> w32. I can not find any way that works. It is a quite annoying bug.
> (start-process "explorer" nil "explorer.exe")
>
> Works for me.

Thanks. Actually I have now seen that it works ok for me too most of the 
times but not always. Those times when it does not work properly a 
window is shown, but it is usually transparent, missing icon etc. Seems 
like some sort of resource problem, probably some graphic resource. (Are 
there any good tools showing such resources?)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-28  9:26 ` Jason Rumney
  2006-12-28  9:32   ` Lennart Borgman (gmail)
@ 2006-12-30  1:09   ` Lennart Borgman (gmail)
  2006-12-30 15:49     ` Eli Zaretskii
  1 sibling, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-30  1:09 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> I have been trying different ways to start explorer.exe from Emacs on 
>> w32. I can not find any way that works. It is a quite annoying bug.
> (start-process "explorer" nil "explorer.exe")
>
> Works for me.

I think I know the source of the problem now. It seems to be an MS 
Windows bug. Opening and just closing any menu eats 4 GDI Objects 
(according to Task Manager) that are assigned to explorer.exe. In those 
cases where I have seen the problem XP has been running for quite a 
while and the number of GDI Objects for explorer.exe seems to have meat 
a limit.

I suspected Emacs for quite a long time and I am glad I was wrong ;-)

Have anyone heard of this bug before? Fully patched XP Professional.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30  1:09   ` Lennart Borgman (gmail)
@ 2006-12-30 15:49     ` Eli Zaretskii
  2006-12-30 16:04       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-30 15:49 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

> Date: Sat, 30 Dec 2006 02:09:02 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> I think I know the source of the problem now. It seems to be an MS 
> Windows bug. Opening and just closing any menu eats 4 GDI Objects 
> (according to Task Manager) that are assigned to explorer.exe.
> In those cases where I have seen the problem XP has been running for
> quite a while and the number of GDI Objects for explorer.exe seems
> to have meat a limit.

How long is ``quite a while'', and how many GDI object did you see
used by explorer in the Task Manager?

Anyway, AFAIK there's no relation between GDI objects usage and
inability of start-process to run the program.

> Have anyone heard of this bug before? Fully patched XP Professional.

My XP system casually runs for weeks on end, and I never saw any
problem with resource depletion.  But I didn't try to run explorer
from Emacs, either.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30 15:49     ` Eli Zaretskii
@ 2006-12-30 16:04       ` Lennart Borgman (gmail)
  2006-12-30 17:00         ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-30 16:04 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>> Date: Sat, 30 Dec 2006 02:09:02 +0100
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: Emacs Devel <emacs-devel@gnu.org>
>>
>> I think I know the source of the problem now. It seems to be an MS 
>> Windows bug. Opening and just closing any menu eats 4 GDI Objects 
>> (according to Task Manager) that are assigned to explorer.exe.
>> In those cases where I have seen the problem XP has been running for
>> quite a while and the number of GDI Objects for explorer.exe seems
>> to have meat a limit.
>>     
>
> How long is ``quite a while'', and how many GDI object did you see
> used by explorer in the Task Manager?
>
> Anyway, AFAIK there's no relation between GDI objects usage and
> inability of start-process to run the program.
>   

It takes quite a while for this to show up. Task Manager says that 
explorer.exe holds 9,999 GDI objects when it does and each menu access 
adds 4 to that figure (before it hits the roof).

I believe start-process may work as expected, but the program that was 
started does not. Maybe there is some error code from CreateProcess 
indicating this but I do not know. The started program is not painted on 
the screen as it should. Just a transparent window with borders.

>   
>> Have anyone heard of this bug before? Fully patched XP Professional.
>>     
>
> My XP system casually runs for weeks on end, and I never saw any
> problem with resource depletion.  But I didn't try to run explorer
> from Emacs, either.
>   

I think I have found the circumstances then this bug shows up. This bug 
only shows up if you use StickyKeys. (I am rather used to notice obscure 
bugs and this is one of them. MS has even once told my employer that 
they wanted me to stop reporting bugs. Until things finally broke down 
completely because of the bugs I noticed subtle things from.)

So now I am thinking about helping MS by reporting the bug. There 
something inside me hesitating, but I think I will still do that. ;-)

Do you have any idea of where to report it?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30 16:04       ` Lennart Borgman (gmail)
@ 2006-12-30 17:00         ` Eli Zaretskii
  2006-12-30 17:28           ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-30 17:00 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

> Date: Sat, 30 Dec 2006 17:04:02 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC:  jasonr@gnu.org,  emacs-devel@gnu.org
> 
> It takes quite a while for this to show up. Task Manager says that 
> explorer.exe holds 9,999 GDI objects when it does and each menu access 
> adds 4 to that figure (before it hits the roof).

I cannot reproduce this ``4 objects for each menu access'' problem: on
my system, the count goes back down after the menu is closed.

Anyway, perhaps you should use the explorer less and use Dired more.

> So now I am thinking about helping MS by reporting the bug. There 
> something inside me hesitating, but I think I will still do that. ;-)
> 
> Do you have any idea of where to report it?

No.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30 17:00         ` Eli Zaretskii
@ 2006-12-30 17:28           ` Lennart Borgman (gmail)
  2006-12-30 18:01             ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-30 17:28 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>> It takes quite a while for this to show up. Task Manager says that 
>> explorer.exe holds 9,999 GDI objects when it does and each menu access 
>> adds 4 to that figure (before it hits the roof).
>>     
>
> I cannot reproduce this ``4 objects for each menu access'' problem: on
> my system, the count goes back down after the menu is closed.
>   

Did you turn StickyKeys on?


> Anyway, perhaps you should use the explorer less and use Dired more.
>   

I hardly ever use explorer. I use the command prompt much more.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30 17:28           ` Lennart Borgman (gmail)
@ 2006-12-30 18:01             ` Eli Zaretskii
  2006-12-30 18:22               ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2006-12-30 18:01 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

> Date: Sat, 30 Dec 2006 18:28:03 +0100
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC:  jasonr@gnu.org,  emacs-devel@gnu.org
> 
> Eli Zaretskii wrote:
> >> It takes quite a while for this to show up. Task Manager says that 
> >> explorer.exe holds 9,999 GDI objects when it does and each menu access 
> >> adds 4 to that figure (before it hits the roof).
> >>     
> >
> > I cannot reproduce this ``4 objects for each menu access'' problem: on
> > my system, the count goes back down after the menu is closed.
> >   
> 
> Did you turn StickyKeys on?

No, of course not.  Are you saying that the problem with start-process
happens only when StickyKeys are on?

> I hardly ever use explorer.

Then how come you accumulated so many GDI objects for explorer?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Bug: can not start a w32 GUI program from Emacs
  2006-12-30 18:01             ` Eli Zaretskii
@ 2006-12-30 18:22               ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2006-12-30 18:22 UTC (permalink / raw)
  Cc: emacs-devel, jasonr

Eli Zaretskii wrote:
>>>> It takes quite a while for this to show up. Task Manager says that 
>>>> explorer.exe holds 9,999 GDI objects when it does and each menu access 
>>>> adds 4 to that figure (before it hits the roof).
>>>>     
>>>>         
>>> I cannot reproduce this ``4 objects for each menu access'' problem: on
>>> my system, the count goes back down after the menu is closed.
>>>   
>>>       
>> Did you turn StickyKeys on?
>>     
>
> No, of course not.  Are you saying that the problem with start-process
> happens only when StickyKeys are on?
>   

I am saying that it is a bug in MS Windows that is there only when 
StickyKeys is on. When StickyKeys are on 4 GDI obj are lost on each menu 
access.

>   
>> I hardly ever use explorer.
>>     
>
> Then how come you accumulated so many GDI objects for explorer?
>   

I think that depends on how MS Windows organize its windows. Some 
windows, like menu windows and message box windows are owned by explorer.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2006-12-30 18:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-27  0:38 Bug: can not start a w32 GUI program from Emacs Lennart Borgman (gmail)
2006-12-27  2:30 ` Lennart Borgman (gmail)
2006-12-27  8:24 ` Eli Zaretskii
2006-12-27 10:52   ` Lennart Borgman (gmail)
2006-12-27 12:00     ` Mathias Dahl
2006-12-27 12:19       ` Eli Zaretskii
2006-12-27 12:50         ` Lennart Borgman (gmail)
2006-12-27 14:19           ` Eli Zaretskii
2006-12-27 14:33             ` Lennart Borgman (gmail)
2006-12-27 19:21               ` Eli Zaretskii
2006-12-27 12:36       ` Lennart Borgman (gmail)
2006-12-28  9:26 ` Jason Rumney
2006-12-28  9:32   ` Lennart Borgman (gmail)
2006-12-30  1:09   ` Lennart Borgman (gmail)
2006-12-30 15:49     ` Eli Zaretskii
2006-12-30 16:04       ` Lennart Borgman (gmail)
2006-12-30 17:00         ` Eli Zaretskii
2006-12-30 17:28           ` Lennart Borgman (gmail)
2006-12-30 18:01             ` Eli Zaretskii
2006-12-30 18:22               ` Lennart Borgman (gmail)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).