[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1819: I can reproduce this on that pre-release Emacs 24 build on WIn
From: |
Eli Zaretskii |
Subject: |
bug#1819: I can reproduce this on that pre-release Emacs 24 build on WIndows Server 2003 100% |
Date: |
Sun, 09 Oct 2011 09:01:21 -0400 |
> Date: Sun, 09 Oct 2011 03:35:54 +0000
> From: darkdescendant@gmail.com
>
> I haven't tried the 4 CR trick outlined in the original posting but this is
> an issue that I have to deal with all the time. It stops me from doing all
> my work in Emacs.
Does it help to invoke GUI programs via "start", like this:
d:\foo> start notepad
> This also reproduces on the latest released patched EmacsW32 distribution
> running Emacs 23.2/
I can see it in the current development version as well.
I played with this, and here are my observations. Hopefully, someone
who knows more than I do about the startup process of a GUI
application could make some sense out of it.
. The behavior is not entirely repeatable. Sometimes I need 3 RETs,
sometimes 4, and sometimes just 1.
. It looks like the program that is invoked is in some limbo state
inside early stages of its startup code, until you hit enough RETs.
Process Explorer shows no threads for such a program. PsList does
show one thread, but it is waiting for something. Here's an
example with notepad:
Tid Pri Cswtch State User Time Kernel Time Elapsed Time
2872 8 14 Wait:Executive 0:00:00.000 0:00:00.000 0:00:05.354
. Each time I hit RET, notepad seems to do a few more things in its
startup. Process Explorer shows more and more handles being open.
I show below the list of handles after each RET. Note that the
desktop (WinSta0) is only opened after one RET. Another noteworthy
fact is that when started from shell-mode, GUI applications have 3
pipes open -- those are the 3 standard handles they inherited from
Emacs via cmd.exe.
. I also tried with runemacs.exe, and I see the same pattern: it
takes several RETs for it to make through its works, at which point
it spawns emacs.exe and exits.
. Invoking GUI programs through the "start" command works as
expected: the program opens its window immediately.
Here's the list of handles open by notepad just after the invocation:
Type Name
Directory \Windows
Directory \KnownDlls
File \Device\NamedPipe\Win32Pipes.000002e4.00000002
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File D:\usr\eli\bzr
File C:\WINDOWS\AppPatch\sysmain.sdb
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Thread emacs.exe(740): 2096
This is after one RET:
Type Name
Directory \BaseNamedObjects
Directory \Windows
Directory \KnownDlls
File \Device\NamedPipe\Win32Pipes.000002e4.00000002
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File D:\usr\eli\bzr
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows
Key HKLM
KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Thread emacs.exe(740): 2096
WindowStation \Windows\WindowStations\WinSta0
WindowStation \Windows\WindowStations\WinSta0
After 2 RETs:
Type Name
Directory \BaseNamedObjects
Directory \Windows
Directory \KnownDlls
Event \BaseNamedObjects\userenv: User Profile setup event
File \Device\NamedPipe\Win32Pipes.000002e4.00000002
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\KsecDD
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
File D:\usr\eli\bzr
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
Key HKCU
Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
Key HKLM
KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Semaphore \BaseNamedObjects\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1}
Thread emacs.exe(740): 2096
WindowStation \Windows\WindowStations\WinSta0
WindowStation \Windows\WindowStations\WinSta0
After 3 RETs:
Type Name
Directory \BaseNamedObjects
Directory \Windows
Directory \KnownDlls
Event \BaseNamedObjects\userenv: User Profile setup event
File \Device\NamedPipe\Win32Pipes.000002e4.00000002
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\NamedPipe\Win32Pipes.000002e4.00000001
File \Device\KsecDD
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
File D:\usr\eli\bzr
File
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03
Key HKLM\SYSTEM\ControlSet001\Control\Nls\Language Groups
Key HKLM\SYSTEM\ControlSet001\Control\Nls\Locale\Alternate Sorts
Key HKLM\SYSTEM\ControlSet001\Control\Nls\Locale
Key HKCU
Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
Key HKLM
KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\ShimCacheMutex
Mutant
\BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-135337107-1212574998-751859383-11823MUTEX.DefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant
\BaseNamedObjects\CTF.TMD.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant
\BaseNamedObjects\CTF.Layouts.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant
\BaseNamedObjects\CTF.Asm.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant
\BaseNamedObjects\CTF.Compart.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant
\BaseNamedObjects\CTF.LBES.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Mutant \BaseNamedObjects\DBWinMutex
Section \BaseNamedObjects\ShimSharedMemory
Section
\BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-135337107-1212574998-751859383-11823SFM.DefaultS-1-5-21-135337107-1212574998-751859383-11823
Section
\BaseNamedObjects\CiceroSharedMemDefaultS-1-5-21-135337107-1212574998-751859383-11823
Semaphore \BaseNamedObjects\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1}
Thread emacs.exe(740): 2096
WindowStation \Windows\WindowStations\WinSta0
WindowStation \Windows\WindowStations\WinSta0