Topics

Possible regression in NVDA 2019.3beta2 with screen curtain

Noelia Ruiz
 

Hello:

This has been reported by two users of NVDA in Spanish. One of them
has sent me the log in debug level and nvda.ini. Also, he has tested
this with add-ons disabled.

# Test environment

- Windows version 10.0.18363 workstation
- Language set to Windows (Spanish).


- Using braille and speech.

# STR:

- Press twice the keystroke to activate screen curtain.

# Actual

- NVDA reports that screen curtain has been enabled (permanently), but
this is set to False in configuration and is not enabled when NVDA is
restarted.

# Aditional context

- Screen curtain is properly enabled when using the Vision panel (NVDA's gui).
- The warning dialog of screen curtain is disabled.
- This issue is specific of NVDA 2019.3beta2, worked properly with beta1.

Thanks

Alberto Buffolino
 

Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently), but
this is set to False in configuration and is not enabled when NVDA is
restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another profile and then switching again to previous where screen curtain should be enabled is sufficient to see the problem. Warning and sound disabled.
Alberto

Noelia Ruiz
 

Thanks Alberto.
If this is specific of beta2, maybe related to commit
cd5b11332cc1c4d0b5497cefc66fd30bc91fd987

@Cyrille, what do you think?
Cheers

2020-01-23 19:26 GMT+01:00, Alberto Buffolino <a.buffolino@...>:

Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently), but
this is set to False in configuration and is not enabled when NVDA is
restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another profile
and then switching again to previous where screen curtain should be
enabled is sufficient to see the problem. Warning and sound disabled.
Alberto



Cyrille
 

Hello

I have made tries with the profile switch procedure by switching between an app with specific profile and an app without specific profile (general configuration).
I have found that the commit that has introduced this regression is the following:
commit f194afaec02a3465ceb769ee88543ea337c6eb9e
Author: Leonard de Ruijter <leonardder@...>
Date: Mon Jan 13 00:27:57 2020 +0100
Optionally play sounds when toggling screen curtain (#10611)
* Add scree curtain sounds, ensure that it only enables once
* Add Andre Louis as a contributor
* Use mono sounds instead
* Update user guide, review actions

Looking at the log, I can see that the __init__ method of the screen curtain provider is not called when I turn back to the app where I previously had activated it permanently. However I cannot figure very well why it is not called anymore looking at the diff of this commit.

@leonardder:
Do you have an idea?

Thanks.
Cheers,

Cyrille

-----Message d'origine-----
De : nvda-devel@groups.io <nvda-devel@groups.io> De la part de Noelia Ruiz
Envoyé : jeudi 23 janvier 2020 19:53
À : nvda-devel@groups.io
Objet : Re: [nvda-devel] Possible regression in NVDA 2019.3beta2 with screen curtain

Thanks Alberto.
If this is specific of beta2, maybe related to commit
cd5b11332cc1c4d0b5497cefc66fd30bc91fd987

@Cyrille, what do you think?
Cheers

2020-01-23 19:26 GMT+01:00, Alberto Buffolino <a.buffolino@...>:
Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently),
but this is set to False in configuration and is not enabled when
NVDA is restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another
profile and then switching again to previous where screen curtain
should be enabled is sufficient to see the problem. Warning and sound disabled.
Alberto



Noelia Ruiz
 

Thanks Cyrille. I confirm you are right. I have fixed this locally by
removing a clause in globalCommands._enableScriptCurtain introduced in
this commit. Seems that when pressing twice the keystroke, one of them
is enabled temporarily and when the dialog confirmation is not shown,
the script is executed inmediately, so with this if... clause pressing
twice screen curtain is temporarily enabled but then disabled, not
enabled permanently. With my change the sound is heart twice when
performing a permanent enable, though for me this is not a problem

def _enableScreenCurtain(doEnable: bool = True):
self._waitingOnScreenCurtainWarningDialog = None
if not doEnable:
return # exit early with no ui.message because the user has
decided to abort.

tempEnable = GlobalCommands._tempEnableScreenCurtain
# Translators: Reported when the screen curtain is enabled.
enableMessage = _("Screen curtain enabled")
if tempEnable:
# Translators: Reported when the screen curtain is temporarily enabled.
enableMessage = _("Temporary Screen curtain, enabled until next restart")
- if not alreadyRunning:
try:
vision.handler.initializeProvider(
screenCurtainProviderInfo,
temporary=tempEnable,
)
except Exception:
log.error("Screen curtain initialization error", exc_info=True)
# Translators: Reported when the screen curtain could not be enabled.
enableMessage = _("Could not enable screen curtain")
finally:

2020-01-23 23:54 GMT+01:00, Cyrille via Groups.Io
<cyrille.bougot2=laposte.net@groups.io>:

Hello

I have made tries with the profile switch procedure by switching between an
app with specific profile and an app without specific profile (general
configuration).
I have found that the commit that has introduced this regression is the
following:
commit f194afaec02a3465ceb769ee88543ea337c6eb9e
Author: Leonard de Ruijter <leonardder@...>
Date: Mon Jan 13 00:27:57 2020 +0100
Optionally play sounds when toggling screen curtain (#10611)
* Add scree curtain sounds, ensure that it only enables once
* Add Andre Louis as a contributor
* Use mono sounds instead
* Update user guide, review actions

Looking at the log, I can see that the __init__ method of the screen curtain
provider is not called when I turn back to the app where I previously had
activated it permanently. However I cannot figure very well why it is not
called anymore looking at the diff of this commit.

@leonardder:
Do you have an idea?

Thanks.
Cheers,

Cyrille


-----Message d'origine-----
De : nvda-devel@groups.io <nvda-devel@groups.io> De la part de Noelia Ruiz
Envoyé : jeudi 23 janvier 2020 19:53
À : nvda-devel@groups.io
Objet : Re: [nvda-devel] Possible regression in NVDA 2019.3beta2 with screen
curtain

Thanks Alberto.
If this is specific of beta2, maybe related to commit
cd5b11332cc1c4d0b5497cefc66fd30bc91fd987

@Cyrille, what do you think?
Cheers

2020-01-23 19:26 GMT+01:00, Alberto Buffolino <a.buffolino@...>:
Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently),
but this is set to False in configuration and is not enabled when
NVDA is restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another
profile and then switching again to previous where screen curtain
should be enabled is sufficient to see the problem. Warning and sound
disabled.
Alberto









Noelia Ruiz
 

I have created issue 10717 and branch fixScreenCurtain at
https://github.com/nvdaes/nvda

Should I create a PR against beta, or should be wait so that
@leonardder fix this?
Thanks.

2020-01-24 7:27 GMT+01:00, Noelia Ruiz via Groups.Io
<nrm1977=gmail.com@groups.io>:

Thanks Cyrille. I confirm you are right. I have fixed this locally by
removing a clause in globalCommands._enableScriptCurtain introduced in
this commit. Seems that when pressing twice the keystroke, one of them
is enabled temporarily and when the dialog confirmation is not shown,
the script is executed inmediately, so with this if... clause pressing
twice screen curtain is temporarily enabled but then disabled, not
enabled permanently. With my change the sound is heart twice when
performing a permanent enable, though for me this is not a problem

def _enableScreenCurtain(doEnable: bool = True):
self._waitingOnScreenCurtainWarningDialog = None
if not doEnable:
return # exit early with no ui.message because the user has
decided to abort.

tempEnable = GlobalCommands._tempEnableScreenCurtain
# Translators: Reported when the screen curtain is enabled.
enableMessage = _("Screen curtain enabled")
if tempEnable:
# Translators: Reported when the screen curtain is temporarily
enabled.
enableMessage = _("Temporary Screen curtain, enabled until next
restart")
- if not alreadyRunning:
try:
vision.handler.initializeProvider(
screenCurtainProviderInfo,
temporary=tempEnable,
)
except Exception:
log.error("Screen curtain initialization error", exc_info=True)
# Translators: Reported when the screen curtain could not be enabled.
enableMessage = _("Could not enable screen curtain")
finally:

2020-01-23 23:54 GMT+01:00, Cyrille via Groups.Io
<cyrille.bougot2=laposte.net@groups.io>:
Hello

I have made tries with the profile switch procedure by switching between
an
app with specific profile and an app without specific profile (general
configuration).
I have found that the commit that has introduced this regression is the
following:
commit f194afaec02a3465ceb769ee88543ea337c6eb9e
Author: Leonard de Ruijter <leonardder@...>
Date: Mon Jan 13 00:27:57 2020 +0100
Optionally play sounds when toggling screen curtain (#10611)
* Add scree curtain sounds, ensure that it only enables once
* Add Andre Louis as a contributor
* Use mono sounds instead
* Update user guide, review actions

Looking at the log, I can see that the __init__ method of the screen
curtain
provider is not called when I turn back to the app where I previously had
activated it permanently. However I cannot figure very well why it is not
called anymore looking at the diff of this commit.

@leonardder:
Do you have an idea?

Thanks.
Cheers,

Cyrille


-----Message d'origine-----
De : nvda-devel@groups.io <nvda-devel@groups.io> De la part de Noelia
Ruiz
Envoyé : jeudi 23 janvier 2020 19:53
À : nvda-devel@groups.io
Objet : Re: [nvda-devel] Possible regression in NVDA 2019.3beta2 with
screen
curtain

Thanks Alberto.
If this is specific of beta2, maybe related to commit
cd5b11332cc1c4d0b5497cefc66fd30bc91fd987

@Cyrille, what do you think?
Cheers

2020-01-23 19:26 GMT+01:00, Alberto Buffolino <a.buffolino@...>:
Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently),
but this is set to False in configuration and is not enabled when
NVDA is restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another
profile and then switching again to previous where screen curtain
should be enabled is sufficient to see the problem. Warning and sound
disabled.
Alberto











Noelia Ruiz
 

In case, I will create a PR now that I have time. If not needed, we
can close it later.


2020-01-24 9:01 GMT+01:00, Noelia Ruiz via Groups.Io
<nrm1977=gmail.com@groups.io>:

I have created issue 10717 and branch fixScreenCurtain at
https://github.com/nvdaes/nvda

Should I create a PR against beta, or should be wait so that
@leonardder fix this?
Thanks.

2020-01-24 7:27 GMT+01:00, Noelia Ruiz via Groups.Io
<nrm1977=gmail.com@groups.io>:
Thanks Cyrille. I confirm you are right. I have fixed this locally by
removing a clause in globalCommands._enableScriptCurtain introduced in
this commit. Seems that when pressing twice the keystroke, one of them
is enabled temporarily and when the dialog confirmation is not shown,
the script is executed inmediately, so with this if... clause pressing
twice screen curtain is temporarily enabled but then disabled, not
enabled permanently. With my change the sound is heart twice when
performing a permanent enable, though for me this is not a problem

def _enableScreenCurtain(doEnable: bool = True):
self._waitingOnScreenCurtainWarningDialog = None
if not doEnable:
return # exit early with no ui.message because the user has
decided to abort.

tempEnable = GlobalCommands._tempEnableScreenCurtain
# Translators: Reported when the screen curtain is enabled.
enableMessage = _("Screen curtain enabled")
if tempEnable:
# Translators: Reported when the screen curtain is temporarily
enabled.
enableMessage = _("Temporary Screen curtain, enabled until next
restart")
- if not alreadyRunning:
try:
vision.handler.initializeProvider(
screenCurtainProviderInfo,
temporary=tempEnable,
)
except Exception:
log.error("Screen curtain initialization error", exc_info=True)
# Translators: Reported when the screen curtain could not be
enabled.
enableMessage = _("Could not enable screen curtain")
finally:

2020-01-23 23:54 GMT+01:00, Cyrille via Groups.Io
<cyrille.bougot2=laposte.net@groups.io>:
Hello

I have made tries with the profile switch procedure by switching between
an
app with specific profile and an app without specific profile (general
configuration).
I have found that the commit that has introduced this regression is the
following:
commit f194afaec02a3465ceb769ee88543ea337c6eb9e
Author: Leonard de Ruijter <leonardder@...>
Date: Mon Jan 13 00:27:57 2020 +0100
Optionally play sounds when toggling screen curtain (#10611)
* Add scree curtain sounds, ensure that it only enables once
* Add Andre Louis as a contributor
* Use mono sounds instead
* Update user guide, review actions

Looking at the log, I can see that the __init__ method of the screen
curtain
provider is not called when I turn back to the app where I previously
had
activated it permanently. However I cannot figure very well why it is
not
called anymore looking at the diff of this commit.

@leonardder:
Do you have an idea?

Thanks.
Cheers,

Cyrille


-----Message d'origine-----
De : nvda-devel@groups.io <nvda-devel@groups.io> De la part de Noelia
Ruiz
Envoyé : jeudi 23 janvier 2020 19:53
À : nvda-devel@groups.io
Objet : Re: [nvda-devel] Possible regression in NVDA 2019.3beta2 with
screen
curtain

Thanks Alberto.
If this is specific of beta2, maybe related to commit
cd5b11332cc1c4d0b5497cefc66fd30bc91fd987

@Cyrille, what do you think?
Cheers

2020-01-23 19:26 GMT+01:00, Alberto Buffolino <a.buffolino@...>:
Noelia Ruiz, il 23/01/2020 19.14, ha scritto:
- NVDA reports that screen curtain has been enabled (permanently),
but this is set to False in configuration and is not enabled when
NVDA is restarted.
Alberto:
I confirm, just tried. Even not restarting, changing to another
profile and then switching again to previous where screen curtain
should be enabled is sufficient to see the problem. Warning and sound
disabled.
Alberto