Giter VIP home page Giter VIP logo

Comments (4)

chexiongsheng avatar chexiongsheng commented on June 4, 2024

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.

raad-genies avatar raad-genies commented on June 4, 2024

@chexiongsheng will do! Just doing some debugging on my side to ensure it's not an issue with my code.

from puerts.

chexiongsheng avatar chexiongsheng commented on June 4, 2024

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.

raad-genies avatar raad-genies commented on June 4, 2024

Was an issue from my side!

from puerts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.