New issue
Advanced search Search tips
Starred by 6 users

Issue metadata

Status: IceBox
Owner:
Closed: Aug 2012
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Restricted
  • Only users with Commit permission may comment.



Sign in to add a comment
link

Issue 50360: Web Worker: postMessage() fails for big arguments (not always)

Reported by to.s...@gmail.com, Jul 27 2010

Issue description

Chrome Version       : 
Google Chrome	5.0.375.125 (Official Build 53311) beta
WebKit	533.4
V8	2.1.10.15
User Agent	Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.125 Safari/533.4
Command Line	 /opt/google/chrome/google-chrome

URLs (if applicable) : see attachments
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 4: -
  Firefox 3.x: OK
         IE 7: -
         IE 8: -
Chromium 6.0.475.0 (Developer Build 53429): FAIL

What steps will reproduce the problem?
1. Open the attached file 'index.html'.
2. Click the button "Start".
3. A web worker will be started, which loads the file 'points-5000.json' in a XMLHttpRequest and sends the content back to the main script. Then a new web worker is started which does the same, and so on.

What is the expected result?
No error message message should appear and the script should run as long as the user does not cancel it.

What happens instead?
After 12 or 13 started web workers, the following error message is thrown, when the file content is sent to the main script using postMessage():

1
2
3
4
5
6
7
8
9
10
11
12
13
Uncaught SyntaxError: Not enough arguments

Please provide any additional information below. Attach a screenshot if
possible.
The file 'points-5000.json' has the size 682,8 KB. If I use a file that is approx. twice as big, the error is thrown after 6 or 7 started web workers, exactly the half.
 
points-5000.json
682 KB View Download
index.html
971 bytes View Download
webworker.js
314 bytes View Download

Comment 1 by to.s...@gmail.com, Jul 28 2010

I made further tests. The problem is not the parameter size, it seems to be related to using XMLHttpRequest in a web worker.

Take a look at 'index_reverse.html' and 'webworker_reverse.html'. In 'index_reverse.html' I am now loading the file using a XMLHttpRequest. Then I pass the response text to the web worker and from there pass it back to the main script. And that works! And not only 13 times.
index_reverse.html
1.6 KB View Download
webworker_reverse.js
74 bytes View Download

Comment 2 by ithk...@gmail.com, Nov 1 2010

I had the same problem, XMLHttpRequest, many web workers. I tried several things.  Pretty sure the one that worked was to call worker.terminate() in the onmessage.  I already had close() calls in the workers.  I created pseudo-guids and put passed them to the workers to id them so I would know which was done so I could terminate it in onmessage.

Comment 3 by jeffschiller@google.com, Mar 27 2011

This also hobbles kthoom to a single-threaded web app: http://code.google.com/p/kthoom/issues/detail?id=12#c1

Comment 4 by levin@chromium.org, Jun 14 2011

Labels: -Area-Undefined Area-WebKit Feature-Workers
Owner: levin@chromium.org

Comment 5 by i...@staypositive.ru, Jun 30 2011

Same error when using worker for reading files. The only funny thing is this:

readerWorker.postMessage(theFile);
console.log(readerWorker);

when using this, everything goes ok, but when i drop console.log(), exception is thrown after 5 or more calls.

Comment 6 by i...@staypositive.ru, Jun 30 2011

Btw, sometimes the app crashes after these exceptions.

Comment 7 by bugdroid1@chromium.org, Aug 10 2012

Project Member
Status: IceBox
Closing old bug as obsolete. Please file a new bug (with details) if this problem is still occurring for you.

Comment 8 by bugdroid1@chromium.org, Oct 13 2012

Project Member
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.

Comment 9 by bugdroid1@chromium.org, Mar 11 2013

Project Member
Labels: -Area-WebKit Cr-Content

Comment 10 by bugdroid1@chromium.org, Apr 6 2013

Project Member
Labels: -Cr-Content Cr-Blink

Sign in to add a comment