Heap out of bounds , use motoko

@claudio @ZhenyaUsenko @skilesare I’ve got a similar problem.
At first, I thought it was my Mac, but then I deployed in the motoko playground and I am getting the same results.

https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/?tag=2112554174

repo:
https://github.com/infu/bug_x_weird

You will probably need “Internet Base” VS Code extension so you can run the ./check.blast (from repo) to populate it with 100k records.
These records look like this:

Once they get inserted, the canister won’t upgrade. Sometimes it throws “stack overflow” and on rare occasions “heap out of bounds”. The memory is ~52mb

I’ve tried various dfx versions and also hashmap’s previous version.

I’ve tried using nhash instead of thash (Nat keys). I’ve tried removing skills:[Text].
Tried removing the id from the document as well so it doesn’t repeat.
I’ve also tried inserting the records in smaller portions, 100 per request instead of 1000.
Nothing seems to help with the error. Everything seems to work fine until you try to upgrade it.

1 Like