I've already spent several days investigating this:
When decrypting / verifying a mail outlook sometimes freezes. There is no clear indication why or when that is the case.
For me the freeze appears < 1% meaning it freezes usually after > 100 decrypt / verify operations.
With changed Timing I was able to move this to < 0.1% meaning that it froze only after > 1000 decrypt / verify operations.
Changing the timing of ParseController::parse appeared to affect this. Although speeding it up and switching to the keycache does not appear to have the desired effect.
- Sometimes Outlook freezes while our code is active. A call into the OOM like
int ret = put_oom_string (m_mailitem, "Body", converted ? converted : "");
does not return.
- Mostly Outlook freezes while we are not active. We see the freeze when we send a windowmessage and it is no longer handled.
I did not find a pattern with Process Monitor and Process Explorer. Sometimes Outlook churns CPU when it is hanging, sometimes not. The stack in Process Explorer looks differently all the time.
It might be related to UI invalidation as changing the timing of UI Invalidation also changed the crash stuff. But the invalidation is done when it freezes and the Icons etc. are already queried so I don't really see how that can be the case.