Dexie.js: RangeError:Maximum call stack size exceeded

Possibly related to #589 since I do use Ionic & Angular:

"dexie": "^3.1.0-alpha.9",

image

I don’t have a whole lot of info on this since the stack trace is not very descriptive unfortunately. I saw it once and not since.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24

Commits related to this issue

Most upvoted comments

I’ve reproduced it in PR #1290. Added tests for RangeSet (had them before in another repo) and also found a set of ranges that reproduces this issue. Had to create 10,000 sets with 20 random ranges each to find one or two crashing combinations. One of those are defined in a repro test. It generates a circular tree for some reason. Will try fixing it soon.

Looks like this might have taken care of it. Numbers appear to be headed in the right direction:

image

No reports from the latest build. Continuing to monitor.

I’ve been using Dexie 3.1.0-alpha.10 since yesterday, ran it over night, have not seen a single crash since updating. lgtm!

Still no new reports, over 4,000 sessions.

i really appreciate the tree-rotation ascii diagram

I am still getting it now on the latest commit, tho, it may be difficult for others to use that code to produce it - the app runs a bunch of statemachines in the background which also make calls to dexie as they need to. I’ll see if I can dive into it a bit on my own, tho i’m new to dexie.

The latest time it threw (a few minutes ago) has only a single reference to useLiveQuery:

const goods = useLiveQuery(() => db.markets.orderBy("good").uniqueKeys());

I’ll see if I can catch it before it throws and inspect the branches.