Search

PS v3 ISE: write-progress flickers annoyingly when multiple progress meters are used by johndog

Active

2
0
Sign in
to vote
Type: Bug
ID: 769310
Opened: 10/31/2012 8:08:08 AM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
Whenever write-progress starts a new progress bar, it redraws the entire set of progress bars. If this is done quickly, it causes an annoying flicker effect.

This is new behavior in the progress meter in V3.
Details (expand)
How often does this happen?
Always Happens

Have you seen this problem before in this product?

No, this is new to the most recent version
Reproduction Steps
Run the following script in PS v3 ISE. Whenever the command {act1 3 "start 3"} is run, the entire set of three progress bars is redrawn.

$activity_string = "Some Activity"
$target = 1

function act1($id, $msg)
{
    write-progress -activity "$activity_string - $id" -percentcomplete 0 -id $id -status $msg
}

function act2($id, $msg, [int]$percent)
{
    write-progress -activity "$activity_string - $id" -percentcomplete $percent -id $id -status $msg
}

function act3($id)
{
    write-progress -activity "$activity_string - $id" -id $id -Completed
}

act1 1 "start 1"
act1 2 "start 2"
1..100 | % {
    #sleep -Milliseconds 1
    act2 2 "working" $_
    act1 3 "start 3"

    1..100 | % {
        #sleep -Milliseconds 1
        act2 3 "working" $_
        #"message"
    }

    act3 3
}
Expected Results
When {act1 3 "start 3"} executes, it should only draw a new progress bar for the third activity. The existing two progress bars should remain.
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.