Skip to content

mobile + level_select + mouse_left crashes on level select screen #35

@pancelor

Description

@pancelor

hello! I'm trying to debug why https://pancelor.itch.io/like-a-hot-knife-through-butter crashes on mobile in the level select screen

I was able to get android remote debugging sort of set up. I don't really know what I'm doing, but I was able to get a stack trace of a crash! It ends with getTilesTraversingPoints (in src/js/inputoutput.js) but the code is minified and this dev setup I have is pretty awful so I haven't been able to dig much deeper

Here's the stack trace, from firefox mobile:

Script terminated by timeout at:
getTilesTraversingPoints@https://v6p9d9t4.ssl.hwcdn.net/html/5770877/index.html:11946:5502
mouseAction@https://v6p9d9t4.ssl.hwcdn.net/html/5770877/index.html:11946:8753
mouseMove@https://v6p9d9t4.ssl.hwcdn.net/html/5770877/index.html:11946:12629
EventListener.handleEvent*@https://v6p9d9t4.ssl.hwcdn.net/html/5770877/index.html:11946:19526

you can crash my game pretty reliably by going to the level select menu, pressing on the screen for ~0.5 seconds and then swiping (well, it crashes mobile chrome; on mobile firefox it hangs for a minute and then starts working again.)


more info / theories

I noticed by messing around with basic puzzlescriptplus examples that the mobile menu behavior in my game is very odd - if you make a game with level_select and no mouse_left, you can swipe in the menu to move the selection cursor around and tap to activate the cursor (like a simulated keyboard) but in my game (which has level_select and also mouse_left) the mobile controls in the level select menu act more like a mouse rather than a simulated keyboard -- you can click on things directly. This is pretty weird and feels wrong, and I bet it's related to this crash.

I think the combination of level_select and mouse_left in the prelude is causing getTilesTraversingPoints to get called differently than it should be (maybe it shouldn't be called at all?) and it's entering some sort of infinite loop, probably because the level select screen doesn't have a normal grid like actual levels.

my game does use a custom fork of puzzlescriptplus (mine deals with sprites larger than the grid size; I haven't published it anywhere b/c it's quite janky. see my devlog for more details) but I don't think that's relevant.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions