question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release assembly with weaved Task function crashes

See original GitHub issue

Hi, another interesting bird. I add the complete, as simple as possible, project emulating bug. When you start it from VS in Debug mode - works, when you start exe from DEBUG folder - works. When you start it from VS in Release mode or exe from from RELEASE folder - crashes. with Critical error (the same as in previous bug).

TestAsync.zip

Both not working neither async function calling async Task nor sync calling async

//Fatal error
 public void StartTask()
            {
                var task = System.Threading.Tasks.Task.Run(async () => await AddWhatever());
                var r = task.Result;                
            }

//Fatal error
            public async void StartTask1()
            {
                long r = await AddWhatever();
            }


 public async System.Threading.Tasks.Task<long> AddWhatever()
            {
                return -1;
            }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:42 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
0xd4dcommented, Aug 10, 2017

The PdbAsyncMethod instance is in: body.PdbMethod.AsyncMethod

2reactions
0xd4dcommented, Aug 10, 2017

In that case, you need to update all PdbAsyncMethod.StepInfos. The BreakpointMethod field must be updated to the new method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In line assembler method crashing the entire program
I need to use assembly and inline assembly because it is an assignment for uni. As for epb , VC++ x86 compiler automatically...
Read more >
TaskGroup-Related Crash - Using Swift
I'm seeing a crash relating to TaskGroup , but unfortunately it's only coming up in production and I have limited information on it...
Read more >
Unloading broken assembly ?.dll, this assembly can cause ...
Unloading broken assembly Library/ScriptAssemblies/Assembly-CSharp.dll, this assembly can cause crashes in the runtime
Read more >
Windows update KB5025239 causes the tasks schedular ...
Windows update KB5025239 causes the tasks schedular to crash but then starts on second attempt. Hi,. I've updated my PC to the latest...
Read more >
Setup using HeatDirectory task kills Visual Studio 2022
BeforeBuild: C:\Program Files (x86)\WiX Toolset v3.11\bin\Heat.exe dir "..\..\build\src" -cg ApplicationFiles -dr ServiceRoot -scom -sreg ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found