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

Grammars don't work if mic turned off then on #17

Closed
calmofthestorm opened this issue Jan 23, 2014 · 3 comments
Closed

Grammars don't work if mic turned off then on #17

calmofthestorm opened this issue Jan 23, 2014 · 3 comments

Comments

@calmofthestorm
Copy link
Member

Natlink reloads modules when the microphone is turned off and then back on. Unfortunately, it only reloads grammars -- those that begin with _. This leads to two issues:

  • Modules that grammars may import will not be reloaded.
  • Due to reliance on isinstance and similar, after the reload, you run into x-is-not-an-x type of errors. This occurs whether or not you attempt to manually reload modules that grammars rely on.

For now, the workaround is to exit and start again Dragon whatever you make a change to grammar. I agree this is not ideal, but at this time the only way I know to fix this would be to make every grammar a standalone file. This would result in an unacceptable degree of duplication of code, and make configuration a nightmare.

@poppe1219
Copy link
Contributor

I got this error at work on my Windows 7 64-bit machine with DNS 12, Natlink 4 Delta (I think) and python 2.6. I didn't understand why, and didn't have time to look into the cause of the problem. I have just restarted Dragon and continued working when I noticed that the problem disappeared.

At home however, Where 97% of my Dragonfly script development takes place, on Windows XP (32-bit) with DNS 11, Natlink 4.0 and Python 2.6, I can happily reload Natlink around 10 times in a row without this problem.
However, eventually DNS crashes completely silent, no error messages.

@calmofthestorm
Copy link
Member Author

Dragon frequently crashes silently for me as well. I think most people have this problem with it, at least those using natlink. It doesn't crash enough to really interrupt my workflow so I do not mind that much; just want you to know you're not alone.

There are circumstances under which you won't need to restart Dragon (such as only modifying a file starting with _ that does not import any modules that have changed (even in timestamp)).

@calmofthestorm
Copy link
Member Author

I believe this has been fixed, at least for all existing grammars. The solution was surprisingly easy -- be more careful about grammar cleanup in the unload hooks.

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

2 participants