App Android crashing randomly

Mateus.3025Mateus.3025 USMember ✭✭
edited January 2018 in Xamarin.Forms

Log crash from LogCat:
12-15 11:39:16.102 2173 2173 E audit : type=1701 msg=audit(1513345156.092:359): auid=4294967295 uid=10271 gid=10271 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=28543 comm=546872656164706F6F6C20776F726B reason="memory violation" sig=11

12-15 11:39:16.282 847 2128 D GraphicsStats: Buffer count: 12

12-15 11:39:16.282 314 382 D libEGL : eglTerminate EGLDisplay = 0xb65bf6fc

12-15 11:39:16.282 314 382 D libEGL : eglTerminate EGLDisplay = 0xb65bf6fc

12-15 11:39:16.282 314 382 I SurfaceFlinger: id=239 Removed NainActivit (5/7)

12-15 11:39:16.282 314 1308 I SurfaceFlinger: id=239 Removed NainActivit (-2/7)

12-15 11:39:16.282 314 314 D libEGL : eglTerminate EGLDisplay = 0xbe8683a4

12-15 11:39:16.282 847 1401 I WindowState: WIN DEATH: Window{b068f7c u0 d0 xx.xxx.mypackage/md596454a66b4b64dc6a9d4ad4b5c8b403f.MainActivity}

12-15 11:39:16.282 847 2128 I ActivityManager: Process xx.xxx.mypackage (pid 28142)(adj 0) has died(280,374)

12-15 11:39:16.282 847 2128 D ActivityManager: cleanUpApplicationRecord -- 28142

12-15 11:39:16.292 847 1401 D InputDispatcher: Focus left window: 28142

12-15 11:39:16.292 847 2128 D ActivityManager: isAutoRunBlockedApp:: xx.xxx.mypackaged, Auto Run ON

12-15 11:39:16.292 847 2128 W ActivityManager: Force removing ActivityRecord{bd9de50 u0 xx.xxx.mypackage/md596454a66b4b64dc6a9d4ad4b5c8b403f.MainActivity t30}: app died, no saved state

12-15 11:39:16.302 377 377 I Zygote : Process 28142 exited due to signal (11)

Packages config Droid project:
<?xml version="1.0" encoding="utf-8"?>
packages
package id="CarouselView.FormsPlugin" version="4.4.2" targetFramework="monoandroid71" /
package id="DryIoc.dll" version="2.10.1" targetFramework="monoandroid80" /
package id="Microsoft.AppCenter" version="1.1.0" targetFramework="monoandroid80" /
package id="Microsoft.AppCenter.Analytics" version="1.1.0" targetFramework="monoandroid80" /
package id="Microsoft.AppCenter.Crashes" version="1.1.0" targetFramework="monoandroid80" /
package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid80" /
package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid80" /
package id="Microsoft.Net.Http" version="2.2.29" targetFramework="monoandroid80"
package id="Microsoft.NETCore.Platforms" version="1.0.1" targetFramework="monoandroid71" /
package id="Microsoft.Win32.Primitives" version="4.0.1" targetFramework="monoandroid71" /
package id="NETStandard.Library" version="1.6.0" targetFramework="monoandroid71" /
package id="OxyPlot.Core" version="1.0.0" targetFramework="monoandroid71" /
package id="OxyPlot.Xamarin.Android" version="1.0.0" targetFramework="monoandroid71" /
package id="OxyPlot.Xamarin.Forms" version="1.0.0" targetFramework="monoandroid71" /
package id="PCLCrypto" version="2.0.147" targetFramework="monoandroid71" /
package id="PInvoke.BCrypt" version="0.3.2" targetFramework="monoandroid71" /
package id="PInvoke.Kernel32" version="0.3.2" targetFramework="monoandroid71" /
package id="PInvoke.NCrypt" version="0.3.2" targetFramework="monoandroid71" /
package id="PInvoke.Windows.Core" version="0.3.2" targetFramework="monoandroid71" /
package id="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid71" /
package id="Plugin.Fingerprint" version="1.4.5" targetFramework="monoandroid71" /
package id="Plugin.Share" version="7.0.2-beta27" targetFramework="monoandroid71" /
ackage id="Prism.Core" version="6.3.0" targetFramework="monoandroid71" /
package id="Prism.DryIoc.Forms" version="6.3.0.1" targetFramework="monoandroid80" /
package id="Prism.Forms" version="6.3.0" targetFramework="monoandroid71" /
package id="System.AppContext" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Collections" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Collections.Concurrent" version="4.0.12" targetFramework="monoandroid71" /
package id="System.Console" version="4.0.0" targetFramework="monoandroid71" /
package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Diagnostics.Tools" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Diagnostics.Tracing" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Globalization" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Globalization.Calendars" version="4.0.1" targetFramework="monoandroid71" /
package id="System.IO" version="4.1.0" targetFramework="monoandroid71" /
package id="System.IO.Compression" version="4.1.0" targetFramework="monoandroid71" /
package id="System.IO.Compression.ZipFile" version="4.0.1" targetFramework="monoandroid71" /
ackage id="System.IO.FileSystem" version="4.0.1" targetFramework="monoandroid71" /
package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Linq" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Linq.Expressions" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Net.Http" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Net.Primitives" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Net.Sockets" version="4.1.0" targetFramework="monoandroid71" /
package id="System.ObjectModel" version="4.0.12" targetFramework="monoandroid71" /
package id="System.Reflection" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Reflection.Extensions" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Reflection.Primitives" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Resources.ResourceManager" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Runtime" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Runtime.Extensions" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Runtime.Handles" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" targetFramework="monoandroid71" /
package id="System.Runtime.Numerics" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Security.Cryptography.Algorithms" version="4.2.0" targetFramework="monoandroid71" /
package id="System.Security.Cryptography.Encoding" version="4.0.0" targetFramework="monoandroid71" /
package id="System.Security.Cryptography.Primitives" version="4.0.0" targetFramework="monoandroid71"
package id="System.Security.Cryptography.X509Certificates" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Text.Encoding" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Text.Encoding.Extensions" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Text.RegularExpressions" version="4.1.0" targetFramework="monoandroid71" /
package id="System.Threading" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Threading.Tasks" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Threading.Timer" version="4.0.1" targetFramework="monoandroid71" /
package id="System.Xml.ReaderWriter" version="4.0.11" targetFramework="monoandroid71" /
package id="System.Xml.XDocument" version="4.0.11" targetFramework="monoandroid71" /
package id="Validation" version="2.2.8" targetFramework="monoandroid71" /
package id="Xam.Plugin.Connectivity" version="2.3.0" targetFramework="monoandroid71" /
package id="Xam.Plugins.Settings" version="2.5.8" targetFramework="monoandroid71" /
package id="Xamarin.Android.Arch.Core.Common" version="1.0.0" targetFramework="monoandroid80" /
package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.0" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Annotations" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Compat" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Core.UI" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Core.Utils" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.CustomTabs" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Design" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Fragment" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Media.Compat" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.Transition" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v4" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v7.AppCompat" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v7.CardView" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v7.MediaRouter" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v7.Palette" version="26.1.0.1" targetFramework="monoandroid80" /
package id="Xamarin.Android.Support.v7.RecyclerView" version="26.1.0.1" targetFramework="monoandroid80" />
package id="Xamarin.Android.Support.Vector.Drawable" version="26.1.0.1" targetFramework="monoandroid80" />
package id="Xamarin.Auth" version="1.5.0.3" targetFramework="monoandroid80" />
package id="Xamarin.Build.Download" version="0.4.7" targetFramework="monoandroid80" />
package id="Xamarin.FFImageLoading" version="2.2.9" targetFramework="monoandroid71" />
package id="Xamarin.FFImageLoading.Forms" version="2.2.9" targetFramework="monoandroid71" />
package id="Xamarin.Forms" version="2.3.4.247" targetFramework="monoandroid71" />
/packages>

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Reason="memory violation" sig=11
    12-15 11:39:16.282 847 2128 D GraphicsStats: Buffer count: 12

    Not much to go on but I'd guess you're doing some low-level graphics work... maybe something in a custom renderer?
    Then then your code starts working with memory beyond what it should be and thus... Memory violation.
    So you're trying to draw something... then start drawing completely off the screen memory for example.
    Like I said... little to go on... so just a guess.

  • Mateus.3025Mateus.3025 USMember ✭✭
    edited January 2018

    We use custom render for all Button, Entry, Picker.
    We also have specific points for DatePicker and Entry in decimal format.
    We have for Button and Label using awesome font icons.
    We use custom render on list items(listview) on multiple screens.

    What would be your suggestion?

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited January 2018

    We use custom render for all Button, Entry, Picker.
    We also have specific points for DatePicker and Entry in decimal format.

    Sounds extreme and kinda against the whole idea of trying to keep as MUCH code agnostic in the common project and as LITTLE as possible in the platform projects. But I don't know your company's reason for it, so {shrug}.

    What would be your suggestion?

    Breakpoints, logging and debugging. No silver bullet. Just good old fashioned developer time to track it down.
    Maybe disable all the custom renderers and see if it still happens. That at least points at the renderers.
    Then add in just the button renderer. Still happen?
    Add in the Entry renderer. Still happen?

    Hopefully you have it in source control (TFS for example) and can point a build that didn't crash and one where it did, and start with new items that were added.

  • Mateus.3025Mateus.3025 USMember ✭✭

    Thanks Clint, I'll try this option to remove custom renderers and test if it still happens.

Sign In or Register to comment.