Navigation

    VisionAppster.com

    VisionAppster Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. ms
    3. Posts
    M
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by ms

    • RE: Initializing after restart

      @mt Thanks.

      posted in Engine
      M
      ms
    • Initializing after restart

      Hi,
      I would like to reinitialize RemoteObject after my app running in the engine has been restarted. For some reason sending image fails if app is restarted.

      Here's how to reproduce:

      1. Start testapp at the http://localhost:2015/
      2. Start test.js (see below)
      3. Success.
      4. Stop testapp after few seconds
      5. Start testapp after few seconds
      6. Failed.
      async function test() {
          try {
              const va = typeof window === "object" ?
              VisionAppster :           // Browser
              require("visionappster"); // Node.js
              const inputs = [
              await va.Image.fromUrl('image.jpg')
              ];
              const ctrl = new va.RemoteObject("http://localhost:2015/apis/com.myapps.testapp/1");
              const api = await ctrl.connect();
              await api.sendImage.async(...inputs);
              console.log('Success.');
          }
          catch {
              console.error("Failed.");
          }
      }
      
      setInterval(test, 2000);
      

      node.js v12.18.3
      npm visionappster 0.0.10
      VisionAppster 3.0-beta4.1

      posted in Engine
      M
      ms
    • RE: JavaScript tool on Builder

      Thanks. This was helpful.

      posted in Builder
      M
      ms
    • Detect Edges tool crashes builder

      Input image size of 5x2 pixels to Detect Edges tool causes va-builder crash.

      posted in Builder
      M
      ms
    • Concurrent compound function calls

      Sorry to bother you again. I remade my app into a compound function and noticed this thing while testing (might be that it's caused by same problem as in "Function calls and signals".

      If I have 2 clients, which will make concurrent calls to same compound function, callbacks will be mixed up together. After that, if I close those 2 clients and start a new client, it will also have mix up with calls and callbacks. To recover from this, I need to restart VisionAppster Application Engine

      Client A

      [20190902 08:29:11:442] Compound called. AAAAAAA (1).png
      [20190902 08:29:11:461] Compound Success received. AAAAAAA (1).png mean: 148.5622833191248
      [20190902 08:29:11:526] Compound called. AAAAAAA (10).png
      [20190902 08:29:11:548] Compound Success received. AAAAAAA (10).png mean: 123.31437020460359
      [20190902 08:29:11:611] Compound called. AAAAAAA (100).png
      [20190902 08:29:11:622] Compound Success received. AAAAAAA (100).png mean: 148.43253587666956
      [20190902 08:29:11:688] Compound called. AAAAAAA (101).png
      [20190902 08:29:11:698] Compound Success received. AAAAAAA (101).png mean: 135.24249786871266
      [20190902 08:29:11:762] Compound called. AAAAAAA (102).png
      [20190902 08:29:11:781] Compound Success received. AAAAAAA (102).png mean: 135.23190004262568
      [20190902 08:29:11:840] Compound called. AAAAAAA (103).png
      [20190902 08:29:11:851] Compound Success received. AAAAAAA (103).png mean: 147.86188547882915
      [20190902 08:29:11:915] Compound called. AAAAAAA (104).png
      [20190902 08:29:11:928] Compound Success received. AAAAAAA (104).png mean: 148.55522342995167
      [20190902 08:29:11:991] Compound called. AAAAAAA (105).png
      [20190902 08:29:12:003] Compound Success received. AAAAAAA (105).png mean: 124.63748934356347
      [20190902 08:29:12:066] Compound called. AAAAAAA (106).png
      [20190902 08:29:12:160] Compound Success with wrong handle. original AAAAAAA (106).png != received BBBBBBB (10).png mean: 123.31437020460359
      [20190902 08:29:12:224] Compound called. AAAAAAA (107).png
      [20190902 08:29:12:312] Compound Success with wrong handle. original AAAAAAA (107).png != received BBBBBBB (100).png mean: 148.43253587666956
      [20190902 08:29:12:376] Compound called. AAAAAAA (108).png
      [20190902 08:29:12:466] Compound Success with wrong handle. original AAAAAAA (108).png != received BBBBBBB (101).png mean: 135.24249786871266
      [20190902 08:29:12:530] Compound called. AAAAAAA (109).png
      [20190902 08:29:12:619] Compound Success with wrong handle. original AAAAAAA (109).png != received BBBBBBB (102).png mean: 135.23190004262568
      

      Client B

      [20190902 08:29:12:000] Compound called. BBBBBBB (1).png
      [20190902 08:29:12:077] Compound Success with wrong handle. original BBBBBBB (1).png != received AAAAAAA (106).png mean: 148.5622833191248
      [20190902 08:29:12:142] Compound called. BBBBBBB (10).png
      [20190902 08:29:12:236] Compound Success with wrong handle. original BBBBBBB (10).png != received AAAAAAA (107).png mean: 148.40002308894583
      [20190902 08:29:12:300] Compound called. BBBBBBB (100).png
      [20190902 08:29:12:388] Compound Success with wrong handle. original BBBBBBB (100).png != received AAAAAAA (108).png mean: 124.42296106848539
      [20190902 08:29:12:453] Compound called. BBBBBBB (101).png
      [20190902 08:29:12:542] Compound Success with wrong handle. original BBBBBBB (101).png != received AAAAAAA (109).png mean: 124.69786871270249
      [20190902 08:29:12:607] Compound called. BBBBBBB (102).png
      

      Client started after A&B closed:
      (Has 10 second timeout to call next one)

      [20190902 08:33:41:563] Compound called. 114945544.png
      [20190902 08:33:51:560] Compound called. 114945696.png
      [20190902 08:33:51:578] Compound Success with wrong handle. original 114945544.png != received 114945696.png mean: 124.16420502983804
      [20190902 08:34:01:559] Compound called. 114946000.png
      [20190902 08:34:01:570] Compound Success with wrong handle. original 114945696.png != received 114946000.png mean: 123.91249111963626
      [20190902 08:34:11:560] Compound called. 114946152.png
      [20190902 08:34:11:576] Compound Success with wrong handle. original 114946000.png != received 114946152.png mean: 136.205544899119
      [20190902 08:34:21:559] Compound called. 114946456.png
      [20190902 08:34:21:576] Compound Success with wrong handle. original 114946152.png != received 114946456.png mean: 123.72054916169368
      [20190902 08:34:31:560] Compound called. 114946608.png
      [20190902 08:34:31:572] Compound Success with wrong handle. original 114946456.png != received 114946608.png mean: 136.5730658567775
      [20190902 08:34:41:559] Compound called. 114947216.png
      [20190902 08:34:41:574] Compound Success with wrong handle. original 114946608.png != received 114947216.png mean: 123.54674623472579
      [20190902 08:34:51:561] Compound called. 114947976.png
      [20190902 08:34:51:578] Compound Success with wrong handle. original 114947216.png != received 114947976.png mean: 136.3919685990339
      
      posted in Builder
      M
      ms
    • RE: Function calls and signals

      I refactored my example and got same result as above. I hope this narrows down the problem. Also used wireshark to look traffic between test client and engine, but didn't find any problem there (so, most probably my test client script and visionappster.js is working fine).

      Capture2.JPG

      posted in Builder
      M
      ms
    • JavaScript tool on Builder

      Hi,
      I didn't find information how to create Builder data types (e.g. matrices or images).
      Can I find more information somewhere, what there's available in JavaScript tool?
      Is there way to import external scripts or packages?

      posted in Builder
      M
      ms
    • Remote object system documentation

      I noticed that in online documentation (APIs -> Client APIs -> Remote object system -> Callback as function arguments) might have some outdated information.
      I was able to figure out, that app creates api function with signature sum: (a: int, b: int, success: (int) -> void, error: (int) -> void) -> void
      instead of sum: (callback: (int) -> void, a: int, b: int) -> void

      So in that case example would be

      POST /myobject/functions/sum HTTP/1.1
      Host: localhost:2015
      Client-ID: R4Nd0M
      Source-ID: 30
      Content-Type: application/json
      Content-Length: 15
      
      [1,2,314,315]
      
      posted in Installation
      M
      ms
    • RE: Function calls and signals

      My purpose is to send images from one component and receive results elsewhere. To identify the results on the receiving end, I need the handle to be send with the results.

      My test client works fine, if I add a delay between each send.

      Here's output from my test client (without send delay):

      [20190829 11:48:54:499] Calling MyInput. 114945544.png
      [20190829 11:48:54:515] MyInput Success received. 114945544.png
      [20190829 11:48:54:517] Received from MyOutput. handle: 114945544.png mean: 124.68081841432227 sum: 563040
      [20190829 11:48:54:582] Calling MyInput. 114945696.png
      [20190829 11:48:54:598] MyInput Success received. 114945696.png
      [20190829 11:48:54:662] Calling MyInput. 114946000.png
      [20190829 11:48:54:672] MyInput Success received. 114946000.png
      [20190829 11:48:54:737] Calling MyInput. 114946152.png
      [20190829 11:48:54:747] MyInput Success received. 114946152.png
      [20190829 11:48:54:812] Calling MyInput. 114946456.png
      [20190829 11:48:54:829] MyInput Success received. 114946456.png
      [20190829 11:48:54:886] Calling MyInput. 114946608.png
      [20190829 11:48:54:897] MyInput Success received. 114946608.png
      [20190829 11:48:54:962] Calling MyInput. 114947216.png
      [20190829 11:48:54:972] MyInput Success received. 114947216.png
      [20190829 11:48:55:016] Received from MyOutput. handle: 114947216.png mean: 123.54674623472579 sum: 563040
      

      Here's output with 500ms delay between each send:

      [20190829 12:14:12:925] Calling MyInput. 114945544.png
      [20190829 12:14:12:943] MyInput Success received. 114945544.png
      [20190829 12:14:12:945] Received from MyOutput. handle: 114945544.png mean: 124.68081841432227 sum: 563040
      [20190829 12:14:13:535] Calling MyInput. 114945696.png
      [20190829 12:14:13:552] MyInput Success received. 114945696.png
      [20190829 12:14:13:553] Received from MyOutput. handle: 114945696.png mean: 124.16420502983804 sum: 563040
      [20190829 12:14:14:068] Calling MyInput. 114946000.png
      [20190829 12:14:14:079] MyInput Success received. 114946000.png
      [20190829 12:14:14:080] Received from MyOutput. handle: 114946000.png mean: 123.91249111963626 sum: 563040
      [20190829 12:14:14:595] Calling MyInput. 114946152.png
      [20190829 12:14:14:606] MyInput Success received. 114946152.png
      [20190829 12:14:14:607] Received from MyOutput. handle: 114946152.png mean: 136.205544899119 sum: 563040
      [20190829 12:14:15:122] Calling MyInput. 114946456.png
      [20190829 12:14:15:139] MyInput Success received. 114946456.png
      [20190829 12:14:15:140] Received from MyOutput. handle: 114946456.png mean: 123.72054916169368 sum: 563040
      [20190829 12:14:15:701] Calling MyInput. 114946608.png
      [20190829 12:14:15:712] MyInput Success received. 114946608.png
      [20190829 12:14:15:713] Received from MyOutput. handle: 114946608.png mean: 136.5730658567775 sum: 563040
      [20190829 12:14:16:227] Calling MyInput. 114947216.png
      [20190829 12:14:16:237] MyInput Success received. 114947216.png
      [20190829 12:14:16:238] Received from MyOutput. handle: 114947216.png mean: 123.54674623472579 sum: 563040
      
      
      posted in Builder
      M
      ms
    • Function calls and signals

      I created an app as in the image. I'm using npm package visionappster to call a function and then receive a signal when the result is ready. My client script calls the MyInput function to send an image with some string data (handle). Then it will receive result from MyOutput signal.
      If I constantly call MyInput function again soon as it returns (succeeds), I get only some of these calls back from MyOutput signal. I don't get any errors on function call or from signal even when it's missing some results.
      Is there something wrong with my example app or what might be causing this?

      Capture.JPG

      posted in Builder
      M
      ms