Closed jbruechert closed 1 year ago
I think what's happening here is simple: when the lambda is suspended for the first time, it returns back to the event loop, which immediatelly deletes the lambda because it thinks it has finished.
As a simple test, try refactoring the lambda to a regular member function - it shouldn't crash anymore.
As to how to solve this inside QCoro - that might be tricky :-)
Thank you for the hint! That did indeed work :)
I'm not sure yet whether this is a help request or a bug report.
This code, which looks like it should work to me, causes a heap-use-after-free report from asan.
Do you know whether there is something I am doing wrong here? Thanks :)