Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Invalid function pointer called with signature 'vi' => 147

Discussion in 'WebGL' started by sirrus, Aug 17, 2016.

  1. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    Getting this error on a WebGL build via v5.3.6p1:

    Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this).

    Then 147 (error code?) is spit out.

    Stack Trace:
    Code (JavaScript):
    1. Invoking error handler due to
    2. uncaught exception: abort(147) at jsStackTrace@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1270:13
    3. stackTrace@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1287:22
    4. abort@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3965642:44
    5. nullFunc_vi@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:15824:464
    6. b147@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3960124:1
    7. __ZN5physx18NpShapeDecRefCountERNS_3Scb5ShapeE [physx::NpShapeDecRefCount(physx::Scb::Shape&)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:166906:1
    8. __ZN10ScSceneFnsIN5physx3Scb11RigidStaticEE6removeERNS0_2Sc5SceneERS2_b [remove? ScSceneFns<physx::Scb::RigidStatic?>?2(ScSceneFns::Sc::Scene&, undefined?S?&)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1447176:1
    9. __ZN5physx3Scb5Scene17removeRigidStaticERNS0_11RigidStaticEbb [physx::Scb::Scene::removeRigidStatic(physx::RigidStatic&, bool, bool)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:172830:1
    10. __ZN5physx13NpRigidStatic7releaseEv [physx::NpRigidStatic::release()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:155198:1
    11. __ZN8Collider7CleanupEv [Collider::Cleanup()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1030707:1
    12. __ZN12MeshCollider7CleanupEv [MeshCollider::Cleanup()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1031742:1
    13. __ZN12MeshCollider6CreateEPK9Rigidbody [MeshCollider::Create(Rigidbody?*)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1032357:1
    14. __ZN12MeshCollider13AwakeFromLoadE17AwakeFromLoadMode [MeshCollider::AwakeFromLoad?1()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1031585:1
    15. __Z16SmartResetObjectR6Object [SmartResetObject(Object?&)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:834705:1
    16. __Z15CreatePrimitiveRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi [CreatePrimitive?S(undefined?N?&)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:839538:1
    17. __Z15CreatePrimitivei [CreatePrimitive(int)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:839465:1
    18. __Z33GameObject_CUSTOM_CreatePrimitivei [GameObject_CUSTOM_CreatePrimitive(int)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:970815:1
    19. _GameObject_CreatePrimitive_m973880764@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3628202:1
    20. _UserMap__AddAssetToGridPlot_m2815441953@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:2496253:1
    21. _UserMap_CreateMapItem_m816688124@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:2496082:1
    22. dynCall_iiiiiii@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3958355:1
    23. invoke_iiiiiii@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:15966:12
    24. _U3CCreateMapItemsByItemStateU3Ec__Iterator1C8_MoveNext_m223540914@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:2502955:1
    25. __ZN21InterfaceFuncInvoker0IbE6InvokeEjP11Il2CppClassPv [Invoke? InterfaceFuncInvoker0<bool>(unsigned int, void**)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3835458:1
    26. _SetupCoroutine_InvokeMoveNext_m2975616245@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3665862:1
    27. __Z53RuntimeInvoker_Void_t1841601450_Il2CppObject_IntPtr_tPK10MethodInfoPvPS2_ [RuntimeInvoker_Void_t1841601450_Il2CppObject_IntPtr_t?2(void**, undefined?S?*)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3786430:1
    28. dynCall_iiii@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3959496:1
    29. invoke_iiii@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:17433:12
    30. __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke?5(void**, undefined?S?*)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:80333:1
    31. _il2cpp_runtime_invoke@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:32190:1
    32. __Z20il2cpp_invoke_method21ScriptingMethodIl2CppP15ScriptingObjectP18ScriptingArgumentsPP18ScriptingExceptionb [il2cpp_invoke_method?2()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:750201:1
    33. __ZN19ScriptingInvocation6InvokeEPP18ScriptingExceptionb [ScriptingInvocation::Invoke(bool**)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:867844:1
    34. __ZN9Coroutine14InvokeMoveNextEPP18ScriptingException [Coroutine::InvokeMoveNext(ScriptingException?**)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854872:1
    35. __ZN9Coroutine3RunEv [Coroutine::Run()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854654:1
    36. __ZN9Coroutine3RunEv [Coroutine::Run()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854687:1
    37. __ZN9Coroutine3RunEv [Coroutine::Run()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854687:1
    38. __ZN9Coroutine3RunEv [Coroutine::Run()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854687:1
    39. __ZN9Coroutine17ContinueCoroutineEP6ObjectPv [Coroutine::ContinueCoroutine(void**)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:854635:1
    40. __ZN12WWWDelayCall8CallbackEP6ObjectPv [WWWDelayCall::Callback(void**)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:709557:1
    41. __ZN18DelayedCallManager6UpdateEi [DelayedCallManager::Update(int)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:643892:1
    42. __Z10PlayerLoopbbP10IHookEvent [PlayerLoop(bool, bool, IHookEvent?*)]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:842435:1
    43. __ZL8MainLoopv [MainLoop()]@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:1905756:1
    44. dynCall_v@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:3959307:1
    45. Runtime.dynCall@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:387:14
    46. Browser_mainLoop_runner/<@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:9766:13
    47. Browser.mainLoop.runIter@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:11315:13
    48. Browser_mainLoop_runner@blob:null/0d6f09b2-89a8-4ce1-9121-807df3e472eb:9762:9
    Looks like it may happen on clean up of a collider of some sort?
    Ive tried to see if an asset is using a component that is being stripped out but have had no luck determining the issue. Any help would be greatly appreciated.
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    This looks like a bug. Could you file a bug report with a repro case, and post the case number here?
     
  3. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    I was afraid you'd say that. :( It looks like it happens when downloading assets via assetbundles but I can't seem to pinpoint it to a specific asset. Ive also noticed other error "codes": 147, 150, 163, etc. Do these represent something I can investigate?

    It will take some work to package up the project for a repro but I will do my best.
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    No, these numbers are pretty much meaningless, unfortunately.
     
  5. sirrus

    sirrus

    Joined:
    Jun 10, 2012
    Posts:
    250
    Jonas,

    Unfortunately, providing this project just isn't practical at the moment.

    After about a day of investigation, it seems to come down to that CreatePrimitive(...) call. We simply create a primitive plane for objects as they are downloaded/instantiated via assetbundles and in combination with some other functionality, we receive the error I provided. This probably seems obvious based on the stack trace but we had to test various primitive types and exclude the call altogether to confirm. Unfortunately, that's all the info I can really provide on this.

    FWIW, instantiating a prefab of the object (instead of using CreatePrimitive each type) has solved the issue in WebGL.