Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. #3215

Open
georgii01 opened this issue Jan 15, 2025 · 1 comment

Comments

@georgii01
Copy link

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 #1038

@levlam
Copy link
Contributor

levlam commented Jan 16, 2025

See #3202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants