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

Missing function: schedule_background_exec #16516

Closed
cgravill opened this issue Feb 8, 2018 · 4 comments
Closed

Missing function: schedule_background_exec #16516

cgravill opened this issue Feb 8, 2018 · 4 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@cgravill
Copy link

cgravill commented Feb 8, 2018

Great to see more activity on this!

I tried out with some .net code we like to run client-side and was pleasantly surprised to see that it worked without change. However, when I run the same function a few times I get a warning schedule_background_exec followed by an abort:

image

Is this likely to be a memory issue? I can find schedule_background_exec in the mono source but it looks like the version in Blazor (library_mono.js) is older: mono/mono@d5ebaad#diff-342565351091ae5f9ac0212cc298e1f5

@SteveSandersonMS
Copy link
Member

If you have a small repro, could you post it? There's a good chance this will just go away on its own when we update Mono, but it would be nice to check.

@cgravill
Copy link
Author

cgravill commented Feb 9, 2018

Sounds good. You can reproduce this by replacing RepeatString in MonoSanityClient:

var result = new StringBuilder();

for (var j = 0; j < 10000; j++)
{
    var innerResult = new StringBuilder();

    for (var i = 0; i < count; i++)
    {
        result.Append(str + j.ToString());
    }
}

return result.ToString();

then if you click the relevant Go button once it works, a second time it fails.

It's not just the repeat, if you replace the parameter "Hello" with something longer, e.g. "Missing function: schedule_background_exec" it fails within one call.

@SteveSandersonMS
Copy link
Member

As predicted, this problem went away on its own when I updated Mono. I guess they fixed it by adding this line: https://github.com/aspnet/Blazor/blob/1d79e72167ff22cead24ff16b0ace79c18a77d82/src/mono/incoming/library_mono.js#L14

Thanks again @cgravill for posting the really clear repro :)

@cgravill
Copy link
Author

Thanks @SteveSandersonMS that's excellent and much appreciated. The update works for our actual code too - compilers with bigger code examples. It also worked with some of our optimisation code based on Math.NET which is pretty impressive!

@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/blazor Oct 27, 2019
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Oct 27, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

3 participants