Hi, I am trying to load a RevMob banner Ad from the background thread but it doesnt work and crashes the android game… This is how i do it:
private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
{ “Android”, “MYID”},
{ “IOS”, “copy your iOS RevMob Media ID here” }
};
static RevMob revmob;
static RevMobBanner banner;
public void Start ()
{
revmob = RevMob.Start(REVMOB_APP_IDS, “Main Camera”);
}
public void PowerUpsButtonClick ()
{
// other code
StartCoroutine (StartExamples ());
}
IEnumerator StartExamples()
{
Task task;
this.StartCoroutineAsync(Blocking(), out task);
yield return StartCoroutine(task.Wait());
}
IEnumerator Blocking()
{
LogAsync(“Revmob loading banner”);
if( revmob != null) {
banner = revmob.CreateBanner(RevMob.Position.BOTTOM, 0, 0, Screen.width, 170);
}
LogAsync(“Jump to main thread.”);
yield return Ninja.JumpToUnity;
banner.Show ();
}
The game crashes out and I get the error :
10-31 14:51:12.496: E/dalvikvm(10886): JNI ERROR (app bug): accessed stale local reference 0x1d200001 (index 0 in a table of size 0)
10-31 14:51:12.496: E/dalvikvm(10886): VM aborting
10-31 14:51:12.716: E/MP-Decision(2179): num online cores: 2 reqd : 1 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 26
10-31 14:51:12.716: E/MP-Decision(2179): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 rq:0.000000 seq:197.000000
10-31 14:51:13.377: A/libc(10886): Fatal signal 6 (SIGABRT) at 0x00002a86 (code=-6), thread 12633 (GC_start_routin)
Can you pls help me out on this one ?