Log in or register to post comments

Exception in Callback

SDK 10.0
October 5, 2021 - 4:42am #1

Hello,

I am currently trying to create an AR-App in Unity (2020.3.19f) which uses virtual buttons to open

links to websites. However once I start the programm and press the buttons I get the following Error:

Exception in callback: Failed to create VirtualButtonObserver: INVALID_AREA.

UnityEngine.Debug:LogErrorFormat (string,object[])

Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[])

Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling (System.Action)

Vuforia.Internal.Core.Engine:OnStart ()

Vuforia.Internal.Core.Engine:Start (System.Action)

Vuforia.Internal.Core.Engine:Start ()

Vuforia.VuforiaBehaviour:VuforiaInitialized (Vuforia.VuforiaInitError)

System.Delegate:DynamicInvoke (object[])

Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[])

Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling<Vuforia.VuforiaInitError> (System.Action`1<Vuforia.VuforiaInitError>,Vuforia.VuforiaInitError)

Vuforia.Internal.Core.Engine:InitOnCameraReady ()

Vuforia.WebCam:HandleFirstWebCamFrame ()

Vuforia.WebCam:<Init>b__32_0 (bool)

Vuforia.Internal.Utility.VuforiaCoroutineUtility/<RunCoroutineWithTimeout>d__1:MoveNext ()

UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

I havent found anything about this on the web, so has anyone here ever run into this problem?

I use the following script for the button:



using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.Events;

using Vuforia;

public class btn_open : MonoBehaviour

{

    public GameObject btn;

    public string URL;



    // Start is called before the first frame update

    void Start()

    {

        btn = GameObject.Find("Testbutton");

        btn.GetComponent<VirtualButtonBehaviour>().RegisterOnButtonPressed(OnButtonPressed);

    }

        void OnButtonPressed(VirtualButtonBehaviour vb) {

        Application.OpenURL("https://www.youtube.com/watch?v=RNTiiliYcOU");

    }

    // Update is called once per frame

    void Update()

    {

       

    }

}

 

SDK Version: 

Exception in Callback

October 7, 2021 - 9:51am #3

Hello @Jorg99,

Additionally, it would be good to get a screenshot of the VirtualButton Transform. The error suggests that something is wrong with how the GO was set up.

Thanks,

Vuforia Engine Support

Exception in Callback

October 6, 2021 - 9:38am #2

Hello,

Did you add the Virtual Button functionality via the VirtualButtonBehaviour script?

https://library.vuforia.com/articles/Solution/How-To-Implement-Virtual-Buttons.html (see bottom of page)

Thanks,

Vuforia Engine Support

Log in or register to post comments