Code Monkey home page Code Monkey logo

ti.worker's Issues

Stuck during JS processing

I found a problem after repeating my background process several times during a normal use. (The user click on a ListView, the bg process starts/ends, a new window is open)

The module gets stuck right after

[_bridge evalJSWithoutResult:@"TiWorkerStart__();"]; in the booted method:

- (void)booted:(id)bridge
{
  // this callback is called when the thread is up and running
  dispatch_async(_serialQueue, ^{
    _booted = YES;
    NSLog(@"[INFO] Worker %@ (0x%X) is running", [_selfProxy url], self);
    [_selfProxy setExecutionContext:_bridge];
    [[NSFileManager defaultManager] removeItemAtPath:_tempFile error:nil];
  });

  // start our JS processing
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
      [_bridge evalJSWithoutResult:@"TiWorkerStart__();"]; // STUCK HERE
  });
}

usually the postMessage method is what happens after, but not in some cases.

Ti.API.info Not Exposed

I am unable to log to the console within the worker file. Ti.API.info throws a parse error.

Crash

I am getting a crash on the following code when posting data back from the worker.

-(void)postMessage:(id)msg
{
    ENSURE_SINGLE_ARG(msg,NSObject); 
    // this is from the worker, posting back to the creator
    NSDictionary *dict = [NSDictionary dictionaryWithObject:msg forKey:@"data"];
    TiWorkerProxy *proxy = (TiWorkerProxy*)_parent;
    [proxy fireMessageEvent:dict];
}

Is there a limit to the size of data that can be sent back?

ios 6 crush

works fine on ios<6

on 6 - SDK 2.1.3
KrollBridge.mm line 598

[self evalFile:[url path] callback:self selector:@selector(booted)];

url is nil: (supposed ti be the wrapped javascript) ...

Debug Info Incorrect/Obfuscated

When there is a syntax error in the worker file, the debug message in the console provides an incorrect/obfuscated source file.

Eg:
sourceURL = "file://localhost/var/folders/jb/b8vsmqzx00ng22t1383j_qfr0000gn/T/5694";

Needed to run on background IOS

I have a problem with large database sincronization beacouse it's blocking user interface on iOs phones.
So it is posibble to add background task support to iOS so the database operations dont block the UI.

Android equivalent

Just wondering if there was an android equivalent to this module.

Many thanks.

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.