Hi
I have a strange error:
i have two activity (main e playzone)
on main i have
in second activity i have
if i back to main and restart playzone activity several times (six or seven) i have this error
Installing file.
PackageAdded: package:com.regrid.beta
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = true **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:640)
at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper.Initialize(CanvasWrapper.java:76)
at com.regrid.beta.playzone._set_grid_new(playzone.java:3410)
at com.regrid.beta.playzone._activity_resume(playzone.java:599)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at com.regrid.beta.playzone.afterFirstLayout(playzone.java:104)
at com.regrid.beta.playzone.access$100(playzone.java:16)
at com.regrid.beta.playzone$WaitForLayout.run(playzone.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
at line 3410 i have
mostCurrent._pz_canvas1.Initialize((android.view.View)(mostCurrent._panel1.getObject()));
if i drop off admob (i use 2.0 library) everything works fine
i try in several way to overcome problem but result is the same, with admob crash, without all is well
Someone can help me ?
thanks
I have a strange error:
i have two activity (main e playzone)
on main i have
B4X:
StartActivity(playzone)
in second activity i have
B4X:
Sub Activity_Create(FirstTime As Boolean)
AdView1.Initialize("Ad", ".......................")
Activity.AddView(AdView1, 0dip, DipToCurrent(admobtop), DipToCurrent(admobwidth), 50dip)
AdView1.LoadAd
End Sub
Sub Activity_Resume
...
pz_canvas1.Initialize(panel1)
pz_canvas3.Initialize(panel3)
...
end sub
Installing file.
PackageAdded: package:com.regrid.beta
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = true **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
** Activity (playzone) Pause, UserClosed = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (playzone) Create, isFirst = false **
** Activity (playzone) Resume **
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:640)
at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper.Initialize(CanvasWrapper.java:76)
at com.regrid.beta.playzone._set_grid_new(playzone.java:3410)
at com.regrid.beta.playzone._activity_resume(playzone.java:599)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at com.regrid.beta.playzone.afterFirstLayout(playzone.java:104)
at com.regrid.beta.playzone.access$100(playzone.java:16)
at com.regrid.beta.playzone$WaitForLayout.run(playzone.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
at line 3410 i have
mostCurrent._pz_canvas1.Initialize((android.view.View)(mostCurrent._panel1.getObject()));
if i drop off admob (i use 2.0 library) everything works fine
i try in several way to overcome problem but result is the same, with admob crash, without all is well
Someone can help me ?
thanks
Last edited: