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

Is it possible that the V8ICUData.ResourceName constant in some cases is null? #402

Closed
Taritsyn opened this issue Jul 23, 2022 · 4 comments

Comments

@Taritsyn
Copy link
Contributor

Hello!

I was recently informed about a strange error.

According to the description (Value cannot be null. (Parameter 'name')), this error occurs when reading a resource. And it seems that this error began to occur after updating the Microsoft ClearScript.V8 library from version 7.2.1 to 7.3.1.

I have only one explanation for this error: an unsafe V8Proxy.InitializeICU method in some cases cannot get a value of the V8ICUData.ResourceName constant.

@ClearScriptLib
Copy link
Collaborator

Hi Andrey,

At first glance, that seems unlikely. As you can see, V8ICUData.ResourceName is a string constant, so it should be valid unless its assembly couldn't be loaded, in which case a very different exception would have been thrown.

Also, forcing that argument to null yields a different error message on .NET Framework and .NET Core/5/6:

Unhandled Exception: System.ArgumentNullException: String reference not set to an instance of a String.
   at System.Reflection.RuntimeAssembly.GetResource(RuntimeAssembly assembly, String resourceName, UInt64& length, StackCrawlMarkHandle stackMark, Boolean skipSecurityCheck)
   at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name, StackCrawlMark& stackMark, Boolean skipSecurityCheck)
   at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name)
   at Microsoft.ClearScript.V8.V8Proxy.InitializeICU()
   at Microsoft.ClearScript.V8.V8Proxy.OnEntityHolderCreated()
   at Microsoft.ClearScript.V8.SplitProxy.V8EntityHolder..ctor(String name, Func`1 acquireHandle)
   at Microsoft.ClearScript.V8.SplitProxy.V8IsolateProxyImpl..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)

Interestingly, the Mono runtime does produce the default "Value cannot be null" message. Do you know if your issue was reported by someone using Mono?

In any case, please let us know if you find a way to reproduce this issue.

Thanks!

@Taritsyn
Copy link
Contributor Author

In any case, please let us know if you find a way to reproduce this issue.

Unfortunately, I have not yet received a detailed description of this error from @timheuer.

@ClearScriptLib
Copy link
Collaborator

Hi Andrey,

Please feel free to reopen this issue if you find a way to reproduce the problem.

Thanks!

@Taritsyn
Copy link
Contributor Author

OK

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

No branches or pull requests

2 participants