Using 12.0.2 Occasionally we get the "the activation context being deactivated is not active for the current thread of execution" message box.
It is not caused by a CodeJock bug - it is our application code, which throws and does not always catch an exception. There is a number of places in Toolkit code, where a hook calls our application's code and, if it throws, the correct order of ActivationContext deactivation is not followed.
< ="Content-" content="text/; charset=utf-8">< name="ProgId" content="Word.">< name="Generator" content="Microsoft Word 12">< name="Originator" content="Microsoft Word 12"><>
CXTPSkinManagerApiHook::OnHookCallWindowProcW(...) is one of the places.
To identify the actual cause, we have modified a number of places in CodeJock source, by adding try/catch around the line of code where a hook calls our application code. This has been proven a very useful technic and helped us greately in location the actual troublemaker in our app's code.
The problem is that with each new version of CodeJock we have to modify the code to introduce the same changes again.
I believe it would be extremely helpful if try/catch were made part of the Toolkit code, added to where a hook calls the application code, conditional to some #ifdef. Inside the catch(...) a trace could be added, or just a plain message box.
Thoughts? Opinions? Are we the only ones who ended up doing something like that?
|