Skip to content

Stuck during JS processing #20

@dr0-dev

Description

@dr0-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions