Home » Android » unity3d – Android app built using unity crashing.How to get the error logs and solve the issue?-Exceptionshub

unity3d – Android app built using unity crashing.How to get the error logs and solve the issue?-Exceptionshub

Posted by: admin February 26, 2020 Leave a comment

Questions:

I have created an app which uses a custom plugin to open the gallery.Once the image is retrieved it is converted to a string using Convert.ToBase64String and then saved into a .json file along with other images and text data.I reconvert them using Convert.FromBase64String to byte array and load them back as texture to images.It saves and displays images along with some text data.I have saved a lot of .json files.

The app crashes when I show the data.I open the saved .json files and displays the images and text a few times suddenly it does not read any images and crashes.I used terminal and added android-sdk tools path and used command ‘adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG’ to get errors.While app is crashing I am getting these lines shown below.

02-17 17:34:27.854  1520  5378 I ActivityManager: Process com.samsung.mlp (pid 30795) has died: cch+6CEM (380,378)
02-17 17:34:27.913  1520  7079 I ActivityManager: Process com.samsung.storyservice (pid 30823) has died: cch+6CEM (383,378)
02-17 17:34:28.470  1520  7079 W ActivityManager: crash : com.Test.LearningProjects,0
02-17 17:34:28.472  1520  7079 W ActivityManager:   Force finishing activity com.Test.LearningProjects/com.unity3d.player.UnityPlayerActivity
02-17 17:34:28.493  1520  1805 D ActivityManager: package  com.samsung.android.lool, user - 0 is SDcard whitelisted
02-17 17:34:28.528  1520  1805 I ActivityManager: Start proc 30899:com.samsung.android.lool/1000 for broadcast com.samsung.android.lool/com.samsung.android.sm.common.SmartManagerReceiver
02-17 17:34:28.541  1520  1817 I ActivityManager: Showing crash dialog for package com.Test.LearningProjects u0
02-17 17:34:28.608  1520  9837 D PackageManager: getSelectedMetaData : packageName(com.Test.LearningProjects) or Metadata strings {[Ljava.lang.String;@620f3e2}
02-17 17:34:28.639  1520  9834 I ActivityManager: DSS on for com.samsung.android.lool and scale is 1.0
02-17 17:34:28.840  1520  9837 D ActivityManager: package  com.samsung.android.lool, user - 0 is SDcard whitelisted
02-17 17:34:28.869  1520  9837 I ActivityManager: Start proc 30927:com.samsung.android.sm.provider/1000 for content provider com.samsung.android.lool/com.samsung.android.sm.database.SmProvider
02-17 17:34:28.869  1520  7007 I ActivityManager: Process com.samsung.dcmservice (pid 30846) has died: cch+6CEM (319,393)
02-17 17:34:28.899  1520  7007 I ActivityManager: DSS on for com.samsung.android.lool and scale is 1.0
02-17 17:34:28.977  1520  1805 W ActivityManager: Activity pause timeout for ActivityRecord{34f268d u0 com.Test.LearningProjects/com.unity3d.player.UnityPlayerActivity t219 f}
02-17 17:34:28.990  1520  1805 D ActivityManager: isScaleDownAnimationEnabled() : true
02-17 17:34:28.990  1520  1805 D ActivityManager: clearAppIconInfo()
02-17 17:34:28.990  1520  1805 D ActivityManager: applyOptionsLocked, ANIM_CUSTOM_SCALE_DOWN
02-17 17:34:29.125  1520  5378 D ActivityManager: post active user change for 0 fullscreen true isHomeActivity() true
02-17 17:34:29.248  1520  9837 I ActivityManager: Process com.samsung.enhanceservice (pid 30867) has died: cch+6CEM (302,392)
02-17 17:34:29.431  1520  9837 I ActivityManager: Process com.samsung.android.mobileservice (pid 26806) has died: cch+6CEM (306,377)
02-17 17:34:32.504 30688 30688 W Unity   : Timeout while trying to pause the Unity Engine.

I have connected to AndroidStudio and from its logcat I get the following messages.Not sure whether these are the errors.How to know what are the errors.

2020-02-17 18:02:01.035 1520-2395/? D/InputReader: Input event(6): value=1 when=10645783383000
2020-02-17 18:02:01.035 1520-2395/? D/InputReader: Input event(6): value=1 when=10645783383000
2020-02-17 18:02:01.035 1520-2395/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.541 ] when=10645783383000
2020-02-17 18:02:01.036 1520-2394/? I/InputDispatcher: Delivering touch to (2221): action: 0x0, toolType: 1
2020-02-17 18:02:01.036 2221-2221/? D/[email protected][UnityPlayerActivity]: ViewPostIme pointer 0
2020-02-17 18:02:01.149 31580-31621/? D/ContactsProvider_EventLog: contents_sample_state: [CONTACT contacts(6) data(12) accounts({vnd.sec.contact.phone (1)=6}) accounts deleted({}) calls([]) countryIso(IN) userId(0)  ]
   contents_sample_state: [ agr({[1]=6})  ]
   contents_sample_state: [ actCnt({android.process.acore(31580)=1})  ]
   contents_sample_state: [PROFILE contacts(0) data(0) accounts({})  ]
   contents_sample_state: [SAPROFILE contacts(1) data(1) accounts({vnd.sec.contact.phone (1)=1})  ]
2020-02-17 18:02:01.153 31580-31621/? E/ContactsProvider_EventLog: Flush buffer to file cnt : 1 size : 0Kb duration : 2ms lastUpdatedAfter : 60094 ms mFlush_time_threasold : 2000 mCurrentSize : 473
2020-02-17 18:02:01.178 1520-5409/? D/SSRM:r: SIOP:: AP = 450, PST = 440 (W:6), BAT = 339, CHG = 399
2020-02-17 18:02:01.193 1033-30476/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;outDevice
2020-02-17 18:02:01.193 1033-30476/? V/APM_AudioPolicyManager: getNewOutputDevice() selected device 0
2020-02-17 18:02:01.193 1033-30476/? V/APM_AudioPolicyManager: 

Answer:

curdevice : 2 2020-02-17 18:02:01.193 1033-30476/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;outDevice 2020-02-17 18:02:01.194 1033-30476/? V/APM_AudioPolicyManager: getNewOutputDevice() selected device 0 2020-02-17 18:02:01.194 1033-30476/? V/APM_AudioPolicyManager:

Answer:

curdevice : 2 2020-02-17 18:02:01.195 1033-30476/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;outDevice 2020-02-17 18:02:01.195 1033-30476/? V/APM_AudioPolicyManager: getNewOutputDevice() selected device 0 2020-02-17 18:02:01.195 1033-30476/? V/APM_AudioPolicyManager:

Answer:

curdevice : 2 2020-02-17 18:02:01.198 1520-2395/? D/InputReader: Input event(6): value=0 when=10645947971000 2020-02-17 18:02:01.198 1520-2395/? D/InputReader: Input event(6): value=0 when=10645947971000 2020-02-17 18:02:01.200 1520-2395/? I/InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=10645947971000 2020-02-17 18:02:01.201 1520-2394/? I/InputDispatcher: Delivering touch to (2221): action: 0x1, toolType: 1 2020-02-17 18:02:01.203 2221-2221/? D/[email protected][UnityPlayerActivity]: ViewPostIme pointer 1 2020-02-17 18:02:01.208 1033-30476/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;activeStream 2020-02-17 18:02:01.208 1033-30476/? V/APM_AudioPolicyManager:

Answer:

active stream : 8 2020-02-17 18:02:01.209 1520-5409/? D/AudioService: active stream is 0x8 2020-02-17 18:02:01.231 1033-30476/? V/APM_AudioPolicyManager: getAudioPolicyConfig: audioParam;activeStream 2020-02-17 18:02:01.231 1033-30476/? V/APM_AudioPolicyManager:

Answer:

active stream : 8 2020-02-17 18:02:01.231 1520-5409/? D/AudioService: active stream is 0x8 2020-02-17 18:02:01.231 1520-5409/? D/AudioService: GetAppDevice, uid=1000 2020-02-17 18:02:01.231 1520-5409/? D/AudioService: getStreamVolume 3 index 70 2020-02-17 18:02:01.448 2221-2265/? W/Adreno-GSL: <sharedmem_gpuobj_alloc:2337>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory 2020-02-17 18:02:01.451 1520-1981/? W/StorageManager: getStorageFullBytes DEFAULT_FULL_THRESHOLD_BYTES : 20971520, threadhold : 20971520 2020-02-17 18:02:01.452 1520-1981/? W/StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1272704614, maxLowBytes : 524288000 2020-02-17 18:02:01.455 1520-1981/? W/DeviceStorageMonitorService: updateBroadcasts(/data) oldLevel:0, newLevel:0, seq:1 2020-02-17 18:02:01.456 1520-1981/? W/DeviceStorageMonitorService: updateBroadcasts_filenode(/data) fn_oldLevel:0, fn_newLevel:0, seq:1 2020-02-17 18:02:01.457 2221-2265/? E/Adreno-GSL: <gsl_memory_alloc_pure:2203>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2020-02-17 18:02:01.459 2221-2265/? W/Adreno-GSL: <sharedmem_gpuobj_alloc:2337>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory 2020-02-17 18:02:01.467 2221-2265/? E/Adreno-GSL: <gsl_memory_alloc_pure:2203>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed. 2020-02-17 18:02:01.707 739-739/? I/[email protected]: getLinkLayerStats

My doubt is it is because of the conversion.If I take small size images[already converted and saved into .json file] it gets loaded quickly but if I choose from camera gallery[which is converted and saved into .json file] it takes some time to load.Is it because of the conversion after showing a couple of images it hangs and crashes.Maybe it is still hanging on the background while I display other set of images?I have saved a .json file which consists of three images from camera gallery.The size of that .json file is round 8mb.A sample of my saved .json file.Sample .json file

How to&Answers: