Skip to content
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

Sometimes, some CSS can not be loaded, due to "out of memory" errors, at least in a browser extension #365

Closed
mossroy opened this issue May 4, 2018 · 4 comments
Milestone

Comments

@mossroy
Copy link
Contributor

mossroy commented May 4, 2018

At least on Firefox 52 ESR, as a browser extension, some CSS fail to load with following error in the console : could not find DirEntry for CSS : -/s/css_modules/inserted_style_mobile.css out of memory.
Stacktrace :

13:48:18,961 could not find DirEntry for CSS : -/s/css_modules/inserted_style_mobile.css out of memory 1 app.js:971:33
	loadCSSJQuery/</< moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/app.js:971:33
	_rejected moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:804:24
	Promise.prototype.then/</< moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:830:30
	reject/rejection<.when moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:1064:31
	Promise/promise.promiseDispatch moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:748:26
	become/</< moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:564:17
	flush moz-extension://9b084d9a-6efc-493d-a669-38bcd831a085/www/js/lib/q.js:110:17

I had that on Firefox 52 ESR, using wikivoyage_en_all_novid_2018-03.zim, on the main page. Sometimes it's a different CSS.

I have to test more to better understand in which circumstances this happens

@Jaifroid
Copy link
Member

Jaifroid commented May 4, 2018

I wonder if this is a problem I encountered with too many .svg images being sent at once for decompression hanging xzdec.js. As xdec.js errors are swallowed by Q it can be hard to tell where they're coming from. CSS are like SVG in that they are plain text and highly compressed. On low-memory devices, @kelson42 and I discovered (vis-à-vis his test Windows Mobile device) that we had to send the svg images one by one to the decompressor. Even sending them in batches of two or three could hang a low-memory device.

@mossroy
Copy link
Contributor Author

mossroy commented May 6, 2018

It looks like a real weakness of our current decompressor. I'd really like to avoid queuing the decompressions.
I should test that with the WebAssembly version and/or the newly re-compiled version of xzdec (#219).
I'll try to investigate when I find some time.

@mossroy
Copy link
Contributor Author

mossroy commented May 9, 2018

I don't manage to reproduce this issue any more. I suppose it only happens in specific circumstances.
I did not reproduce it on the same Firefox 52.7.3 ESR 32bit (on Windows 8.1), on Firefox 59 64bit (on Linux) or on Firefox 52.8 ESR 64bit (on Windows 10). Each time with the same wikivoyage_en_all_novid_2018-03.zim.
Strange.

Jaifroid added a commit that referenced this issue May 21, 2018
Also reverts to innerHTML method of injecting the iframe due to incompatibilities of document.write() with Service Worker mode in some browsers. Fixes #361 , #366 , possibly #365.
Jaifroid added a commit that referenced this issue May 21, 2018
Also reverts to innerHTML method of injecting the iframe due to incompatibilities of document.write() with Service Worker mode in some browsers. Fixes #361 , #366 , possibly #365.
@mossroy
Copy link
Contributor Author

mossroy commented May 25, 2018

I still don't reproduce, so close this issue for now

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

No branches or pull requests

2 participants