Skip to content

TypeError: start is not a function when using emscripten_sleep() and asyncify #12239

Description

@ohnx

Version(s) affected: 2.0.3, 2.0.4

I'm getting this error when trying to use emscripten_sleep():
TypeError: start is not a function. (In 'start()', 'start' is undefined)

The line is coming from handleSleep; it looks like var start = Asyncify.getDataRewindFunc(Asyncify.currData); is returning nothing... Someone who was helping me debug mentioned this:

stepping through the asyncify js in a situation where it fails, it seems that when emscripten_sleep is called, that calls handleSleep, which then calls allocateData, which IIUC should store the resume target by calling setDataRewindFunc, and the latter gets that target by taking the top (bottom?) of the exportCallStack
however, due to reasons I don't understand yet, the exportCallStack is empty at that point

zip file of sample code to reproduce issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions