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

[wasm] ReleaseJSOwnedObjectByGCHandle - Value cannot be null #58031

Closed
pavelsavara opened this issue Aug 24, 2021 · 3 comments · Fixed by #58199
Closed

[wasm] ReleaseJSOwnedObjectByGCHandle - Value cannot be null #58031

pavelsavara opened this issue Aug 24, 2021 · 3 comments · Fixed by #58199
Assignees
Milestone

Comments

@pavelsavara
Copy link
Member

While running System.Net.Http.Functional.Tests locally

Unhandled Exception:
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.Remove(Object key) in C:\\Dev\\runtime\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\Dictionary.cs:line 976
   at System.Runtime.InteropServices.JavaScript.Runtime.ReleaseJSOwnedObjectByGCHandle(Int32 gcHandle) in C:\\Dev\\runtime\\src\\libraries\\System.Private.Runtime.InteropServices.JavaScript\\src\\System\\Runtime\\InteropServices\\JavaScript\\Runtime.JS.Owned.cs:line 53
@pavelsavara pavelsavara added this to the 6.0.0 milestone Aug 24, 2021
@pavelsavara pavelsavara self-assigned this Aug 24, 2021
@ghost
Copy link

ghost commented Aug 24, 2021

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

Issue Details

While running System.Net.Http.Functional.Tests locally

Unhandled Exception:
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.Remove(Object key) in C:\\Dev\\runtime\\src\\libraries\\System.Private.CoreLib\\src\\System\\Collections\\Generic\\Dictionary.cs:line 976
   at System.Runtime.InteropServices.JavaScript.Runtime.ReleaseJSOwnedObjectByGCHandle(Int32 gcHandle) in C:\\Dev\\runtime\\src\\libraries\\System.Private.Runtime.InteropServices.JavaScript\\src\\System\\Runtime\\InteropServices\\JavaScript\\Runtime.JS.Owned.cs:line 53
Author: pavelsavara
Assignees: pavelsavara
Labels:

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

Milestone: 6.0.0

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 24, 2021
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 24, 2021
@pavelsavara
Copy link
Member Author

Hmm, I could not reproduce it anymore.

@pavelsavara
Copy link
Member Author

The FinalizationRegistry callback is called potentially multiple times see https://github.com/tc39/proposal-weakrefs

@pavelsavara pavelsavara modified the milestones: 6.0.0, 7.0.0 Sep 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 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