Log messages were passed, unchecked, to the log_message_written callback
On Xamarin this callback is written in C#. So the const char*
is
converted to a .NET string
, which is stored as UTF16. Mono checks for
validity and throws an exception when the string contains illegal byte
sequences, leading to a crash.
Interestingly, though, I was unable to reproduce the crash on UWP, which uses the .NET Core runtime. The illegal bytes seem to be silently replaced with the replacement character ('�') without throwing.
Parent: linphone-sdk!2816 (merged)