Quantcast
Channel: ClearScript
Viewing all 2297 articles
Browse latest View live

Edited Unassigned: [BUG] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.

Edited Unassigned: [BUG] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.

Edited Issue: [BUG] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.

Commented Issue: [BUG] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.
Comments: Thanks for reporting this issue!

Edited Issue: [FIXED] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.

Commented Issue: [FIXED] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.
Comments: A fix is now available ([commit](https://clearscript.codeplex.com/SourceControl/changeset/e3f641f1a19b00e19ef11c17785e25d9640ea0b5)). Thanks again!

Commented Issue: [FIXED] Can no longer use object method "toString()" in 5.4.4 [98]

0
0
Hi,

We currently use ClearScript v5.4.2 and wanted to upgrade to v5.4.4, but some of our tests started failing. This is because the method "toString()" no longer binds to the method on the managed instance of the HostObject - this means that it always returns "[object HostObject]".

I also tried using extension methods and interface methods, but all of them return the same string: "[object HostObject]". The problem is that we can't upgrade to ClearScript v5.4.4 because of this issue. If it turns out to be a v8 issue that can't be fixed in ClearScript, do you know what version of v8 made it stop working?

I attached an additional test fixture that you can just add to the ClearScriptTest project so you can see experience the problem.

Thank you.
Comments: Thanks a lot, it works fine now!

Source code checked in, #e3f641f1a19b00e19ef11c17785e25d9640ea0b5

0
0
Fixed native property hiding on V8 (Issue #98).

New Post: Clearscript V8 engine hang while debugging

0
0
Hi,

Any other debugger technique available in clearscript v8 engine other than remote debugging.

Thanks and Regards
Praveen Kumar N

New Post: Clearscript V8 engine hang while debugging

0
0
Hi Praveen,

Using your test program, we've reproduced the issue on Windows 7 x64, but it's very intermittent, so we don't have a diagnosis at this time.

As for alternate techniques, what are your requirements? Are you only interested in pausing and resuming script execution, or do you need to do more than that?

Thanks!

New Post: Clearscript V8 engine hang while debugging

0
0
Hi,

Thank you, exactly it is intermittent we have already implemented this debugger feature in our application. we are able to control execution line by line using pause resume feature, also scripts may be long running or automation script. it would be helpful if we have any alternative for this.
Is it possible apply interception mechanism on native class objects or any callback on method calls.

Thank you
Praveen

New Post: Clearscript V8 engine hang while debugging

0
0
Hi Praveen,

What are your requirements? Does it have to be line-by-line pause/resume? Do you only need execution control, or do you need other debugger capabilities (e.g., access to local variables, etc.)?

Thanks!

New Post: Clearscript V8 engine hang while debugging

0
0
Hi,
  1. Requirements
    Script execution control pause/resume(using this able show progress of script execution). we are using this feature to control execution not for debugging.
  2. Does it have to be line-by-line pause/resume?
    Yes.
  3. Do you only need execution control?
    Yes.
  4. Do you need other debugger capabilities?.
    Yes, we are able to access local variable and its values using debugger protocol command and using Script property of engine.
Thank you
Praveen

New Post: Windows Form Freezes launching from script

0
0
Hi,

I am launching windows form from script in event handler, form launched successfully and unable interact with form and form freezes.
            FileSystemWatcher _fileWatcher = new System.IO.FileSystemWatcher();
            vde.AddHostObject("_fileWatcher", _fileWatcher);        
            
            _fileWatcher.Path = "C:\\Users\\praveen\\Desktop";
            _fileWatcher.Filter = "*.*";
            _fileWatcher.NotifyFilter = System.IO.NotifyFilters.Attributes |
                                                     System.IO.NotifyFilters.CreationTime |
                                                     System.IO.NotifyFilters.DirectoryName |
                                                     System.IO.NotifyFilters.FileName |
                                                     System.IO.NotifyFilters.LastAccess |
                                                     System.IO.NotifyFilters.LastWrite |
                                                     System.IO.NotifyFilters.Security |
                                                     System.IO.NotifyFilters.Size;
            _fileWatcher.EnableRaisingEvents = true;
            _fileWatcher.IncludeSubdirectories = true;
Script
var form=new WinForms.System.Windows.Forms.Form();

var delconncect=_fileWatcher.Created.connect(function(obj,e){
     form.Show();   
});

var desconncect=_fileWatcher.Deleted.connect(function(obj,e){
    form.Show();        
});
form does not freeze if we launch without event handler.

Thanks and Regards
Praveen Kumar

New Post: Windows Form Freezes launching from script

0
0
Hi Praveen,

The problem is likely that you're showing the form on a worker thread instead of your application's UI thread. Try this:
FileSystemWatcher _fileWatcher = new System.IO.FileSystemWatcher();
vde.AddHostObject("_fileWatcher", _fileWatcher);
// ...
_fileWatcher.SynchronizingObject = someForm; // <-- ADD THIS LINE
where someForm is your application's main form or some other form that's active before you run your script.

Good luck!

New Post: Clearscript V8 engine hang while debugging

0
0
Hi again,

The debugger protocol is the only way to step through script code line-by-line. There may be other ways to do pause/resume, but it wouldn't be based on source line breakpoints, so you probably couldn't use it to show progress.

Cheers!

New Post: Windows Form Freezes launching from script

0
0
Hi,

Thank you. it's working.


Regards
Praveen

New Post: Passing function as argument to c#

0
0
Hi,

I am trying to pass java script function as parameter to c# function. I implement this using action delegate but throws invalid arguments exception.
public class ScriptFunctions
{
        ..//MainForm property

        public void LaunchWinForm(Action launcAction)
        {
            try
            {
                if (MainForm.InvokeRequired)
                {
                   MainForm.Invoke(new MethodInvoker(launcAction)), null);
                }
                else
                    launcAction)();
            }
            catch (Exception)
            {                
                throw;
            }
        }
}

v8TriggerEngine.AddHostObject("ScriptLib", new ScriptFunctions());
from javscript
var form=new WinForms.System.Windows.Forms.Form();

var delconncect=_fileWatcher.Created.connect(function(obj,e){
     ScriptLib.LaunchWinForm(function(){
                  form.Show();  
     }); 
});
Engine throws invalid argument exception.

Thanks and Regards
Praveen Kumar

New Post: Passing function as argument to c#

0
0
Hi Praveen,

The problem is that script functions aren't implicitly convertible to .NET delegates. They do support dynamic invocation, so you can do something like this:
publicvoid LaunchWinForm(dynamic launchAction) {
    if (MainForm.InvokeRequired) {
        MainForm.BeginInvoke(new Action(() => launchAction()), null);
    }
    else {
        launchAction();
    }
}
Good luck!

New Post: Potential Stackoverflow on Azure Web Apps

0
0
We're using ClearScript.v8 (via React.NET) in asp.net web apps hosted in Azure and we get intermittent seemingly random occurrences of "Unknown error; potential stack overflow detected" which is coming from within the Clearscript.V8 code. Does anyone have any insight into the conditions that cause this - it seems to be very random and renders an engine unusable (the engine will have been taken from a runtime and executed scripts only a handful of times, after the error every attempt to execute code by that instance gets this error). I've played with the way the Runtime and Engines get used e.g. the number of usages of each instance, and also tried frequent garbage collection but to no avail.
It feels as if it's something environmental - a memory or other condition that makes the underlying V8 instance behave in a way that in turn triggers the error in ClearScript.V8.
NB We're running 32-bit but feel that while running 64-bit could alleviate the issue, it won't eliminate it unless someone can advise otherwise.
Viewing all 2297 articles
Browse latest View live




Latest Images