Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Webgl support #50

Closed
abryden opened this issue Apr 27, 2015 · 5 comments
Closed

Webgl support #50

abryden opened this issue Apr 27, 2015 · 5 comments

Comments

@abryden
Copy link

abryden commented Apr 27, 2015

1.05 doesn't run in the webgl player currently.

If you replace every instance of UNITY_WEBPLAYER with (UNITY_WEBPLAYER || UNITY_WEBGL) it will at least load without complaining about sqlite3 dlls.

Currently with this setup it works in the Unity IDE but does not work in an actual WebGL build (I tested the S3 example using Firefox and Chrome).

It appears the issue may be with attempting to use _pthread_create.

edit: The main reason for supporting this is that Chrome is/has dropped support for plugins - see https://www.chromium.org/developers/npapi-deprecation

@abryden
Copy link
Author

abryden commented Apr 27, 2015

In chrome I get the following console log upon attempting to do the "list bucket" operation:

(index):33 missing function: pthread_createModule.printErr @ (index):33_pthread_create @ builds.js:10507__ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ @ builds.js:70346__ZN6il2cpp2os6Thread3RunEPFvPvES2_ @ builds.js:62926__ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult @ builds.js:99033__ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject @ builds.js:99511_il2cpp_delegate_begin_invoke @ builds.js:30046__Z6m19803P4t320P2t7P4t277S2_P10MethodInfo @ builds.js:3003606__ZN16VirtFuncInvoker3IP2t7S1_P4t277S1_E6InvokeEP10MethodInfoPvS1_S3_S1_ @ builds.js:2731477__Z5m4812P2t7P4t320S0_P10MethodInfo @ builds.js:2963548__Z5m4156P2t7P4t320P10MethodInfo @ builds.js:2963530__Z5m2943P4t637P4t641P3t97P2t7P10MethodInfo @ builds.js:2508111__ZN18VirtActionInvoker3IP4t641P3t97P2t7E6InvokeEP10MethodInfoPvS1_S3_S5_ @ builds.js:2530565__Z5m3947P4t760P10MethodInfo @ builds.js:2530358__Z19RuntimeInvoker_t421P10MethodInfoPvPS1_ @ builds.js:3317338__ZN6il2cpp2vm7Runtime6InvokeEP10MethodInfoPvPS4_PP12Il2CppObject @ builds.js:96156_il2cpp_runtime_invoke @ builds.js:30021__Z23scripting_method_invoke21ScriptingMethodIl2CppP15ScriptingObjectR18ScriptingArgumentsPP18ScriptingException @ builds.js:1215760__ZN25ScriptingInvocationNoArgs6InvokeEPP18ScriptingException @ builds.js:1479095__ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEi @ builds.js:1469485__ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEi @ builds.js:1304102__ZN10GUIManager10DoGUIEventER10InputEventb @ builds.js:1303611__ZN10GUIManager16SendQueuedEventsEv @ builds.js:1304018__Z10PlayerLoopbbP10IHookEvent @ builds.js:1373720__ZL8mainloopv @ builds.js:2375527dynCall_v @ builds.js:3620953Runtime.dynCall @ builds.js:277(anonymous function) @ builds.js:10100Browser.mainLoop.runIter @ builds.js:6154Browser_mainLoop_runner @ builds.js:10096
(index):29 -1
(index):33 -1Module.printErr @ (index):33abort @ builds.js:3626260_pthread_create @ builds.js:10507__ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ @ builds.js:70346__ZN6il2cpp2os6Thread3RunEPFvPvES2_ @ builds.js:62926__ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult @ builds.js:99033__ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject @ builds.js:99511_il2cpp_delegate_begin_invoke @ builds.js:30046__Z6m19803P4t320P2t7P4t277S2_P10MethodInfo @ builds.js:3003606__ZN16VirtFuncInvoker3IP2t7S1_P4t277S1_E6InvokeEP10MethodInfoPvS1_S3_S1_ @ builds.js:2731477__Z5m4812P2t7P4t320S0_P10MethodInfo @ builds.js:2963548__Z5m4156P2t7P4t320P10MethodInfo @ builds.js:2963530__Z5m2943P4t637P4t641P3t97P2t7P10MethodInfo @ builds.js:2508111__ZN18VirtActionInvoker3IP4t641P3t97P2t7E6InvokeEP10MethodInfoPvS1_S3_S5_ @ builds.js:2530565__Z5m3947P4t760P10MethodInfo @ builds.js:2530358__Z19RuntimeInvoker_t421P10MethodInfoPvPS1_ @ builds.js:3317338__ZN6il2cpp2vm7Runtime6InvokeEP10MethodInfoPvPS4_PP12Il2CppObject @ builds.js:96156_il2cpp_runtime_invoke @ builds.js:30021__Z23scripting_method_invoke21ScriptingMethodIl2CppP15ScriptingObjectR18ScriptingArgumentsPP18ScriptingException @ builds.js:1215760__ZN25ScriptingInvocationNoArgs6InvokeEPP18ScriptingException @ builds.js:1479095__ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEi @ builds.js:1469485__ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEi @ builds.js:1304102__ZN10GUIManager10DoGUIEventER10InputEventb @ builds.js:1303611__ZN10GUIManager16SendQueuedEventsEv @ builds.js:1304018__Z10PlayerLoopbbP10IHookEvent @ builds.js:1373720__ZL8mainloopv @ builds.js:2375527dynCall_v @ builds.js:3620953Runtime.dynCall @ builds.js:277(anonymous function) @ builds.js:10100Browser.mainLoop.runIter @ builds.js:6154Browser_mainLoop_runner @ builds.js:10096
(index):33 warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demanglingModule.printErr @ (index):33Runtime.warnOnce @ builds.js:325demangle @ builds.js:982(anonymous function) @ builds.js:988demangleAll @ builds.js:988stackTrace @ builds.js:1009abort @ builds.js:3626268_pthread_create @ builds.js:10507__ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ @ builds.js:70346__ZN6il2cpp2os6Thread3RunEPFvPvES2_ @ builds.js:62926__ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult @ builds.js:99033__ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject @ builds.js:99511_il2cpp_delegate_begin_invoke @ builds.js:30046__Z6m19803P4t320P2t7P4t277S2_P10MethodInfo @ builds.js:3003606__ZN16VirtFuncInvoker3IP2t7S1_P4t277S1_E6InvokeEP10MethodInfoPvS1_S3_S1_ @ builds.js:2731477__Z5m4812P2t7P4t320S0_P10MethodInfo @ builds.js:2963548__Z5m4156P2t7P4t320P10MethodInfo @ builds.js:2963530__Z5m2943P4t637P4t641P3t97P2t7P10MethodInfo @ builds.js:2508111__ZN18VirtActionInvoker3IP4t641P3t97P2t7E6InvokeEP10MethodInfoPvS1_S3_S5_ @ builds.js:2530565__Z5m3947P4t760P10MethodInfo @ builds.js:2530358__Z19RuntimeInvoker_t421P10MethodInfoPvPS1_ @ builds.js:3317338__ZN6il2cpp2vm7Runtime6InvokeEP10MethodInfoPvPS4_PP12Il2CppObject @ builds.js:96156_il2cpp_runtime_invoke @ builds.js:30021__Z23scripting_method_invoke21ScriptingMethodIl2CppP15ScriptingObjectR18ScriptingArgumentsPP18ScriptingException @ builds.js:1215760__ZN25ScriptingInvocationNoArgs6InvokeEPP18ScriptingException @ builds.js:1479095__ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEi @ builds.js:1469485__ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEi @ builds.js:1304102__ZN10GUIManager10DoGUIEventER10InputEventb @ builds.js:1303611__ZN10GUIManager16SendQueuedEventsEv @ builds.js:1304018__Z10PlayerLoopbbP10IHookEvent @ builds.js:1373720__ZL8mainloopv @ builds.js:2375527dynCall_v @ builds.js:3620953Runtime.dynCall @ builds.js:277(anonymous function) @ builds.js:10100Browser.mainLoop.runIter @ builds.js:6154Browser_mainLoop_runner @ builds.js:10096
UnityConfig.js:74 Invoking error handler due to
Uncaught abort() at Error
at jsStackTrace (http://localhost:8395/Release/builds.js:992:13)
at stackTrace (http://localhost:8395/Release/builds.js:1009:22)
at abort (http://localhost:8395/Release/builds.js:3626268:25)
at _pthread_create (http://localhost:8395/Release/builds.js:10507:59)
at _ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2 il2cpp::os::ThreadImpl::Run(undefined?F?, void, void)
at _ZN6il2cpp2os6Thread3RunEPFvPvES2 il2cpp::os::Thread::Run(undefined?F?, void, void)
at __ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult il2cpp::vm::ThreadPoolCompartment::QueueWorkItem(Il2CppAsyncResult?*)
at __ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject il2cpp::vm::ThreadPool::Queue?S(void***)
at _il2cpp_delegate_begin_invoke (http://localhost:8395/Release/builds.js:30046:8)
at Array.__Z6m19803P4t320P2t7P4t277S2_P10MethodInfo m19803?2(t277?S?***)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
builds.js:6160 Uncaught abort() at Error
at jsStackTrace (http://localhost:8395/Release/builds.js:992:13)
at stackTrace (http://localhost:8395/Release/builds.js:1009:22)
at abort (http://localhost:8395/Release/builds.js:3626268:25)
at _pthread_create (http://localhost:8395/Release/builds.js:10507:59)
at _ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2 il2cpp::os::ThreadImpl::Run(undefined?F?, void, void)
at _ZN6il2cpp2os6Thread3RunEPFvPvES2 il2cpp::os::Thread::Run(undefined?F?, void, void)
at __ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult il2cpp::vm::ThreadPoolCompartment::QueueWorkItem(Il2CppAsyncResult?*)
at __ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject il2cpp::vm::ThreadPool::Queue?S(void***)
at _il2cpp_delegate_begin_invoke (http://localhost:8395/Release/builds.js:30046:8)
at Array.__Z6m19803P4t320P2t7P4t277S2_P10MethodInfo m19803?2(t277?S?***)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

@ghost ghost added the feature request label Apr 27, 2015
@ghost
Copy link

ghost commented Apr 27, 2015

Thank you for your feedback. So far we don't support WebGL in Unity SDK. We are evaluating this feature and your feedback helps us prioritize tasks.

@abryden
Copy link
Author

abryden commented Apr 27, 2015

Thanks! If you need justification, the plugin API that the webplayer requires is phased out in Chrome and requires an override that isn't presented on the page. In September, they plan to completely remove npapi support from Chrome. At this point the webgl player will be the only option for deploying to Chrome.

https://www.chromium.org/developers/npapi-deprecation

@mebrelsford
Copy link

I second this request. Now that Unity is officially sunsetting their webplayer, webgl is the only solution for building anything in the browser. Any sense of a timeline, or even a 'we probably won't look into this for a year or more' would be helpful. I really enjoy using AWS, and I would hate to have to switch to something else or roll my own solution.

@karthiksaligrama
Copy link
Contributor

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

No branches or pull requests

3 participants