Ticket Hash: | 8a426d12eb2a1fa69ebda7c09623298fa8473679 | ||
Title: | delegates marked with UnmanagedFunctionPointer (i.e. called from native code) must not throw exceptions | ||
Status: | Closed | Type: | Code_Defect |
Severity: | Critical | Priority: | NextRelease |
Subsystem: | Integration_Via_PInvoke | Resolution: | Fixed |
Last Modified: |
2012-02-29 14:55:38 13.35 years ago |
Created: |
2012-02-19 04:49:18 13.38 years ago |
Version Found In: | 1.0.79.0 |
Description: | ||||
<verbatim> Managed code used in a delegate exposed to native code cannot throw exceptions without resulting in undefined behavior, see: </verbatim> <a href="http://stackoverflow.com/questions/8315592/implications-of-throwing-exception-in-delegate-of-unmanaged-callback">Implications of throwing exception in delegate of unmanaged callback</a> <verbatim> The potential solution is to wrap all calls into any user-provided [managed] code in try/catch blocks and then simply log any thrown exceptions instead of letting them escape back to native code. </verbatim> <hr /><i>mistachkin added on 2012-02-19 13:20:03 UTC:</i><br /> This has been fixed by check-in [6136a92dc5]. |