Upgrade from 1.4.9 to 1.12 break on mobile devices

23 views
Skip to first unread message

Christoph Husse

unread,
Apr 6, 2014, 3:58:29 AM4/6/14
to emscripte...@googlegroups.com
Hi,

I was using the emscripten package that comes with Ubuntu 13 until yesterday. Today I have setup a master checkout on Debian 7.4.
When compiling my existing code, both compiler produce the same working application on desktop browsers, like Chrome, Firefox, etc...

But when trying to run this code on iPad & iPhone with iOS 7, the browser just "hangs" and everything feels like it crashed.
It seems as if the 1.12 version without optimizations would work, but of course it is so slow that iPad is just rendering oner frame every ten seconds or something. But at least there it works. As soon as I activate optimizations, it breaks though...

This is the command line I use:
emcc MyProject.bc --preload-file Assets -o MyProject.js -s TOTAL_MEMORY=33554432 --js-library native_impl.js -O2

I also tried without ASM_JS and memory growth. Still doesn't work.

So to summarize: The above command line produces working app for iPad & iPhone with the 1.4.9 version but breaks on 1.12 version. It still seems to work in 1.12 when I disable optimization. And of course it works on desktop browser in all cases. So this seems to be a support issue. Maybe some stuff is not supported atm on iPhone. I don't know.

Any ideas on what I can try?

Alon Zakai

unread,
Apr 6, 2014, 1:13:17 PM4/6/14
to emscripte...@googlegroups.com
Is there a way to see browser error messages on iOS? Perhaps it hits an exception?

- Alon



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Bateman

unread,
Apr 6, 2014, 2:21:55 PM4/6/14
to emscripte...@googlegroups.com
You can connect safari/Mac to an ios safari to see console messages

Sent from my iPhone
Message has been deleted
Message has been deleted

Christoph Husse

unread,
Apr 7, 2014, 10:57:50 AM4/7/14
to emscripte...@googlegroups.com
Btw, if it helps I could send you a source code package in "private" (which I can't post here for legal reasons) [someone who is involved with the project and needs it to dig deeper].

Note that this is not for me.. If you have no interest, just ignore it ;). I just thought that this might be a compiler issue in which case it will be of interest to you to have a regression test example.

Otherwise I wanted to start a new "engine" from scratch anyway, based on the latest emscripten and with the knowledge I gained through this hacky prototype.
Message has been deleted

Christoph Husse

unread,
Apr 7, 2014, 11:05:37 AM4/7/14
to emscripte...@googlegroups.com
Okay now I am really confused... Dropbox has deleted my folder too, not just the message disappeared xD. Something strange is going on. If you like to have the HTML examples, I could send them to you somehow I guess, the approach I took here didn't work obviously something doesn't like it. 

Christoph Husse

unread,
Apr 7, 2014, 11:09:18 AM4/7/14
to emscripte...@googlegroups.com
What the heck, three times a charm....

1.4.9 (works everwhere):
https://dl.dropboxusercontent.com/u/27687180/webserver/GlitchyBird/touch_test.html
1.12 unoptimized (works everywhere):
https://dl.dropboxusercontent.com/u/27687180/webserver/GlitchyBird_1.12_unoptimized/touch_test.html
1.12 optimized (breaks on mobile):
https://dl.dropboxusercontent.com/u/27687180/webserver/GlitchyBird_1.12_optimized/touch_test.html
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/syPbjZlESyQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Alon Zakai

unread,
Apr 7, 2014, 7:22:23 PM4/7/14
to emscripte...@googlegroups.com
Works ok on a desktop here, but I don't have an iPhone to test on. Did you try what Richard said about debugging on those devices?

- Alon



You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Christoph Husse

unread,
Apr 8, 2014, 2:42:57 AM4/8/14
to emscripte...@googlegroups.com
Unfortunately I don't have a Mac, only windows, so I guess I can't
debug the iPhone. But I trust you have some sort of smartphone xD,
even though I never tested it on android (since I only have an iPhone,
doh)...
But I installed Google Chrome on my ipHone and it works there. So at
least the breaking change seems to be limited to iPhone safari and I
suspect the game would work on android...

BUT there is another much bigger issue with the 1.12 optimized build.
It's slow as hell (at least on iPhone in Chrome, while it breaks
completely on Safari). The game in optimized build runs with quite low
FPS and a lot of stuttering.

Christoph Husse

unread,
Apr 8, 2014, 2:44:06 AM4/8/14
to emscripte...@googlegroups.com
And ofc I also ran the 1.4.9 build in iPhone Chrome and it works
smoothly so thats not the issue.

On Tue, Apr 8, 2014 at 8:42 AM, Christoph Husse

Jukka Jylänki

unread,
Apr 8, 2014, 3:33:45 AM4/8/14
to emscripte...@googlegroups.com
I wonder if 1.4.9 has asm.js compilation option - now with 1.12.0 optimized builds are done with asm.js enabled. Perhaps Safari has problems executing such code on iPhone. Does -O2 -s ASM_JS=0 produce anything sensible?

Christoph Husse

unread,
Apr 8, 2014, 3:41:06 AM4/8/14
to emscripte...@googlegroups.com
I think I tried that too and it didn't work. Unfortunately I can only
test that later today again...

Also I wonder if the "desktop" safari will also fail? Is anyone able
to test it with a real Mac?

Christoph Husse

unread,
Apr 8, 2014, 9:49:05 AM4/8/14
to emscripte...@googlegroups.com
No, ASM_JS = 0 has the same issues, just that its also unusable on
IPhone Chrome too now (because of performance issues)

On Tue, Apr 8, 2014 at 9:41 AM, Christoph Husse

Alon Zakai

unread,
Apr 10, 2014, 1:38:23 PM4/10/14
to emscripte...@googlegroups.com
Hopefully someone reading here understands iPhone debugging and can help.

- Alon



On Mon, Apr 7, 2014 at 7:38 AM, Christoph Husse <thesai...@googlemail.com> wrote:
Thanks for your replies. Unfortunately it is not possible for me to debug this issue as I can't connect my iPhone to my Windows machine I guess...

Anyway I found out that dropbox is able to host those files, so you should be able to look into it. I know this is asking a lot xD. But maybe if you are involved in the project you will figure it out. I have no idea where to start looking!

What I know so far is that the browser really reacts strangely. Like it can render a new frame when I hit the "apple" button and then open safari again I get the next frame... 

This is the 1.12 Optimized build, which breaks completely on mobile and still throws an exception at a later point in desktop environments: https://dl.dropboxusercontent.com/u/27687180/webserver/GlitchyBird_1.12_optimized/touch_test.html

Thanks for your help... The only way I would see to figure this out myself is start with a working minimal example and add code until it breaks... But that would be quite laborious.
Reply all
Reply to author
Forward
0 new messages