A screenshot of the situation when it locks up, and the error log in the console would be very helpful for figuring out why it happened. To get the error log, right click and inspect the page, then select the console tab (for next time you encounter a crash).
I'll post screenshot separately, I had to crop it because itch.io complained about the size. I'll try to summarize what appear to be the key console points. Console starts with what appear to be non-notable warnings, but I see what appears to be the game itself outputting the same issue twice and I see two red browser errors. At the beginning we have creating game record... game-record.js:52:10 Cannot create item in table: Shields with level: 2. Defaulting to Main table 2 item-generator.js:112:13. No red error from that. Later on we have creating game record... game-record.js:52:10 Cannot create item in table: Shields with level: 1. Defaulting to Main table 2 item-generator.js:112:13 Generation Time: 395ms level-generate.js:64:10 Gained Level: 2 - -35:0-30 player.js:2059:10. This time it does appear to have triggered a red browser error Uncaught TypeError: this.callBack is null, but the game continued with no apparent problem at the time. When we get to character level 6 and this sequence:
TheSunlessDesert:4 - 6:19 level.js:220:10
Object { x: 27, y: 34 } status-effect.js:229:12
x: 27 y: 34 <prototype>: Object { … } __defineGetter__: function __defineGetter__() __defineSetter__: function __defineSetter__() __lookupGetter__: function __lookupGetter__() __lookupSetter__: function __lookupSetter__() __proto__: constructor: function Object() hasOwnProperty: function hasOwnProperty() isPrototypeOf: function isPrototypeOf() propertyIsEnumerable: function propertyIsEnumerable() toLocaleString: function toLocaleString() toString: function toString() valueOf: function valueOf() <get __proto__()>: function __proto__() <set __proto__()>: function __proto__()
Uncaught TypeError: char.type is undefined
getTileColor []ui/ui-map.js:182 refresh []ui/ui-map.js:98 death []character/npc.js:993 takeDamage []character/character.js:9... spikeTrapActivate []entity/object-funcs.js:9... stepOn []entity/object.js:178 onEnterTileBase []character/character.js:5... onEnterTile []character/npc.js:759 finishTween []character/character-body... onUpdateFrame []character/character-body... updateFrame []character/character.js:2... updateCharacterFrames []character/character.js:9... update []game-loop.js:77 update []phaser.js:31268 updateLogic []phaser.js:38313 update []phaser.js:38251 updateRAF []phaser.js:67700 _onLoop []phaser.js:67682
After that a bunch of warnings are spit out (the first being Unknown property ‘src’. Declaration dropped) and the game goes completely non-responsive.