td
td copied to clipboard
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Hi,
I built a new version of Telegram.Td.dll The issue appeared after switching to TDLib 1.8.42 x64. I had no issues with TDLib 1.8.26 x64. Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at td.ClientManager.execute(unique_ptrtd::td_api::Object* , unique_ptrtd::td_api::Function* ) at Telegram.Td.Client.Execute(Function function) at TdExample.Example.Main()
static void Main()
{
// disable TDLib log
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
if (Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, false))) is TdApi.Error)
{
throw new System.IO.IOException("Write access to the current directory is required");
}
new Thread(() =>
{
Thread.CurrentThread.IsBackground = true;
Td.Client.Run();
}).Start();
...
Windows Server 2022 Datacenter Azure Edition Version OS Build 20348.2966
Related to https://github.com/tdlib/td/issues/1038
See https://github.com/tdlib/td/issues/3202.