-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Runtime exception with ConditionalWeakTable, Unity Mono IL2CPP #1279
Comments
I'm at lost with these as I don't do Unity development, is it enough for you to disable the functionality with the switch |
Yes, that is what we did for the time-being. And I understand there's nothing much you can do in this case. The exception with ConditionalWeakTable doesn't happen in Unity Editor. Only happens in deployed builds (and doesn't reproduce consistently since Unity/Mono's ConditionalWeakTable gets "corrupted" differently on difference machines). So I think Unity devs using Jint will get tripped by this eventually. But at least now they can search Google and arrive at this thread. 😀 _engine = new Jint.Engine(opts => {
// Jint uses ConditionalWeakTable for tracking ObjectWrapper identity, but Unity is buggy with ConditionalWeakTable.
opts.Interop.TrackObjectWrapperIdentity = false;
...
} |
When hopefully eventually have some documentation, we can have some sort unity specific section for best practices.. |
After PR #1227, we are getting the following runtime exception on AOT platforms like Unity IL2CPP.
I think the offending line is
jint/Jint/Options.cs
Line 258 in 3eddf04
After a bit of digging, I'm beginning to suspect that Unity/Mono doesn't work well with
ConditionalWeakTable
.The text was updated successfully, but these errors were encountered: