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

[browser][bindings] "Object '...' is not a typed array" in js_typed_array_to_array. #46624

Closed
kjpou1 opened this issue Jan 6, 2021 · 1 comment · Fixed by #46625
Closed
Assignees
Milestone

Comments

@kjpou1
Copy link
Contributor

kjpou1 commented Jan 6, 2021

public static int TestSum(SharedArrayBuffer sharedArrayBuffer)
{
    Int32Array array = new Int32Array(sharedArrayBuffer);
    Span<int> nativeArray = array; // error                        
    
    int sum = 0;
    for (int i = 0; i < nativeArray.Length; i++)
    {
        sum += nativeArray[i];
    }

    return sum;
}

Fails with "Object '...' is not a typed array" in js_typed_array_to_array.

Originally reported here: #46016

This can reliably be reproduced and changes will be coming soon.

@kjpou1 kjpou1 added this to the 6.0.0 milestone Jan 6, 2021
@kjpou1 kjpou1 self-assigned this Jan 6, 2021
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jan 6, 2021
@ghost
Copy link

ghost commented Jan 6, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
public static int TestSum(SharedArrayBuffer sharedArrayBuffer)
{
    Int32Array array = new Int32Array(sharedArrayBuffer);
    Span<int> nativeArray = array; // error                        
    
    int sum = 0;
    for (int i = 0; i < nativeArray.Length; i++)
    {
        sum += nativeArray[i];
    }

    return sum;
}

Fails with "Object '...' is not a typed array" in js_typed_array_to_array.

Originally reported here: #46016

Author: kjpou1
Assignees: kjpou1
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 6.0.0

@kjpou1 kjpou1 removed the untriaged New issue has not been triaged by the area owner label Jan 6, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 6, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 8, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants