diabloweb icon indicating copy to clipboard operation
diabloweb copied to clipboard

1.0.35 crashing in Safari (iPhone)

Open schwarzjr opened this issue 5 years ago • 21 comments

Worked before, but unfortunately don't know which version it was. Tried today morning again and 1. doesn't show the Blizzard logo at the beginning and 2. crashes after creating new/loading existing character. Just shows black screen with the touch-icons and then reloads the page after a couple of second. Tried both shareware and diabdat.mpq. No difference.

schwarzjr avatar Aug 20 '19 08:08 schwarzjr

How long ago did it work? Recently I only changed multiplayer and error handling, not sure how either of those could be related to videos not showing.

d07RiV avatar Aug 20 '19 13:08 d07RiV

Is it possible it worked yesterday evening? I downloaded diabdat.mpq on the phone and tried it. I think it did run, but maybe that was some older cached version. I didn't check the version number. I can try running the older versions locally in the evening and let you know. If I find a way how to do it :)

schwarzjr avatar Aug 20 '19 13:08 schwarzjr

OK, so the last working version is 1.0.29. Had to revert the f0ba5c7 commit in gh-pages branch for it to run on ios safari again. Maybe the "oops fix" in the master branch?

Edit: After fooling around awhile, I think the switch to websocket broke it. The wrapper app works just fine, but the connection to the game itself stopped working. That is why I don't see the intro, nor the game itself.

schwarzjr avatar Aug 20 '19 18:08 schwarzjr

"Oops fix" was fixing an accidental commit that prevented multiplayer from ever loading (when i was trying to customize the "connecting..." page).

You're saying you don't get the intro logo, but you see the menus just fine? Although I tried playing with a friend and I think he had a similar issue where the menus worked, but as soon as he got into a game everything was black, though he could still hear the sounds and on my screen he was moving just fine. If your page reloads, that seems to be a different issue.

d07RiV avatar Aug 21 '19 12:08 d07RiV

Yes, I see only the menu. After starting a single player game, the page reloads in a couple of seconds with a Safari notice that a problem occured with this page so it was reloaded. If you have any ideas how I can help to pinpoint the issue, let me know.

schwarzjr avatar Aug 21 '19 12:08 schwarzjr

Ah, that's a little different. If the whole browser tab crashes it becomes a lot harder to find the actual problem. Though if you're saying it runs on one of previous versions, that narrows down the possibilities. If you can run it locally, maybe you could find the exact commit that caused the issue? Or I can try to host multiple builds if you can't do that.

d07RiV avatar Aug 22 '19 09:08 d07RiV

What I know is that it starts crashing with the f0ba5c7 commit in gh-pages. What I don't know is which commits from the master branch it includes. But maybe you can find out easily. I think it was the 916bbd90cb57e2c5a3a50303782ae26a5315ea52 commit, but I am not sure.

Edit: Tried multiplayer as you mentioned above and you were right - I could see the ios player move around, but on ios there was just black screen. Also, there is no errors reported in the debugging console (other then "requestFullscreen is not a function", which is to be expected, because ios safari doesn't have fullscreen mode, and is printed also for the 1.0.29 version). In other words, the game runs but is unable to display anything. Tried an ipad as well, and the result is the same.

schwarzjr avatar Aug 22 '19 09:08 schwarzjr

9/1/19 i just downloaded this for the first time. I have the correct MPQ file but same thing. I see no logo but then I see the menu but as soon as I click on my character to play, I see the touch buttons but no game play. I’m on an iPhone X and a iPhone 6 s + and neither work. Also I tried it on both safari and chrome. Help help

zzVoldemart avatar Sep 01 '19 08:09 zzVoldemart

@D07RiV

zzVoldemart avatar Sep 01 '19 08:09 zzVoldemart

Since there are so many issues with running it in Safari, have you tried the native iOS port? https://github.com/diasurgical/devilutionX/pull/182

AJenbo avatar Sep 01 '19 09:09 AJenbo

Ajenbo do you have a working copy of diablo on your phone and if so how do you run it ?

zzVoldemart avatar Sep 01 '19 09:09 zzVoldemart

@AJenbo

zzVoldemart avatar Sep 01 '19 09:09 zzVoldemart

Install it via Xcode, run it like any other app.

@zzVoldemart if you forget to @ someone, just edit your previous message

AJenbo avatar Sep 01 '19 09:09 AJenbo

@AJenbo what’s Xcode I’m on my iPhone...

zzVoldemart avatar Sep 01 '19 09:09 zzVoldemart

Xcode is apples developer tool for iPhone

AJenbo avatar Sep 01 '19 10:09 AJenbo

@AJenbo Yeah, I know. But the web version has some touch-related tweaks included which make iphone playing much more pleasant.

Btw had time to play with the code a bit and the strangest thing is that I can't seem to be able to build a working jscc/wasm files for iphone. They work just fine in Safari on macOS, but they don't on ios. The screen just stays black.

What I tried specifically: I check out a diabloweb commit I know works on ios (8c33947d), npm install, npm run build, npm run deploy - works on ios. In the next step I build (node build.js) what should be the same jscc/wasm files, replace them in the /src/api folder, again install, build and deploy - and it doesn't work on ios (screen is black) but works just fine on macOS safari.

Given the fact the jscc files differ sligtly (my build vs @d07RiV's build), I suspect that the problem may originate in different versions of emscripten, or something like that. Which version exactly do you use? I'd like to try the exact same settings to find out what is going on.

schwarzjr avatar Sep 01 '19 12:09 schwarzjr

Writing the last post got me thinking and ... Heureka! I found it! It is the -O3 optimization switch! When I compile it with -O0, it works.

Edit: ... but crashes every time when returning to the town from the church. I read about it elsewhere - did you find a solution? Could it be ios-related?

schwarzjr avatar Sep 01 '19 13:09 schwarzjr

Yeah that's fair enough, hopefully we can have an even better ui implementation for the native port in the not to distant future. We do have some concepts going but we need to work a bit more on the render for it to handle it and that won't happen before Hellfire lands.

AJenbo avatar Sep 01 '19 15:09 AJenbo

@schwarzjr can you give me a working copy? I’m not very Tech savvy on the phone. I have the MPQ file but it’s not working like you describe. I can’t see any game play

zzVoldemart avatar Sep 01 '19 16:09 zzVoldemart

@zzVoldemart You can try it at https://schwarzjr.github.io/diabloweb/ But as I said - it crashes when going from the cathedral back to the town. But maybe you will be lucky :)

schwarzjr avatar Sep 01 '19 18:09 schwarzjr

I'm going to guess the issue here is related to some of the old code that has since been cleaned up upstream

AJenbo avatar Feb 05 '20 02:02 AJenbo