App keep stopping on some devices


#1

Hello all,

My App is keep stopping on some devices. Please Help me, I am posting the Logcat errors as well.

Blockquote: 09-03 00:34:10.675 10494 10516 E ConnectivityManager.CallbackHandler: callback n
ot found for RELEASED message
09-03 00:34:11.158 10494 10494 E ActivityThread: Activity com.android.settings.S
ettings$WifiSettingsActivity has leaked ServiceConnection android.bluetooth.Blue
toothPan$2@30e740a that was originally bound here
09-03 00:34:11.158 10494 10494 E ActivityThread: android.app.ServiceConnectionLe
aked: Activity com.android.settings.Settings$WifiSettingsActivity has leaked Ser
viceConnection android.bluetooth.BluetoothPan$2@30e740a that was originally boun
d here
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.LoadedApk
$ServiceDispatcher.(LoadedApk.java:1336)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.LoadedApk
.getServiceDispatcher(LoadedApk.java:1231)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ContextIm
pl.bindServiceCommon(ContextImpl.java:1478)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ContextIm
pl.bindServiceAsUser(ContextImpl.java:1458)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.content.Conte
xtWrapper.bindServiceAsUser(ContextWrapper.java:643)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.bluetooth.Blu
etoothPan.doBind(BluetoothPan.java:157)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.bluetooth.Blu
etoothPan.(BluetoothPan.java:145)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.bluetooth.Blu
etoothAdapter.getProfileProxy(BluetoothAdapter.java:1940)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.settingsl
ib.TetherAndWifiHelper.init(TetherAndWifiHelper.java:72)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.settingsl
ib.TetherAndWifiHelper.(TetherAndWifiHelper.java:57)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.settings.
wifi.WifiSettings.createWifiEnabler(WifiSettings.java:348)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.settings.
wifi.WifiSettings.onStart(WifiSettings.java:338)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.Fragment.
performStart(Fragment.java:2378)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.FragmentM
anagerImpl.moveToState(FragmentManager.java:1027)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.FragmentM
anagerImpl.moveToState(FragmentManager.java:1171)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.FragmentM
anagerImpl.moveToState(FragmentManager.java:1153)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.FragmentM
anagerImpl.dispatchStart(FragmentManager.java:2046)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.FragmentC
ontroller.dispatchStart(FragmentController.java:187)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.Activity.
performStart(Activity.java:6706)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ActivityT
hread.performLaunchActivity(ActivityThread.java:2634)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ActivityT
hread.handleLaunchActivity(ActivityThread.java:2736)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ActivityT
hread.-wrap12(ActivityThread.java)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ActivityT
hread$H.handleMessage(ActivityThread.java:1478)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.os.Handler.di
spatchMessage(Handler.java:102)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.os.Looper.loo
p(Looper.java:154)
09-03 00:34:11.158 10494 10494 E ActivityThread: at android.app.ActivityT
hread.main(ActivityThread.java:6154)
09-03 00:34:11.158 10494 10494 E ActivityThread: at java.lang.reflect.Met
hod.invoke(Native Method)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.internal.
os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
09-03 00:34:11.158 10494 10494 E ActivityThread: at com.android.internal.
os.ZygoteInit.main(ZygoteInit.java:757)
09-03 00:34:13.953 564 564 E cnss-daemon: Stale or unreachable neighbors, nd
m state: 4
09-03 00:34:26.026 3333 3333 E NEW_BHD : Open /sys/class/power_supply/gb_batte
ry
09-03 00:34:27.740 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.741 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.742 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.742 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.742 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.742 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.743 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.743 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.743 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.744 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.744 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.744 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.745 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.745 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.745 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.745 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.745 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.745 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.745 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.745 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.745 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.746 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.746 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.746 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:27.746 10349 10349 E FloatingButton: FloatingButton constructor
09-03 00:34:27.746 10349 10349 E FloatingButton: in create view is: null
09-03 00:34:27.746 10349 10349 E FloatingButton: in create. creating view
09-03 00:34:37.386 3362 3367 E ANDR-PERF-OPTSHANDLER: Failed to read /sys/devi
ces/system/cpu/cpu4/cpufreq/interactive/boost
09-03 00:34:37.387 3362 3367 E ANDR-PERF-RESOURCEQS: Failed to apply optimizat
ion [5, 1]
09-03 00:34:38.392 10349 10621 E AndroidRuntime: FATAL EXCEPTION: Thread-46
09-03 00:34:38.392 10349 10621 E AndroidRuntime: Process: com.rajput.tech.mathma
gic, PID: 10349
09-03 00:34:38.392 10349 10621 E AndroidRuntime: java.lang.OutOfMemoryError: Fai
led to allocate a 19356940 byte allocation with 14280520 free bytes and 13MB unt
il OOM
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at dalvik.system.VMRunti
me.newNonMovableArray(Native Method)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at android.graphics.Bitm
ap.nativeCreate(Native Method)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at android.graphics.Bitm
ap.createBitmap(Bitmap.java:905)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at android.graphics.Bitm
ap.createBitmap(Bitmap.java:882)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at android.graphics.Bitm
ap.createBitmap(Bitmap.java:813)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at android.graphics.Bitm
ap.createScaledBitmap(Bitmap.java:689)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at com.google.appinvento
r.components.runtime.util.MediaUtil$2.run(MediaUtil.java:514)
09-03 00:34:38.392 10349 10621 E AndroidRuntime: at java.lang.Thread.run(
Thread.java:761)
09-03 00:34:39.369 564 564 E cnss-daemon: gateway mac address: %02x:%02x:%02
x:%02x:%02x:%02x
09-03 00:34:39.369 564 564 E cnss-daemon: : 00:00:00:00:00:00
09-03 00:34:39.370 564 564 E cnss-daemon: Invalid mac address: 0x5565838110M
09-03 00:34:40.120 1271 2683 E ConnectivityService: RemoteException caught try
ing to send a callback msg for NetworkRequest [ id=437, legacyType=-1, [ Capabil
ities: INTERNET&NOT_RESTRICTED&TRUSTED] ]

Looking Forward for a positive reply soon.


#2

Search the community for OOM


#3

OK thanks for helping me out @Ken

I will do as instructed.


#4

see tip 1 and 2


Taifun


#5

Thanks @Taifun I have already designed and coded my app according to that. I am working on my app images . Compressing them well and also not adding too many images.

I am adding only one image and then editing my code to change the picture of Image1. I am sure it will work. I will let you know when I’ve done.

Will you please help me in another problem about sizing on different phones. I have set responsive sizing on screen1 but while testing my apk on different phones it’s showing different sizes.

Thanks all for your Help!