Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Memory leak / lack of GC on Android Chrome when using workerize-loader

オープン
#116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
android, javascript, react, webpack

調査の方向性

まず、リンクされた CodeSandbox を Android Chrome で使用してメモリ増加を再現し、その後 /src/components/qreader-zxing.js と /src/workers/zxing.worker.js を調査します。報告されている Android Chrome DevTools のメモリスナップショットと chrome://tracing の観察結果を使用して、この挙動がサンプル、ワーカー通信、ブラウザーのいずれによって引き起こされているのかを特定します。完了には、原因の確認と、明確に実行可能な修正または upstream への報告が必要です。

索引モデルが issue の本文から書いたものです。

説明

Hi,

First of all - thank you for a fantastic library to make web workers usable for more complex things :)

Not sure this is the right place to ask, but would appreciate some advice if anyone have seen similar problems before.

I have a project setup where I am pushing 35 MB/sec (10fps 1280x720) from a webcam feed to a worker set up by workerize-loader to search for QR codes in the image data (using HTML5 canvas).

This seems to work fine most of the time - the worker heap grows quickly according to memory snapshots in Chrome DevTools but is garbage collected frequently enough for Chrome to handle. The exception here is Android Chrome.

Memory snapshots on Android / Chrome Devtools show worker heap is frequently GC'ed (varies from 1.3MB to >100MB and back to 1.3MB) but then "suddenly" is not anymore (>500MB heap) and Chrome crashes.
Looking at chrome://tracing with an Android phone connected shows available memory dropping continuously until things crash - the memory freed from the worker heap during GC is not shown as available in chrome://tracing.

Is there anything with the promise/event mechanism between the main thread and the worker that could make things not being garbage collected? Or could this be simply a Chrome bug on Android? Do I have a bug on my side? ¯_(ツ)_/¯

Sample project (Gatsby and React for now, soon Preact):
https://codesandbox.io/s/1di20

Relevant files are /src/components/qreader-zxing.js and /src/workers/zxing.worker.js

主要言語
JavaScript
スター
2.3k
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

developit/workerize-loader のほかの issue

developit/workerize-loader の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。