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

Error during processing events - Out of Memory #1601

Closed
2 tasks done
MichalNemec opened this issue Nov 6, 2023 · 7 comments
Closed
2 tasks done

Error during processing events - Out of Memory #1601

MichalNemec opened this issue Nov 6, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@MichalNemec
Copy link

MichalNemec commented Nov 6, 2023

Checklist

  • I could not find a solution in the documentation, the existing issues or discussions.
  • I already asked for help in the chat

In which Project did the bug appear?

Other

If you selected "Other" as Project, please enter in which project the bug occurred.

matrix-dart-sdk

On which platform did the bug appear?

Android

SDK Version

0.22.4

Describe the problem caused by this bug

I/flutter ( 7834): [Matrix] Initialize client xxx
I/flutter ( 7834): [Matrix] Benchmark: Build database -> 21 ms
I/flutter ( 7834): [Matrix] Benchmark: Get Client from store -> 1 ms
I/flutter ( 7834): [Matrix] Benchmark: Get all account data from store -> 1 ms
I/flutter ( 7834): [Matrix] Benchmark: Get room list from store -> 4 ms
I/flutter ( 7834): [Matrix] Benchmark: Get all user device keys from store -> 13 ms
I/flutter ( 7834): [Matrix] Successfully connected as xxx with https://xxx.com
I/flutter ( 7834): [Matrix] Error during processing events - Out of Memory
I/flutter ( 7834): #0      new Uint8List (dart:typed_data-patch/typed_data_patch.dart:2248:3)
I/flutter ( 7834): #1      BufferedFileReader.loadBytes (package:hive/src/io/buffered_file_reader.dart:73:18)
I/flutter ( 7834): #2      _KeyReader._load (package:hive/src/io/frame_io_helper.dart:89:40)
I/flutter ( 7834): #3      _KeyReader.readKeys (package:hive/src/io/frame_io_helper.dart:69:31)
I/flutter ( 7834): #4      _rootRunUnary (dart:async/zone.dart:1407:47)
I/flutter ( 7834): #5      _CustomZone.runUnary (dart:async/zone.dart:1308:19)
I/flutter ( 7834): #6      _FutureListener.handleValue (dart:async/future_impl.dart:156:18)
I/flutter ( 7834): #7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:840:45)
I/flutter ( 7834): #8      Future._propagateToListeners (dart:async/future_impl.dart:869:13)
I/flutter ( 7834): #9      Future._completeWithValue (dart:async/future_impl.dart:641:5)
I/flutter ( 7834): #10     _rootRunUnary (dart:async/zone.dart:1407:47)
I/flutter ( 7834): #11     _CustomZone.runUnary (dart:async/zone.dart:1308:19)
I/flutter ( 7834): #12     _FutureListener.handleValue (dart:async/future_impl.dart:156:18)
I/flutter ( 7834): #13     Future._propagateToListener
I/flutter ( 7834): [2023-11-06 13:21:34.537654 | Catcher 2 | INFO] ============================== CATCHER 2 LOG ==============================
I/flutter ( 7834): [2023-11-06 13:21:34.538128 | Catcher 2 | INFO] Crash occurred on 2023-11-06 13:21:34.536516
I/flutter ( 7834): [2023-11-06 13:21:34.538296 | Catcher 2 | INFO] 
I/flutter ( 7834): [2023-11-06 13:21:34.538840 | Catcher 2 | INFO] ---------- ERROR ----------
I/flutter ( 7834): [2023-11-06 13:21:34.539056 | Catcher 2 | INFO] Out of Memory
I/flutter ( 7834): [2023-11-06 13:21:34.539190 | Catcher 2 | INFO] 
I/flutter ( 7834): [2023-11-06 13:21:34.539330 | Catcher 2 | INFO] ------- STACK TRACE -------
I/flutter ( 7834): [2023-11-06 13:21:34.539726 | Catcher 2 | INFO] #0      new Uint8List (dart:typed_data-patch/typed_data_patch.dart:2248:3)
I/flutter ( 7834): [2023-11-06 13:21:34.539912 | Catcher 2 | INFO] #1      BufferedFileReader.loadBytes (package:hive/src/io/buffered_file_reader.dart:73:18)
I/flutter ( 7834): [2023-11-06 13:21:34.540246 | Catcher 2 | INFO] #2      _KeyReader._load (package:hive/src/io/frame_io_helper.dart:89:40)
I/flutter ( 7834): [2023-11-06 13:21:34.540434 | Catcher 2 | INFO] #3      _KeyReader.readKeys (package:hive/src/io/frame_io_helper.dart:69:31)
I/flutter ( 7834): [2023-11-06 13:21:34.540583 | Catcher 2 | INFO] #4      _rootRunUnary (dart:async/zone.dart:1407:47)
I/flutter ( 7834): [2023-11-06 13:21:34.540808 | Catcher 2 | INFO] #5      _CustomZone.runUnary (dart:async/zone.dart:1308:19)
I/flutter ( 7834): [2023-11-06 13:21:34.540971 | Catcher 2 | INFO] #6      _FutureListener.handleValue (dart:async/future_impl.dart:156:18)
I/flutter ( 7834): [2023-11-06 13:21:34.541108 | Catcher 2 | INFO] #7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:840:45)
I/flutter ( 7834): [2023-11-06 13:21:34.541284 | Catcher 2 | INFO] #8      Future._propagateToListeners (dart:async/future_impl.dart:869:13)
I/flutter ( 7834): [2023-11-06 13:21:34.541430 | Catcher 2 | INFO] #9      Future._completeWithValue (dart:async/future_impl.dart:641:5)
I/flutter ( 7834): [2023-11-06 13:21:34.541565 | Catcher 2 | INFO] #10     _rootRunUnary (dart:async/zone.dart:1407:47)
I/flutter ( 7834): [2023-11-06 13:21:34.541712 | Catcher 2 | INFO] #11     _CustomZone.runUnary (dart:async/zone.dart:1308:19)
I/flutter ( 7834): [2023-11-06 13:21:34.541839 | Catcher 2 | INFO] #12     _FutureListener.handleValue (dart:async/future_impl.dart:156:18)
I/flutter ( 7834): [2023-11-06 13:21:34.541962 | Catcher 2 | INFO] #13     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:840:45)
I/flutter ( 7834): [2023-11-06 13:21:34.542113 | Catcher 2 | INFO] #14     Future._propagateToListeners (dart:async/future_impl.dart:869:13)
I/flutter ( 7834): [2023-11-06 13:21:34.542243 | Catcher 2 | INFO] #15     Future._completeWithValue (dart:async/future_impl.dart:641:5)
I/flutter ( 7834): [2023-11-06 13:21:34.542380 | Catcher 2 | INFO] #16     _rootRunUnary (dart:async/zone.dart:1407:47)
I/flutter ( 7834): [2023-11-06 13:21:34.542544 | Catcher 2 | INFO] #17     _CustomZone.runUnary (dart:async/zone.dart:1308:19)
I/flutter ( 7834): [2023-11-06 13:21:34.542654 | Catcher 2 | INFO] #18     _FutureListener.handleValue (dart:async/future_impl.dart:156:18)
I/flutter ( 7834): [2023-11-06 13:21:34.542778 | Catcher 2 | INFO] #19     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:840:45)
I/flutter ( 7834): [2023-11-06 13:21:34.542915 | Catcher 2 | INFO] #20     Future._propagateToListeners (dart:async/future_impl.dart:869:13)
I/flutter ( 7834): [2023-11-06 13:21:34.543035 | Catcher 2 | INFO] #21     Future._completeWithValue (dart:async/future_impl.dart:641:5)
I/flutter ( 7834): [2023-11-06 13:21:34.543155 | Catcher 2 | INFO] #22     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:715:7)
I/flutter ( 7834): [2023-11-06 13:21:34.543278 | Catcher 2 | INFO] #23     _rootRun (dart:async/zone.dart:1399:13)
I/flutter ( 7834): [2023-11-06 13:21:34.543405 | Catcher 2 | INFO] #24     _CustomZone.run (dart:async/zone.dart:1301:19)
I/flutter ( 7834): [2023-11-06 13:21:34.543555 | Catcher 2 | INFO] #25     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1233:23)
I/flutter ( 7834): [2023-11-06 13:21:34.543681 | Catcher 2 | INFO] #26     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
I/flutter ( 7834): [2023-11-06 13:21:34.543800 | Catcher 2 | INFO] #27     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
I/flutter ( 7834): [2023-11-06 13:21:34.543919 | Catcher 2 | INFO] 
I/flutter ( 7834): [2023-11-06 13:21:34.544046 | Catcher 2 | INFO] ======================================================================
I/flutter ( 7834): [2023-11-06 13:21:34.546332 | Catcher 2 | INFO] Report result: true

Steps To Reproduce

  1. create direct NON encrypted conversation
  2. send around 200-300 messages both users
  3. get this error out of the blue when starting the app again

Screenshots or Logs

No response

Security related

No response

@MichalNemec MichalNemec added the bug Something isn't working label Nov 6, 2023
@krille-chan
Copy link
Contributor

hey, thanks for the input. Currently we think about migrating away from Hive and switch to sqflite/indexeddb. This should then solve this

@MichalNemec
Copy link
Author

MichalNemec commented Nov 7, 2023

@krille-chan What would be ETA? or is there some quick workaround, because if users get OOM, thats just rendering app unusable. i read hive has compact(), could that work?

i saw that https://github.com/matrix-org/matrix-js-sdk has indexeddb, maybe that would speed up the development progress?

@krille-chan
Copy link
Contributor

@krille-chan What would be ETA? or is there some quick workaround, because if users get OOM, thats just rendering app unusable. i read hive has compact(), could that work?

i saw that https://github.com/matrix-org/matrix-js-sdk has indexeddb, maybe that would speed up the development progress?

Probably next week we will have a decision which database we want to use in the future. Btw hive does already use indexedDB in web.

@MichalNemec
Copy link
Author

Hello @krille-chan any updates?

@nikzen
Copy link
Contributor

nikzen commented Nov 30, 2023

@MichalNemec You can track the status here: #1616 and even try to use this branch. We try to make sure to have this ready soon.

@MichalNemec
Copy link
Author

Hello, ive seen the #1616 merge to main, ill test it soon, thank you for such a quick addition.

@PhantomRay PhantomRay mentioned this issue Apr 22, 2024
2 tasks
@krille-chan
Copy link
Contributor

Closed in favor of #1856

@krille-chan krille-chan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants