Comments (4)
Could you please provide a minimal, reproducible example or project that demonstrates the issue you've reported? This will help us to better understand and address the problem. In addition, it would be best if you could provide the reproducible code based on the UT (Unit Test) project. This will greatly assist us in identifying and resolving the issue. Thank you!
from puerts.
@chexiongsheng will do! Just doing some debugging on my side to ensure it's not an issue with my code.
from puerts.
I run this ut case:
[Test]
public void CallByProxyTest()
{
var jsEnv = UnitTestEnv.GetEnv();
var ret = jsEnv.Eval<string>(@"
(function() {
const helper = new CS.Puerts.UnitTest.CrossLangTestHelper();
const proxy = new Proxy(helper, {
get: function(target, name) {
return target[name];
}
});
const val = proxy.GetDateTime();
return '' + (val instanceof CS.System.DateTime) + (val instanceof Date)
})()
");
Assert.AreEqual("truefalse", ret);
jsEnv.Tick();
}
Got a Exception, Not carsh
System.Exception : chunk:9: Error: c# exception:Object reference not set to an instance of an object.,stack: at PuertsStaticWrap.Puerts_UnitTest_CrossLangTestHelper_Wrap.M_GetDateTime(IntPtr isolate, IntPtr info, IntPtr self, Int32 paramLen, Int64 data) in C:\puerts\unity\test\dotnet\Src\StaticWrapper\Puerts_UnitTest_CrossLangTestHelper_Wrap.cs:line 46
Error: c# exception:Object reference not set to an instance of an object.,stack: at PuertsStaticWrap.Puerts_UnitTest_CrossLangTestHelper_Wrap.M_GetDateTime(IntPtr isolate, IntPtr info, IntPtr self, Int32 paramLen, Int64 data) in C:\puerts\unity\test\dotnet\Src\StaticWrapper\Puerts_UnitTest_CrossLangTestHelper_Wrap.cs:line 46
at chunk:9:39
at chunk:11:19
backtrace:
at Puerts.JsEnv.Eval[TResult](String chunk, String chunkName) in C:\puerts\unity\Assets\core\upm\Runtime\Src\Default\JsEnv.cs:line 353
at Puerts.UnitTest.CrossLangTest.CallByProxyTest() in C:\puerts\unity\test\Src\Cases\CrossLang\CrossLangTest.cs:line 868
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
from puerts.
Was an issue from my side!
from puerts.
Related Issues (20)
- [Unity]v8的FunctionTemplate同key的属性导致的问题
- [Unity]适用于top-level-await的esm实现 HOT 1
- [Unity]鸿蒙出包注意事项
- [UE] Bug: 在PublicIncludePaths中引入Programs/UnrealHeaderTool/Public,编译时会产生大量警告 HOT 4
- [UE]ts定制的组件attach c++定义的组件报错 HOT 1
- [UE] Bug: TS定义一个的property组件找不到SetAnimClass()函数 HOT 5
- [UE] Bug: 生成的ue.d.ts会漏掉/Engine下的蓝图类
- [Unity] Bug: 发布微信小程序报错JsEnv has been disposed HOT 1
- [Unity]字符串中间含\0传递到js会被截断 HOT 3
- global object in javascrript HOT 7
- [Unity] Bug: 仅 editor crash HOT 2
- [UE] Bug: RegisterTArray报错及使用问题,及模板绑定相关问题 HOT 7
- [Unity] 仿照unreal使用v8::StackTrace::CurrentStackTrace获取js堆栈,但返回GetFrameCount总是0 HOT 2
- [Unity] Bug: Fields with internal type exposed via explicit interface is always undefined HOT 3
- [Unity] Bug: 运行puerts的nodejs http示例,localhost访问不到 HOT 6
- [Unity]TS端向CS端注册带参(非string)回调报错 HOT 1
- [Unity]quickjs后端js throw null会导致崩溃
- [Unity] 如何安装? HOT 4
- [Unity]quickjs版本支持throw undefined HOT 1
- [UE] Bug: UE5安卓打包中出现libnode.so缺失及SSL库的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puerts.