[CRITICAL] Task Await never completes if the task doesn't suspend

Summary

Repro :

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

test_device := class(creative_device):

    FakeSuspends()<suspends>:void=
        return

    RealSuspends()<suspends>:void=
        Sleep(0.0)

    OnBegin<override>()<suspends>:void=
        SuspendingTask := spawn { RealSuspends() }
        Sleep(1.0)
        Print("SuspendingTask AWAIT")
        SuspendingTask.Await()
        Print("SuspendingTask DONE")

        NotSuspendingTask := spawn { FakeSuspends() }
        Sleep(1.0)
        Print("NotSuspendingTask AWAIT")
        NotSuspendingTask.Await()
        Print("NotSuspendingTask DONE") # Never prints

Logs

[2024.10.21-13.08.25:807][200]LogVerse: : SuspendingTask AWAIT
[2024.10.21-13.08.25:808][200]LogVerse: : SuspendingTask DONE
[2024.10.21-13.08.26:807][320]LogVerse: : NotSuspendingTask AWAIT

This can be a big issue when trying to do complex async structures (that supports dynamically suspending methods)

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

See summary

Expected Result

See summary

Observed Result

See summary

Platform(s)

PC

The status of FORT-808494 incident has been moved from ‘Needs Triage’ to ‘Closed’. Resolution Reason: ‘Duplicate’

1 Like

Thank you, @im_a_lama - the team is aware of this one and is investigating. We have some duplicate tickets here so you may see an update in the Bug-Reporter post.

1 Like