Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Possible FormatEnumerationLimit related bug

Closed Thread
 
Thread Tools Display Modes
Old 05-30-2007   #1 (permalink)
Keith Hill [MVP]
Guest


 

Possible FormatEnumerationLimit related bug

Can anybody else confirm the following? Start PowerShell with no profile
(-noprofile). Execute this:

[system.reflection.assembly]::LoadWithPartialName("System.Windows.Forms") |
fc

It should not hang. Now set the following variable:

$FormatEnumerationLimit = 100

Execute the first command again:

[system.reflection.assembly]::LoadWithPartialName("System.Windows.Forms") |
fc

It hangs on my system chewing up 100% CPU. This was reported as a PSCX bug
but I think it is a PowerShell bug that gets surfaced because the PSCX
profile sets the FormatEnumerationLimit to 100.

--
Keith

Old 05-30-2007   #2 (permalink)
/\/\o\/\/ [MVP]
Guest


 

RE: Possible FormatEnumerationLimit related bug

Keith,

I do not think this is a bug, as format-custom does enumerate everything,
and you did remove the safety belt's (enumerationlimit )

any idea how big this output is ? (all Namespaces in the form namespace,
including all properties etc,)

try raising the limit one by one to get a basic idea ;-)

Greetings /\/\o\/\/

"Keith Hill [MVP]" wrote:

> Can anybody else confirm the following? Start PowerShell with no profile
> (-noprofile). Execute this:
>
> [system.reflection.assembly]::LoadWithPartialName("System.Windows.Forms") |
> fc
>
> It should not hang. Now set the following variable:
>
> $FormatEnumerationLimit = 100
>
> Execute the first command again:
>
> [system.reflection.assembly]::LoadWithPartialName("System.Windows.Forms") |
> fc
>
> It hangs on my system chewing up 100% CPU. This was reported as a PSCX bug
> but I think it is a PowerShell bug that gets surfaced because the PSCX
> profile sets the FormatEnumerationLimit to 100.
>
> --
> Keith
>
>

Old 05-30-2007   #3 (permalink)
Keith Hill [MVP]
Guest


 

Re: Possible FormatEnumerationLimit related bug

"/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message
news:6AA8E2DC-4A63-410B-8ADE-ADF482812E71@microsoft.com...
> Keith,
>
> I do not think this is a bug, as format-custom does enumerate everything,
> and you did remove the safety belt's (enumerationlimit )
>
> any idea how big this output is ? (all Namespaces in the form namespace,
> including all properties etc,)
>
> try raising the limit one by one to get a basic idea ;-)


I dunno - raising it from its default of 4 to 5 causes PowerShell to spin
the CPU to 100% and this command still hasn't completed after a few
*minutes*. I believe it is the assembly evidence hash of WinForm's
ManifestModule that it is getting hung up on.

--
Keith

Old 05-30-2007   #4 (permalink)
Keith Hill [MVP]
Guest


 

Re: Possible FormatEnumerationLimit related bug

"/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message news:6AA8E2DC-4A63-410B-8ADE-ADF482812E71@microsoft.com...
> Keith,
>
> I do not think this is a bug, as format-custom does enumerate everything,
> and you did remove the safety belt's (enumerationlimit )


BTW the point of doing this was to get a bit more useful output e.g. instead of this:

Name : DigitalPersona, Inc.
Count : 55
Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt...}
Values : {DigitalPersona, Inc.}

I want to see this:

Name : DigitalPersona, Inc.
Count : 55
Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgn
t, DPAgnt, DPAgnt, dwm, EDICT, EDICT, EDICT, ehmsas, ehtray, explorer,
FlashUtil9b, ieuser, iexplore, iexplore, iexplore, iexplore, iexplore
, iexplore, iexplore, iexplore, iexplore, iexplore, iexplore, ipoint,
itype, mobsync, msnmsgr, powershell, ProxyEnableSwitch2.0, rundll32, s
idebar, sidebar, sidebar, taskeng, taskmgr, unsecapp, Virtual PC, vVX6
000, WinMail, WinMail, WinMail, winssnotify, WLLoginProxy, wmdc, wmpns
cfg, wuauclt, ZuneLauncher}
Values : {DigitalPersona, Inc.}

When I execute something like:

gps | select ProcessName -expand Modules -ea silentlycontinue | group Company | fl

Now that I think about it perhaps the default value of 4 for FormatEnumerationLimit was chosen because of either a bug or unboound CPU consumption in PowerShell 1.0. Because it has always struck me that this display:

Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt...}

is ridiculously limited to be the "default" display.

--
Keith
Old 05-30-2007   #5 (permalink)
/\/\o\/\/ [MVP]
Guest


 

Re: Possible FormatEnumerationLimit related bug

Actualy, I was one of the guy's asking for this limit (for datatables and
ADSI / SMS work ) back in Beta 2, as it is most of the time not handy to get
all fields back.


Greetings /\/\o\/\/

"Keith Hill [MVP]" wrote:

> "/\/\o\/\/ [MVP]" <oMVP@discussions.microsoft.com> wrote in message
> news:6AA8E2DC-4A63-410B-8ADE-ADF482812E71@microsoft.com...
> > Keith,
> >
> > I do not think this is a bug, as format-custom does enumerate

> everything,
> > and you did remove the safety belt's (enumerationlimit )

>
> BTW the point of doing this was to get a bit more useful output e.g.
> instead of this:
>
> Name : DigitalPersona, Inc.
> Count : 55
> Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt...}
> Values : {DigitalPersona, Inc.}
>
> I want to see this:
>
> Name : DigitalPersona, Inc.
> Count : 55
> Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt, DPAgnt,
> DPAgn
> t, DPAgnt, DPAgnt, dwm, EDICT, EDICT, EDICT, ehmsas, ehtray,
> explorer,
> FlashUtil9b, ieuser, iexplore, iexplore, iexplore, iexplore,
> iexplore
> , iexplore, iexplore, iexplore, iexplore, iexplore, iexplore,
> ipoint,
> itype, mobsync, msnmsgr, powershell, ProxyEnableSwitch2.0,
> rundll32, s
> idebar, sidebar, sidebar, taskeng, taskmgr, unsecapp, Virtual PC,
> vVX6
> 000, WinMail, WinMail, WinMail, winssnotify, WLLoginProxy, wmdc,
> wmpns
> cfg, wuauclt, ZuneLauncher}
> Values : {DigitalPersona, Inc.}
>
> When I execute something like:
>
> gps | select ProcessName -expand Modules -ea silentlycontinue | group
> Company | fl
>
> Now that I think about it perhaps the default value of 4 for
> FormatEnumerationLimit was chosen because of either a bug or unboound CPU
> consumption in PowerShell 1.0. Because it has always struck me that this
> display:
>
> Group : {DPAgnt, DPAgnt, DPAgnt, DPAgnt...}
>
> is ridiculously limited to be the "default" display.
>
> --
> Keith
>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
$FormatEnumerationLimit works only if changed globally Roman Kuzmin PowerShell 4 07-10-2008 10:51 AM
Occasional pdf-related freeze Ike Vista General 0 06-12-2008 07:30 PM
Permissions not related to UAC Larry E Vista General 3 03-16-2007 08:20 PM
Question related to UAC Hyung-Dong Vista account administration 2 11-21-2006 07:49 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50