Skip to content

Added fallback to fake worker if serialization of typed array fails. #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 28, 2011
Merged

Added fallback to fake worker if serialization of typed array fails. #983

merged 5 commits into from
Dec 28, 2011

Conversation

merkste
Copy link
Contributor

@merkste merkste commented Dec 28, 2011

This happens e.g. in Opera 11.60. Now PDF.js works again in Opera.

@notmasteryet
Copy link
Contributor

@merkste could you just extend the catch above (https://github.com/mozilla/pdf.js/blob/master/src/core.js#L585) to after the messageHandler.send line? Keep your comment - it will help to not remove the catch later.

@merkste
Copy link
Contributor Author

merkste commented Dec 28, 2011

@notmasteryet I've just finished a small refactoring of the section in question. What do you think?

@notmasteryet
Copy link
Contributor

@pdfjsbot test

@pdfjsbot
Copy link

Processing command test by user notmasteryet. Queue size: 0

Live script output is available (after queueing is done) at: http://184.73.87.52:8989/3291494.txt

[bot:processed:3291494]

@pdfjsbot
Copy link

ERROR(s) found

Output:

========== Killing any stray processes

========== Running garbage collector in /home/ubuntu/pdf.js-bot/tmp
Collecting garbage...

========== Cloning pull request repo
Cloning into ....

========== Merging upstream into pull request clone

========== Running 'make lint'
gjslint --nojsdoc  src/canvas.js src/charsets.js src/cidmaps.js src/colorspace.js src/core.js src/crypto.js src/evaluator.js src/fonts.js src/function.js src/glyphlist.js src/image.js src/metrics.js src/obj.js src/parser.js src/pattern.js src/pdf.js src/stream.js src/util.js src/worker.js src/worker_loader.js  web/compatibility.js web/viewer.js test/driver.js examples/helloworld/hello.js extensions/firefox/bootstrap.js extensions/firefox/components/pdfContentHandler.js 
----- FILE  :  /home/ubuntu/pdf.js-bot/tmp/tests/9fcd303519e6d04e5e1cd637da2989f32272337c/src/core.js -----
Line 586, E:0001: Extra space at end of line
Line 601, E:0110: Line too long (88 characters).

Found 2 errors, including 0 new errors, in 1 files (25 files OK).
�
Some of the errors reported by GJsLint may be auto-fixable using the script
fixjsstyle. Please double check any changes it makes and report any bugs. The
script can be run by executing:

fixjsstyle --nojsdoc src/canvas.js src/charsets.js src/cidmaps.js src/colorspace.js src/core.js src/crypto.js src/evaluator.js src/fonts.js src/function.js src/glyphlist.js src/image.js src/metrics.js src/obj.js src/parser.js src/pattern.js src/pdf.js src/stream.js src/util.js src/worker.js src/worker_loader.js web/compatibility.js web/viewer.js test/driver.js examples/helloworld/hello.js extensions/firefox/bootstrap.js extensions/firefox/components/pdfContentHandler.js 
make: *** [lint] Error 1

========== Cloning reference images repo into test/ref/
Initialized empty Git repository in /home/ubuntu/pdf.js-bot/tmp/tests/9fcd303519e6d04e5e1cd637da2989f32272337c/test/ref/.git/

========== Checking for consistency with reference repo

========== Running 'make bot_test'
Xvfb: no process found
cd test; \
    python -u test.py \
    --browserManifestFile=resources/browser_manifests/browser_manifest.json \
    --manifestFile=test_manifest.json
Launching firefox
Launching chrome
TEST-PASS | eq test tracemonkey-eq | in chrome
TEST-PASS | eq test tracemonkey-eq | in firefox
TEST-PASS | forward-back-forward test tracemonkey-fbf | in chrome
TEST-PASS | load test html5-canvas-cheat-sheet-load | in chrome
TEST-PASS | forward-back-forward test tracemonkey-fbf | in firefox
TEST-PASS | load test html5-canvas-cheat-sheet-load | in firefox
TEST-PASS | load test intelisa-load | in chrome
TEST-PASS | load test intelisa-load | in firefox
TEST-PASS | load test pdfspec-load | in chrome
TEST-PASS | load test shavian-load | in chrome
TEST-PASS | eq test sizes | in chrome
TEST-PASS | eq test plusminus | in chrome
TEST-PASS | load test openoffice-pdf | in chrome
TEST-PASS | load test openofficecidtruetype-pdf | in chrome
TEST-PASS | load test openofficearabiccidtruetype-pdf | in chrome
TEST-PASS | load test arabiccidtruetype-pdf | in chrome
TEST-PASS | load test complexttffont-pdf | in chrome
TEST-PASS | eq test thuluthfont-pdf | in chrome
TEST-PASS | eq test freeculture | in chrome
TEST-PASS | eq test wnv_chinese-pdf | in chrome
TEST-PASS | eq test i9-pdf | in chrome
TEST-PASS | load test hmm-pdf | in chrome
TEST-PASS | eq test rotation | in chrome
TEST-PASS | load test ecma262-pdf | in chrome
TEST-PASS | load test jai-pdf | in chrome
TEST-PASS | eq test cable | in chrome
TEST-PASS | eq test pdkids | in chrome
TEST-PASS | eq test artofwar | in chrome
TEST-PASS | eq test wdsg_fitc | in chrome
TEST-PASS | eq test unix01 | in chrome
TEST-PASS | eq test fit11-talk | in chrome
TEST-PASS | eq test fips197 | in chrome
TEST-PASS | load test txt2pdf | in chrome
TEST-PASS | load test f1040 | in chrome
TEST-PASS | load test hudsonsurvey | in chrome
TEST-PASS | eq test extgstate | in chrome
TEST-PASS | eq test usmanm-bad | in chrome
TEST-PASS | load test vesta-bad | in chrome
TEST-PASS | load test scan-bad | in chrome
TEST-PASS | load test ibwa-bad | in chrome
TEST-PASS | eq test tcpdf_033 | in chrome
TEST-PASS | eq test pal-o47 | in chrome
TEST-PASS | eq test simpletype3font | in chrome
TEST-PASS | eq test close-path-bug | in chrome
TEST-PASS | eq test alphatrans | in chrome
TEST-PASS | eq test devicen | in chrome
TEST-PASS | eq test cmykjpeg | in chrome
TEST-PASS | eq test protectip | in chrome
TEST-PASS | eq test piperine | in chrome
TEST-PASS | eq test issue840 | in chrome
TEST-PASS | eq test bpl13210 | in chrome
TEST-PASS | load test pdfspec-load | in firefox
TEST-PASS | load test shavian-load | in firefox
TEST-PASS | eq test sizes | in firefox
TEST-PASS | eq test plusminus | in firefox
TEST-PASS | load test openoffice-pdf | in firefox
TEST-PASS | load test openofficecidtruetype-pdf | in firefox
TEST-PASS | load test openofficearabiccidtruetype-pdf | in firefox
TEST-PASS | load test arabiccidtruetype-pdf | in firefox
TEST-PASS | load test complexttffont-pdf | in firefox
TEST-PASS | eq test thuluthfont-pdf | in firefox
TEST-PASS | eq test tutorial | in chrome
TEST-PASS | eq test geothermal.pdf | in chrome
TEST-PASS | eq test lista_preliminar | in chrome
TEST-PASS | eq test freeculture | in firefox
TEST-PASS | eq test issue919 | in chrome
TEST-PASS | eq test issue918 | in chrome
TEST-PASS | eq test wnv_chinese-pdf | in firefox
TEST-PASS | eq test aboutstacks | in chrome
TEST-PASS | eq test smaskdim | in chrome
TEST-PASS | eq test i9-pdf | in firefox
TEST-PASS | load test hmm-pdf | in firefox
TEST-PASS | eq test rotation | in firefox
TEST-PASS | load test ecma262-pdf | in firefox
TEST-PASS | load test jai-pdf | in firefox
TEST-PASS | eq test cable | in firefox
TEST-PASS | eq test pdkids | in firefox
TEST-PASS | eq test artofwar | in firefox
TEST-PASS | eq test wdsg_fitc | in firefox
TEST-PASS | eq test unix01 | in firefox
TEST-PASS | eq test fit11-talk | in firefox
TEST-PASS | eq test fips197 | in firefox
TEST-PASS | load test txt2pdf | in firefox
TEST-PASS | load test f1040 | in firefox
TEST-PASS | load test hudsonsurvey | in firefox
TEST-PASS | eq test extgstate | in firefox
TEST-PASS | eq test usmanm-bad | in firefox
TEST-PASS | load test vesta-bad | in firefox
TEST-PASS | load test scan-bad | in firefox
TEST-PASS | load test ibwa-bad | in firefox
TEST-PASS | eq test tcpdf_033 | in firefox
TEST-PASS | eq test pal-o47 | in firefox
TEST-PASS | eq test simpletype3font | in firefox
TEST-PASS | eq test close-path-bug | in firefox
TEST-PASS | eq test alphatrans | in firefox
TEST-PASS | eq test devicen | in firefox
TEST-PASS | eq test cmykjpeg | in firefox
TEST-PASS | eq test protectip | in firefox
TEST-PASS | eq test piperine | in firefox
TEST-PASS | eq test issue840 | in firefox
TEST-PASS | eq test bpl13210 | in firefox
TEST-PASS | eq test tutorial | in firefox
TEST-PASS | eq test geothermal.pdf | in firefox
TEST-PASS | eq test lista_preliminar | in firefox
TEST-PASS | eq test issue919 | in firefox
TEST-PASS | eq test issue918 | in firefox
TEST-PASS | eq test aboutstacks | in firefox
TEST-PASS | eq test smaskdim | in firefox

All tests passed.
Process firefox is still running. Killing.
Runtime was 2155 seconds
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 505, in run
  File "/usr/lib/python2.7/SocketServer.py", line 230, in serve_forever
  File "/usr/lib/python2.7/threading.py", line 389, in set
  File "/usr/lib/python2.7/threading.py", line 296, in notifyAll
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

========== Cleaning up
./run-test: line 206:  2680 Killed                  Xvfb :1 -screen 0 1280x1024x24 > /dev/null 2> /dev/null

All done.


_____________________________ stderr:

Bot response time: 37.03 mins

@merkste
Copy link
Contributor Author

merkste commented Dec 28, 2011

Is the killed FF process a serious error?

@notmasteryet
Copy link
Contributor

Is the killed FF process a serious error?

No, it's not

@pdfjsbot test

@pdfjsbot
Copy link

Processing command test by user notmasteryet. Queue size: 0

Live script output is available (after queueing is done) at: http://184.73.87.52:8989/3292802.txt

[bot:processed:3292802]

@pdfjsbot
Copy link

ERROR(s) found

ATTENTION: There was a snapshot difference:
http://184.73.87.52:8989/tests/b506bc7f44eca7cc8c31d375d422e9545dc0d2b8/reftest-analyzer.xhtml#web=/tests/b506bc7f44eca7cc8c31d375d422e9545dc0d2b8/eq.log

Output:

========== Killing any stray processes

========== Running garbage collector in /home/ubuntu/pdf.js-bot/tmp
Collecting garbage...

========== Cloning pull request repo
Cloning into ....

========== Merging upstream into pull request clone

========== Running 'make lint'
gjslint --nojsdoc  src/canvas.js src/charsets.js src/cidmaps.js src/colorspace.js src/core.js src/crypto.js src/evaluator.js src/fonts.js src/function.js src/glyphlist.js src/image.js src/metrics.js src/obj.js src/parser.js src/pattern.js src/pdf.js src/stream.js src/util.js src/worker.js src/worker_loader.js  web/compatibility.js web/viewer.js test/driver.js examples/helloworld/hello.js extensions/firefox/bootstrap.js extensions/firefox/components/pdfContentHandler.js 
----- FILE  :  /home/ubuntu/pdf.js-bot/tmp/tests/b506bc7f44eca7cc8c31d375d422e9545dc0d2b8/src/core.js -----
Line 601, E:0001: Extra space at end of line

Found 1 errors, including 0 new errors, in 1 files (25 files OK).
�
Some of the errors reported by GJsLint may be auto-fixable using the script
fixjsstyle. Please double check any changes it makes and report any bugs. The
script can be run by executing:

fixjsstyle --nojsdoc src/canvas.js src/charsets.js src/cidmaps.js src/colorspace.js src/core.js src/crypto.js src/evaluator.js src/fonts.js src/function.js src/glyphlist.js src/image.js src/metrics.js src/obj.js src/parser.js src/pattern.js src/pdf.js src/stream.js src/util.js src/worker.js src/worker_loader.js web/compatibility.js web/viewer.js test/driver.js examples/helloworld/hello.js extensions/firefox/bootstrap.js extensions/firefox/components/pdfContentHandler.js 
make: *** [lint] Error 1

========== Cloning reference images repo into test/ref/
Initialized empty Git repository in /home/ubuntu/pdf.js-bot/tmp/tests/b506bc7f44eca7cc8c31d375d422e9545dc0d2b8/test/ref/.git/

========== Checking for consistency with reference repo

========== Running 'make bot_test'
Xvfb: no process found
cd test; \
    python -u test.py \
    --browserManifestFile=resources/browser_manifests/browser_manifest.json \
    --manifestFile=test_manifest.json
Launching firefox
Launching chrome
TEST-PASS | eq test tracemonkey-eq | in chrome
TEST-PASS | eq test tracemonkey-eq | in firefox
TEST-PASS | forward-back-forward test tracemonkey-fbf | in chrome
TEST-PASS | load test html5-canvas-cheat-sheet-load | in chrome
TEST-PASS | forward-back-forward test tracemonkey-fbf | in firefox
TEST-PASS | load test html5-canvas-cheat-sheet-load | in firefox
TEST-PASS | load test intelisa-load | in chrome
TEST-PASS | load test intelisa-load | in firefox
TEST-PASS | load test pdfspec-load | in chrome
TEST-PASS | load test shavian-load | in chrome
TEST-PASS | eq test sizes | in chrome
TEST-PASS | eq test plusminus | in chrome
TEST-PASS | load test openoffice-pdf | in chrome
TEST-PASS | load test openofficecidtruetype-pdf | in chrome
TEST-PASS | load test openofficearabiccidtruetype-pdf | in chrome
TEST-PASS | load test arabiccidtruetype-pdf | in chrome
TEST-PASS | load test complexttffont-pdf | in chrome
TEST-PASS | eq test thuluthfont-pdf | in chrome
TEST-PASS | eq test freeculture | in chrome
TEST-PASS | eq test wnv_chinese-pdf | in chrome
TEST-PASS | eq test i9-pdf | in chrome
TEST-PASS | load test hmm-pdf | in chrome
TEST-PASS | eq test rotation | in chrome
TEST-PASS | load test ecma262-pdf | in chrome
TEST-PASS | load test jai-pdf | in chrome
TEST-PASS | eq test cable | in chrome
TEST-PASS | eq test pdkids | in chrome
TEST-PASS | eq test artofwar | in chrome
TEST-PASS | eq test wdsg_fitc | in chrome
TEST-PASS | eq test unix01 | in chrome
TEST-PASS | eq test fit11-talk | in chrome
TEST-PASS | eq test fips197 | in chrome
TEST-PASS | load test txt2pdf | in chrome
TEST-PASS | load test f1040 | in chrome
TEST-PASS | load test hudsonsurvey | in chrome
TEST-PASS | eq test extgstate | in chrome
TEST-PASS | eq test usmanm-bad | in chrome
TEST-PASS | load test vesta-bad | in chrome
TEST-PASS | load test scan-bad | in chrome
TEST-PASS | load test ibwa-bad | in chrome
TEST-PASS | eq test tcpdf_033 | in chrome
TEST-UNEXPECTED-FAIL | eq pal-o47 | in chrome | rendering of page 1 != reference rendering
TEST-PASS | eq test simpletype3font | in chrome
TEST-PASS | eq test close-path-bug | in chrome
TEST-PASS | eq test alphatrans | in chrome
TEST-PASS | eq test devicen | in chrome
TEST-PASS | eq test cmykjpeg | in chrome
TEST-PASS | eq test protectip | in chrome
TEST-PASS | eq test piperine | in chrome
TEST-PASS | eq test issue840 | in chrome
TEST-PASS | eq test bpl13210 | in chrome
TEST-PASS | eq test tutorial | in chrome
TEST-PASS | eq test geothermal.pdf | in chrome
TEST-PASS | eq test lista_preliminar | in chrome
TEST-PASS | eq test issue919 | in chrome
TEST-PASS | load test pdfspec-load | in firefox
TEST-PASS | eq test issue918 | in chrome
TEST-PASS | eq test aboutstacks | in chrome
TEST-PASS | load test shavian-load | in firefox
TEST-PASS | eq test smaskdim | in chrome
TEST-PASS | eq test sizes | in firefox
TEST-PASS | eq test plusminus | in firefox
TEST-PASS | load test openoffice-pdf | in firefox
TEST-PASS | load test openofficecidtruetype-pdf | in firefox
TEST-PASS | load test openofficearabiccidtruetype-pdf | in firefox
TEST-PASS | load test arabiccidtruetype-pdf | in firefox
TEST-PASS | load test complexttffont-pdf | in firefox
TEST-PASS | eq test thuluthfont-pdf | in firefox
TEST-PASS | eq test freeculture | in firefox
TEST-PASS | eq test wnv_chinese-pdf | in firefox
TEST-PASS | eq test i9-pdf | in firefox
TEST-PASS | load test hmm-pdf | in firefox
TEST-PASS | eq test rotation | in firefox
TEST-PASS | load test ecma262-pdf | in firefox
TEST-PASS | load test jai-pdf | in firefox
TEST-PASS | eq test cable | in firefox
TEST-PASS | eq test pdkids | in firefox
TEST-PASS | eq test artofwar | in firefox
TEST-PASS | eq test wdsg_fitc | in firefox
TEST-PASS | eq test unix01 | in firefox
TEST-PASS | eq test fit11-talk | in firefox
TEST-PASS | eq test fips197 | in firefox
TEST-PASS | load test txt2pdf | in firefox
TEST-PASS | load test f1040 | in firefox
TEST-PASS | load test hudsonsurvey | in firefox
TEST-PASS | eq test extgstate | in firefox
TEST-PASS | eq test usmanm-bad | in firefox
TEST-PASS | load test vesta-bad | in firefox
TEST-PASS | load test scan-bad | in firefox
TEST-PASS | load test ibwa-bad | in firefox
TEST-PASS | eq test tcpdf_033 | in firefox
TEST-PASS | eq test pal-o47 | in firefox
TEST-PASS | eq test simpletype3font | in firefox
TEST-PASS | eq test close-path-bug | in firefox
TEST-PASS | eq test alphatrans | in firefox
TEST-PASS | eq test devicen | in firefox
TEST-PASS | eq test cmykjpeg | in firefox
TEST-PASS | eq test protectip | in firefox
TEST-PASS | eq test piperine | in firefox
TEST-PASS | eq test issue840 | in firefox
TEST-PASS | eq test bpl13210 | in firefox
TEST-PASS | eq test tutorial | in firefox
TEST-PASS | eq test geothermal.pdf | in firefox
TEST-PASS | eq test lista_preliminar | in firefox
TEST-PASS | eq test issue919 | in firefox
TEST-PASS | eq test issue918 | in firefox
TEST-PASS | eq test aboutstacks | in firefox
TEST-PASS | eq test smaskdim | in firefox

OHNOES!  Some tests failed!
  different ref/snapshot: 1
Process firefox is still running. Killing.
Runtime was 2125 seconds

========== Cleaning up
./run-test: line 204:  2948 Killed                  Xvfb :1 -screen 0 1280x1024x24 > /dev/null 2> /dev/null

All done.


_____________________________ stderr:

Bot response time: 36.51 mins

@merkste
Copy link
Contributor Author

merkste commented Dec 28, 2011

Hopefully, no other space chars turn up here ... =)

notmasteryet added a commit that referenced this pull request Dec 28, 2011
Added fallback to fake worker if serialization of typed array fails.
@notmasteryet notmasteryet merged commit d6e1c8f into mozilla:master Dec 28, 2011
@notmasteryet
Copy link
Contributor

Thanks for the patch.

@merkste
Copy link
Contributor Author

merkste commented Dec 29, 2011

You're welcome. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants