Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Maximum call stack size exceeded. #21

Open
jorycz opened this issue Nov 6, 2024 · 10 comments
Open

RangeError: Maximum call stack size exceeded. #21

jorycz opened this issue Nov 6, 2024 · 10 comments

Comments

@jorycz
Copy link

jorycz commented Nov 6, 2024

I get RangeError: Maximum call stack size exceeded. when I upload game and try to type anything into DOS shell in Safari on iPad (iOS 18.1).
Same for Google Chrome. I am able to put there like 2 chars in Chrome and then same error appears above DOS window.

IMG_0010
.

@nbarkhina
Copy link
Owner

can you try using the ISO instead of a ZIP file? with a zip file it tries copying all the content to the C drive but ISO is more efficient because it streams the data.

@jorycz
Copy link
Author

jorycz commented Nov 6, 2024

Sure! I did it right now and it imgmount .iso then imgmake .img and shows me Drive C is mounted as dune2.img.
So far so good.
Unfortunately, as soon as I hit the keyboard I get this error in browser even when using ISO :(
Oh and sorry I didn't mention that I have physical HW keyboard, if it makes any difference.

@nbarkhina
Copy link
Owner

On the first page, can you go to settings, clear the hard drive, and try lowering the Initial HD to 50mb, then try it again and see if that makes a difference?

@jorycz
Copy link
Author

jorycz commented Nov 6, 2024

I tried it and it was slightly better. I can write to DOS window more chars like maybe 25 for test? But then I wrote dir and as soon as I hit Enter key it showed same error again.
I tried it again (deleted browser site data and kill / reopen browser) and it definitely allows me to write between 20-30 chars but then same error appears again and I can not do anything with MS-DOS window.
Still using .iso for testing.

BTW It started showing Loading ... only. Even I deleted browsing data and killed browser. It was instant before. I hope I didn't crash it.

IMG_0012

@jorycz
Copy link
Author

jorycz commented Nov 6, 2024

It has nothing to do with keyboard. It’s probably browser thing. Now I got this error after unpack game and then just twice click on Zoom In without touching keyboard.

@nbarkhina
Copy link
Owner

nbarkhina commented Nov 8, 2024

What platform are you on? Windows, Mac, Linux, or Chromebook ? And what Browser ?

@jorycz
Copy link
Author

jorycz commented Nov 8, 2024

It's specified in my first post. Safari on iPad (iOS 18.1)

@nbarkhina
Copy link
Owner

Ok thank you - yes there is currently an issue with IOS devices which I have been aware of.

@technofox01
Copy link

Ok thank you - yes there is currently an issue with IOS devices which I have been aware of.

I was just about to post this same issue. Do you know when this issue, if at all, will be fixed?

From my own research, it appears related to a recursive function; source:
https://stackoverflow.com/questions/6095530/maximum-call-stack-size-exceeded-error

I hope this helps. I tried looking at the code myself but I am not seeing which function is the issue :-/

@nbarkhina
Copy link
Owner

@technofox01 I think it has something to do with how i'm compiling the webassembly. I'm using the -ASYNCIFY because the way the code is structured there is no top level game loop. Normally with a loop you can just use emscripten_set_main_loop which in my experience has always worked very stable on iOS. However with Asyncify I need to use emscripten_sleep() to yield to the DOM which doesn't seem to work as well on iOS. Long story short I don't have any good solution yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants