Quantcast
Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog



Channel Description:

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

older | 1 | .... | 66 | 67 | (Page 68) | 69 | 70 | .... | 115 | newer

    0 0

    Greetings!

    Those errors are exactly what you get if the V8 assemblies are missing. Are you sure you let V8Update run to completion? Was it successful? If so, you should see the following files:
    [ClearScriptRoot]\ClearScript\V8\V8\lib\v8-x64.dll
    [ClearScriptRoot]\ClearScript\V8\V8\lib\v8-x64.pdb
    [ClearScriptRoot]\ClearScript\V8\V8\lib\v8-ia32.dll
    [ClearScriptRoot]\ClearScript\V8\V8\lib\v8-ia32.pdb
    Cheers!

    0 0

    I never got any 'success' message for the V8Update. Gave it many more tries and then switched to just installing it directly through package manager console in VS2013:
    Install-Package ClearScript.Installer

    This gave me all the necessary dll's.
    Thanks.

    0 0

    Glad you got it working! For future reference, V8Update's output should look something like this:
    C:\ClearScript>v8update
    Build mode: Release
    V8 revision: Tested (3.30.33.16)
    Creating build directory ...
    Downloading V8 ...
    Patching V8 ...
    Downloading GYP ...
    Downloading Python ...
    Downloading Cygwin ...
    Creating patch file ...
    Building 32-bit V8 ...
    Building 64-bit V8 ...
    Creating lib directory ...
    Importing V8 libraries ...
    Creating include directory ...
    Importing V8 header files ...
    Importing patch file ...
    Succeeded!
    Good luck!

    0 0

    Hi,

    Could it be something has changed in the V8 debugging protocol in the new version?

    We are having issues with setting breakpoints. In 5.4.1 V8 doesn't respond to any of setbreakpoint requests.

    In v5.4.0 following request successfully sets a breakpoint
    {"command":"setbreakpoint","arguments":{"type":"script","target":"myscript","line":1,"enabled":true},"seq":1,"type":"request"}"
    response
    {"seq":0,"request_seq":1,"type":"response","command":"setbreakpoint","success":true,"body":{"type":"scriptName","breakpoint":1,"script_name":"myscript","line":1,"column":null,"actual_locations":[]},"refs":[],"running":true}
    All other commands such as continue, clearbreakpoint, etc work as well.

    In v5.4.1 response never arrives for the above setbreakpoint request. I haven't had time yet to to test other commands nor debug it any further unfortunately.
    The debugger itself seems to connect successfully though as I can see the welcome message with version info being sent back.

    0 0

    Hello,

    I've added an implementation for IActiveScriptSiteWindow to the WindowsScriptEngine.ScriptSite class which allows the user to provide a window handle for parenting dialogs. The code can be found at:

    https://lr-senergy.kilnhg.com/Code/ODM-OpenSource/Group/ClearScript

    or in the attached patch.

    Currently EnableModeless is not implemented - this could be made to fire an event in the WindowsScriptEngine class, perhaps.

    If it's possible to merge this (or a version of it) into the official codebase, that would be great.

    Thanks, Owen

    0 0

    We are using ClearScript in our application as a replacement for the MS Script Control (to enable users to run custom scripts interfacing with an application-provided object), and we've encountered an issue involving legacy behaviour with retrieving default property values, where those objects are .NET objects.

    The situation we encountered involved VBScript accessing a DAO-like object:

    Something = rs.Fields("something")

    where rs.Fields is a method returning an IEnumerable object (a "Fields" object). The object returned by the Fields object (the "Field" object) has a default property as so:

    [DispId(0)]
    public object Value
    {
    get { .... }
    set { .... }
    }

    The enumeration is working fine, but the default property would not be identified as such. The VBScript engine was actually looking for "[DISPID=0]", but ClearScript wasn't checking the DispId attribute. The attached patch adds support to check for the DispId attribute.

    The attached patch fixes the getting; setting unfortunately still doesn't work with this fix, but we worked around that in our application. (If you have any idea how to fix it in ClearScript as well though, I'm sure that would be useful!)

    Hope this is useful, and that my fix is correct!

    Thanks, Owen.

    0 0

    We are using ClearScript in our application as a replacement for the MS Script Control (to enable users to run custom scripts interfacing with an application-provided object), and we've encountered an issue involving legacy behaviour with retrieving default property values, where those objects are .NET objects.

    The situation we encountered involved VBScript accessing a DAO-like object:

    Something = rs.Fields("something")

    where rs.Fields is a method returning an IEnumerable object (a "Fields" object). The object returned by the Fields object (the "Field" object) has a default property as so:

    [DispId(0)]
    public object Value
    {
    get { .... }
    set { .... }
    }

    The enumeration is working fine, but the default property would not be identified as such. The VBScript engine was actually looking for "[DISPID=0]", but ClearScript wasn't checking the DispId attribute. The attached patch adds support to check for the DispId attribute.

    The attached patch fixes the getting; setting unfortunately still doesn't work with this fix, but we worked around that in our application. (If you have any idea how to fix it in ClearScript as well though, I'm sure that would be useful!)

    Hope this is useful, and that my fix is correct!

    Thanks, Owen.

    0 0

    We are using ClearScript in our application as a replacement for the MS Script Control (to enable users to run custom scripts interfacing with an application-provided object), and we've encountered an issue involving legacy behaviour with retrieving default property values, where those objects are .NET objects.

    The situation we encountered involved VBScript accessing a DAO-like object:

    Something = rs.Fields("something")

    where rs.Fields is a method returning an IEnumerable object (a "Fields" object). The object returned by the Fields object (the "Field" object) has a default property as so:

    [DispId(0)]
    public object Value
    {
    get { .... }
    set { .... }
    }

    The enumeration is working fine, but the default property would not be identified as such. The VBScript engine was actually looking for "[DISPID=0]", but ClearScript wasn't checking the DispId attribute. The attached patch adds support to check for the DispId attribute.

    The attached patch fixes the getting; setting unfortunately still doesn't work with this fix, but we worked around that in our application. (If you have any idea how to fix it in ClearScript as well though, I'm sure that would be useful!)

    Hope this is useful, and that my fix is correct!

    Thanks, Owen.
    Comments: Thanks, Owen! We'll take a look at your patch.

    0 0

    Hello,

    I've added an implementation for IActiveScriptSiteWindow to the WindowsScriptEngine.ScriptSite class which allows the user to provide a window handle for parenting dialogs. The code can be found at:

    https://lr-senergy.kilnhg.com/Code/ODM-OpenSource/Group/ClearScript

    or in the attached patch.

    Currently EnableModeless is not implemented - this could be made to fire an event in the WindowsScriptEngine class, perhaps.

    If it's possible to merge this (or a version of it) into the official codebase, that would be great.

    Thanks, Owen

    0 0

    Hello,

    I've added an implementation for IActiveScriptSiteWindow to the WindowsScriptEngine.ScriptSite class which allows the user to provide a window handle for parenting dialogs. The code can be found at:

    https://lr-senergy.kilnhg.com/Code/ODM-OpenSource/Group/ClearScript

    or in the attached patch.

    Currently EnableModeless is not implemented - this could be made to fire an event in the WindowsScriptEngine class, perhaps.

    If it's possible to merge this (or a version of it) into the official codebase, that would be great.

    Thanks, Owen
    Comments: Thanks, Owen! We'll take a look at this.

    0 0

    Hello!

    Hmm, we can't reproduce any issues setting breakpoints from Eclipse. Here's a sample from Eclipse's debugger network console:
    > Sent to Chrome:
    Content-Length:132
    
    {"seq":7,"type":"request","command":"setbreakpoint","arguments":{"line":19,"column":0,"type":"scriptId","enabled":true,"target":58}}
    > end of message
    
    > Received from Chrome:
    Content-Length:247
    
    {"seq":7,"request_seq":7,"type":"response","command":"setbreakpoint","success":true,"body":{"type":"scriptId","breakpoint":1,"script_id":58,"line":19,"column":0,"actual_locations":[{"line":19,"column":36,"script_id":58}]},"refs":[],"running":true}
    > end of message
    ClearScript 5.4.1 is paired with a much newer V8 version (3.30 vs. 3.26. The removal of V8's built-in debug agent is the main reason why ClearScript was stuck using a relatively old version for a while. So while the protocol may have changed, perhaps inadvertently, it's more likely that there's some subtle difference between Eclipse's requests and yours.

    Can you verify that the requests you're sending are well-formed and have correct content length headers?

    0 0

    A couple months ago when I was first looking at clearscript, I tested attaching eclipse to script engine so you can debug scripts. It worked great.

    Now, after putting in some work, I am once again trying to debug and it doesn't want to work!

    This is an asp.net project, so it does make it tricker, but I had no problems initially.

    Scripting is working, I just cannot attach eclipse.

    Here is the error I get while visual studio is attached to my asp.net process when I try to attach eclipse.
    The assembly with display name 'ClearScript' failed to load in the 'Anonymous' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'ClearScript, Version=5.4.1.0, Culture=neutral, PublicKeyToken=935d0c957da47c73' or one of its dependencies. The system cannot find the file specified.
    There is a hintpath in my .csproj which is correct. The dll is where it should be, and clearscript is working properly. Any ideas??

    EDIT: using nuget clearscript V5.4.1 and VS2013

    0 0

    Hello!

    What version of Eclipse are you using, and how exactly are you attaching it? Also, can you continue through that exception? If not, can you post a first-chance stack?

    Thanks!

    0 0

    I followed this guide.

    https://pandeysk.wordpress.com/2014/05/25/debugging-with-clearscript/

    Eclipse Version: Luna Service Release 1a (4.4.1)

    As soon as I hit that exception, the w3wp process crashes and my attached VS debugger detaches. Hitting continue just detaches the VS debugger and prompts eclipse to pop up the error
    An internal error occurred during: "Launching DevDebug".
    java.lang.Exception: Failure: Connection closed
    The VS error that I am having trouble reproducing presents itself as an MDA ("managed debugging assistant") error. There is no stacktrace to view.

    I created a brand new asp.net project.
    Install-Package ClearScript.v8.
    Remove post build events.
    Add native dlls to root of project from packages/clearscript/tools.
    Add script engine to default form with debugging enabled.
    Run the project locally, attach with eclipse, eclipse errors and the asp.net project crashes.

    0 0

    This issue has to do with the DispatchDebugMessages path, which attempts to invoke a managed method on a C++ Concurrency Runtime worker thread.

    That seems to work in desktop applications, but it throws a CLR-internal C++ exception in ASP.NET. The unhandled exception triggers fail-fast handling in the task infrastructure.

    A potential fix might be to schedule debug message dispatch on the managed side, ensuring that the worker thread is safe for invoking managed code.

    0 0

    Hi again,

    We've reproduced this issue and are tracking it here. This is a new bug in ClearScript 5.4.1 that apparently affects ASP.NET environments only. Unfortunately there is currently no workaround.

    Thanks for reporting this issue!

    0 0

    Hi again,

    Is your project by any chance an ASP.NET web application? If so, you might be encountering this issue.

    Thanks!

    0 0

    Hi,

    Is ClearScript supported on MS store apps? Also did anyone try testing it on Windows 10?

    Please share any observation if you have. Thanks in advance.

    regards
    Satyendra Pandey

    0 0

    Hello!

    I recently updated from ClearScript 5.4.0 to 5.4.1 and started receiving an AccessViolationException every time I create a v8Runtime instance witih V8RuntimeConstraints defined as follows:
     V8RuntimeConstraints v8RuntimeConstraints = new V8RuntimeConstraints
     {
            MaxExecutableSize = 24 * 1024 * 1024,
            MaxOldSpaceSize = 24 * 1024 * 1024,
            MaxNewSpaceSize = 24 * 1024 * 1024
     };
    
    V8Runtime v8Runtime = new V8Runtime(v8RuntimeConstraints);
    The exception did not come before the update. Do any of you know what could be wrong?

    0 0

    Greetings!

    Unfortunately ClearScript cannot be used in Store apps. That's because it targets the .NET Framework, whereas Store apps must target the more restricted .NET Core profile. Furthermore, Store apps cannot use mixed-mode assemblies such as ClearScript's V8 interface.

    We haven't tested ClearScript on Windows 10 yet, but in theory it should work.

    Thanks!

older | 1 | .... | 66 | 67 | (Page 68) | 69 | 70 | .... | 115 | newer