Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVDA crash randomly when executing onInstall function in installTasks #4496

Closed
nvaccessAuto opened this issue Sep 28, 2014 · 12 comments
Closed

Comments

@nvaccessAuto
Copy link

Reported by norrumar on 2014-09-28 07:58
NVDA crashes randomly when installing Emoticons add-on using onInstall function of installTasks.
It could be related to import speechDictHandler.

@nvaccessAuto
Copy link
Author

Attachment installTasks.py added by norrumar on 2014-09-28 08:00
Description:
InstallTasks containing onInstall function

@nvaccessAuto
Copy link
Author

Attachment nvda-old.log added by norrumar on 2014-09-28 08:01
Description:
Log file

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2014-09-28 09:11
This shouldn't be random. It should occur every time onUninstall is run in affected add-ons, which means whenever NVDA is restarted after removing or updating the add-on.

I suspect this is due to the circular import between speechDictHandler and synthDriverHandler. It looks like synthDriverHandler doesn't need to be imported in speechDictHandler any more, so it can be removed.

@norrumar, I assume you can run from source? If so, can you please try removing this line from speechDictHandler:

import synthDriverHandler

Does that fix the problem?
Changes:
Milestone changed from None to 2014.4

@nvaccessAuto
Copy link
Author

Comment 2 by norrumar (in reply to comment 1) on 2014-09-28 10:29
Replying to jteh:

This shouldn't be random. It should occur every time onUninstall is run in affected add-ons, which means whenever NVDA is restarted after removing or updating the add-on.

I suspect this is due to the circular import between speechDictHandler and synthDriverHandler. It looks like synthDriverHandler doesn't need to be imported in speechDictHandler any more, so it can be removed.

@norrumar, I assume you can run from source? If so, can you please try removing this line from speechDictHandler:

import synthDriverHandler

Does that fix the problem?

Yes, the problem is fixed removing this line. But then another issue appears, about keyboardHandler. It's shown in the new attached log file.
Thanks.

@nvaccessAuto
Copy link
Author

Attachment nvda.log added by norrumar on 2014-09-28 10:33
Description:
New log file: error in keyboardHandler

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2014-09-28 11:00
I suspect (but am less certain) that this is due to importing gui in installTasks, which probably indirectly causes another circular import. Fixing this one will be much harder.

You can work around this by importing gui in onInstall instead of at module level. However, it'd obviously still be better if doing what you're doing didn't break NVDA.

@nvaccessAuto
Copy link
Author

Comment 4 by norrumar (in reply to comment 3) on 2014-09-28 11:26
Replying to jteh:

I suspect (but am less certain) that this is due to importing gui in installTasks, which probably indirectly causes another circular import. Fixing this one will be much harder.

You can work around this by importing gui in onInstall instead of at module level. However, it'd obviously still be better if doing what you're doing didn't break NVDA.

Yes, it seems you are right: if I import gui in onInstall the problem don't appear executing NVDA from source, if I remove import synthHandler from speechDictHandler.
So imo this ticket is still valid and this line could be removed from the core.
Thanks a lot.

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2014-11-20 08:05
These really should have been done for 2014.4, but we're out of time and they aren't absolutely critical. Still, we need to manage this better in future.
Changes:
Milestone changed from 2014.4 to 2015.1

@nvaccessAuto
Copy link
Author

Comment 6 by norrumar on 2014-11-20 08:17
I just have seen the modification for the Milestone of this ticket, and just before I have created t4496 branch at
https://bitbucket.org/nvdaaddonteam/nvda
Thanks.

@nvaccessAuto
Copy link
Author

Comment 8 by James Teh <jamie@... on 2015-01-16 06:05
In [dd5a7f8]:

NVDA no longer crashes when restarting after removing or updating an add-on which imports speechDictHandler in its installTasks module.

This was due to a circular import between speechDictHandler and synthDriverHandler. speechDictHandler no longer requires synthDriverHandler, so that import was simply removed.
Re #4496.

@nvaccessAuto
Copy link
Author

Comment 9 by James Teh <jamie@... on 2015-01-16 06:05
In [97a7097]:

Merge branch 't4496' into next

Incubates #4496.

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

Comment 11 by James Teh <jamie@... on 2015-01-30 05:25
In [fd684d9]:

NVDA no longer crashes when restarting after removing or updating an add-on which imports speechDictHandler in its installTasks module.

This was due to a circular import between speechDictHandler and synthDriverHandler. speechDictHandler no longer requires synthDriverHandler, so that import was simply removed.
Fixes #4496.

Changes:
Removed labels: incubating
State: closed

@nvaccessAuto nvaccessAuto added this to the 2015.1 milestone Nov 10, 2015
jcsteh pushed a commit that referenced this issue Nov 23, 2015
…add-on which imports speechDictHandler in its installTasks module.

This was due to a circular import between speechDictHandler and synthDriverHandler. speechDictHandler no longer requires synthDriverHandler, so that import was simply removed.
Fixes #4496.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant