Skip to content

Safari: total canvas memory use exceeds the maximum limit (256 mb) #474

Description

@Sandstedt

Get's this error:
total canvas memory use exceeds the maximum limit (256 mb) in IgeTextureMap.js and some more places, and then IGE will get into an infinite loop.

This only happens in Safari on iOS 13.6 (the only one I tested in). Usually after navigation back and forth to the game.

Works when closing the tab and opening again. Probably some memory leak somewhere.

The infinite loop can be temporarily solved by changing all instances of ctx and return if it doesnt exist (but is of course a better sollution to fix the root cause):

if (!sectionCtx) return;

in IgeTexureMap.js:492 (.getContext('2d') returns undefined

if (!ctx) return;

in IgeTexureMap.js:640 (ctx is null here)

if (!ctx) return;

inIgeFontSheet.js:58
(here you could add an alert() to tell the player to close and reopen the tab to fix it)

if (!this._ctx) return;

in IgeEngine.js:1035

if (!ctx) return;

in IgeEngine.js:1864

if (!this._cacheCtx) return;

in IgeEntity.js:137

And maybe some more places.

(Bug occurred in this project: https://www.papricaklubben.se/#start)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions