I am making a POS application for my company. I am running into an issue where after several transactions (varries per device) the app will crash from an unhandled java runtime exception.
The same views are loaded, with slightly different data, in the same sequence. The views are then poped using PopToRootAsync() so a user can navigate through the process again.
After 3-5 transactions depending on the device, the app will crash, giving this debug output:
08-06 04:05:51.607 D/dalvikvm( 2573): GC_EXPLICIT freed 104K, 3% free 20817K/21264K, paused 1ms+0ms, total 5ms
08-06 04:05:51.611 D/Mono ( 2573): GC_BRIDGE num-objects 41 num_hash_entries 3721 sccs size 2148 init 0.00ms df1 2.31ms sort 3.04ms dfs2 0.71ms setup-cb 0.07ms free-data 0.32ms user-cb 5.53ms clenanup 0.04ms links 96439/96439/35448/3 dfs passes 157172/132162
08-06 04:05:51.611 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 4.25ms, total 4.36ms, bridge 9.83ms promoted 432K major 8544K los 9481K
08-06 04:05:51.767 D/dalvikvm( 2573): GC_EXPLICIT freed 90K, 2% free 20842K/21264K, paused 0ms+0ms, total 5ms
08-06 04:05:51.767 D/Mono ( 2573): GC_BRIDGE num-objects 21 num_hash_entries 21 sccs size 21 init 0.00ms df1 0.00ms sort 0.02ms dfs2 0.04ms setup-cb 0.00ms free-data 0.00ms user-cb 5.06ms clenanup 0.03ms links 96439/96439/35448/3 dfs passes 157214/132183
08-06 04:05:51.767 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.15ms, total 1.17ms, bridge 5.40ms promoted 32K major 8576K los 10057K
08-06 04:05:51.935 D/dalvikvm( 2573): GC_EXPLICIT freed 98K, 2% free 20873K/21264K, paused 1ms+0ms, total 4ms
08-06 04:05:51.935 D/Mono ( 2573): GC_BRIDGE num-objects 21 num_hash_entries 21 sccs size 21 init 0.00ms df1 0.03ms sort 0.02ms dfs2 0.04ms setup-cb 0.00ms free-data 0.00ms user-cb 3.84ms clenanup 0.02ms links 96439/96439/35448/3 dfs passes 157256/132204
08-06 04:05:51.939 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.23ms, total 1.26ms, bridge 4.30ms promoted 80K major 8656K los 10369K
08-06 04:05:52.111 D/dalvikvm( 2573): GC_EXPLICIT freed 101K, 2% free 20883K/21264K, paused 0ms+0ms, total 5ms
08-06 04:05:52.111 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.02ms sort 0.00ms dfs2 0.02ms setup-cb 0.00ms free-data 0.00ms user-cb 5.14ms clenanup 0.01ms links 96439/96439/35448/3 dfs passes 157270/132211
08-06 04:05:52.111 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 0.88ms, total 0.91ms, bridge 5.43ms promoted 16K major 8672K los 10673K
08-06 04:05:52.299 D/dalvikvm( 2573): GC_EXPLICIT freed 111K, 2% free 20903K/21264K, paused 0ms+0ms, total 4ms
08-06 04:05:52.299 D/Mono ( 2573): GC_BRIDGE num-objects 14 num_hash_entries 14 sccs size 14 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.04ms setup-cb 0.00ms free-data 0.00ms user-cb 4.56ms clenanup 0.01ms links 96439/96439/35448/3 dfs passes 157298/132225
08-06 04:05:52.299 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.12ms, total 1.15ms, bridge 4.84ms promoted 80K major 8752K los 10825K
08-06 04:05:52.467 D/dalvikvm( 2573): GC_EXPLICIT freed 103K, 2% free 20913K/21264K, paused 1ms+0ms, total 4ms
08-06 04:05:52.467 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.02ms setup-cb 0.00ms free-data 0.00ms user-cb 4.09ms clenanup 0.01ms links 96439/96439/35448/3 dfs passes 157312/132232
08-06 04:05:52.471 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.03ms, total 1.06ms, bridge 5.03ms promoted 0K major 8752K los 11129K
08-06 04:05:52.647 D/dalvikvm( 2573): GC_EXPLICIT freed 108K, 2% free 20934K/21264K, paused 1ms+0ms, total 4ms
08-06 04:05:52.647 D/Mono ( 2573): GC_BRIDGE num-objects 13 num_hash_entries 13 sccs size 13 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 3.94ms clenanup 0.01ms links 96439/96439/35448/3 dfs passes 157338/132245
08-06 04:05:52.651 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.53ms, total 1.56ms, bridge 4.38ms promoted 48K major 8800K los 11281K
08-06 04:05:52.831 D/dalvikvm( 2573): GC_EXPLICIT freed 109K, 2% free 20944K/21264K, paused 0ms+1ms, total 4ms
08-06 04:05:52.831 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 8 sccs size 8 init 0.00ms df1 0.06ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.01ms user-cb 4.46ms clenanup 0.02ms links 96440/96440/35449/3 dfs passes 157354/132254
08-06 04:05:52.831 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.39ms, total 1.40ms, bridge 4.80ms promoted 64K major 8864K los 11433K
08-06 04:05:53.019 D/dalvikvm( 2573): GC_EXPLICIT freed 111K, 2% free 20954K/21264K, paused 0ms+0ms, total 3ms
08-06 04:05:53.019 D/Mono ( 2573): GC_BRIDGE num-objects 8 num_hash_entries 9 sccs size 9 init 0.00ms df1 0.03ms sort 0.01ms dfs2 0.03ms setup-cb 0.00ms free-data 0.01ms user-cb 3.63ms clenanup 0.01ms links 96441/96441/35450/3 dfs passes 157372/132264
08-06 04:05:53.019 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.10ms, total 1.14ms, bridge 4.05ms promoted 16K major 8880K los 11586K
08-06 04:05:53.199 D/dalvikvm( 2573): GC_EXPLICIT freed 110K, 2% free 20964K/21264K, paused 1ms+0ms, total 4ms
08-06 04:05:53.199 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 4.19ms clenanup 0.01ms links 96441/96441/35450/3 dfs passes 157386/132271
08-06 04:05:53.203 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.86ms, total 1.89ms, bridge 4.43ms promoted 16K major 8896K los 11738K
08-06 04:05:53.387 D/dalvikvm( 2573): GC_EXPLICIT freed 110K, 2% free 20974K/21264K, paused 0ms+0ms, total 5ms
08-06 04:05:53.387 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 5.03ms clenanup 0.01ms links 96441/96441/35450/3 dfs passes 157400/132278
08-06 04:05:53.387 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.10ms, total 1.13ms, bridge 5.31ms promoted 0K major 8896K los 11890K
08-06 04:05:53.567 D/dalvikvm( 2573): GC_EXPLICIT freed 110K, 2% free 20984K/21264K, paused 0ms+0ms, total 4ms
08-06 04:05:53.567 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.02ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 4.27ms clenanup 0.01ms links 96441/96441/35450/3 dfs passes 157414/132285
08-06 04:05:53.567 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.07ms, total 1.10ms, bridge 4.55ms promoted 32K major 8928K los 12042K
08-06 04:05:53.747 D/dalvikvm( 2573): GC_EXPLICIT freed 109K, 2% free 20994K/21264K, paused 0ms+0ms, total 3ms
08-06 04:05:53.747 D/Mono ( 2573): GC_BRIDGE num-objects 6 num_hash_entries 6 sccs size 6 init 0.00ms df1 0.06ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 3.71ms clenanup 0.01ms links 96441/96441/35450/3 dfs passes 157426/132291
08-06 04:05:53.747 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.46ms, total 1.46ms, bridge 4.16ms promoted 32K major 8960K los 12194K
08-06 04:05:53.935 D/dalvikvm( 2573): GC_EXPLICIT freed 110K, 2% free 21004K/21264K, paused 0ms+0ms, total 4ms
08-06 04:05:53.935 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 8 sccs size 8 init 0.00ms df1 0.02ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 4.17ms clenanup 0.01ms links 96442/96442/35451/3 dfs passes 157442/132300
08-06 04:05:53.935 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.13ms, total 1.18ms, bridge 4.60ms promoted 32K major 8992K los 12346K
08-06 04:05:54.123 D/dalvikvm( 2573): GC_EXPLICIT freed 110K, 2% free 21014K/21264K, paused 0ms+1ms, total 5ms
08-06 04:05:54.123 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 8 sccs size 8 init 0.00ms df1 0.00ms sort 0.00ms dfs2 0.00ms setup-cb 0.00ms free-data 0.00ms user-cb 4.84ms clenanup 0.01ms links 96443/96443/35452/3 dfs passes 157458/132309
08-06 04:05:54.123 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.53ms, total 1.53ms, bridge 5.07ms promoted 16K major 9008K los 12498K
08-06 04:05:54.307 D/dalvikvm( 2573): GC_EXPLICIT freed 112K, 2% free 21014K/21264K, paused 0ms+1ms, total 4ms
08-06 04:05:54.307 D/Mono ( 2573): GC_BRIDGE num-objects 1 num_hash_entries 2 sccs size 2 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.00ms setup-cb 0.00ms free-data 0.01ms user-cb 4.18ms clenanup 0.01ms links 96444/96444/35453/3 dfs passes 157462/132312
08-06 04:05:54.307 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.89ms, total 1.15ms, bridge 4.44ms promoted 0K major 9008K los 12618K
08-06 04:05:54.495 D/dalvikvm( 2573): GC_EXPLICIT freed 116K, 2% free 21025K/21264K, paused 0ms+0ms, total 3ms
08-06 04:05:54.495 D/Mono ( 2573): GC_BRIDGE num-objects 7 num_hash_entries 7 sccs size 7 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 3.93ms clenanup 0.01ms links 96444/96444/35453/3 dfs passes 157476/132319
08-06 04:05:54.495 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.82ms, total 1.85ms, bridge 4.34ms promoted 16K major 9024K los 12650K
08-06 04:05:54.675 D/dalvikvm( 2573): GC_EXPLICIT freed 109K, 2% free 21035K/21264K, paused 1ms+0ms, total 5ms
08-06 04:05:54.675 D/Mono ( 2573): GC_BRIDGE num-objects 6 num_hash_entries 6 sccs size 6 init 0.00ms df1 0.03ms sort 0.00ms dfs2 0.03ms setup-cb 0.00ms free-data 0.00ms user-cb 4.33ms clenanup 0.01ms links 96444/96444/35453/3 dfs passes 157488/132325
08-06 04:05:54.675 D/Mono ( 2573): GC_MINOR: (Nursery full) pause 1.14ms, total 1.17ms, bridge 4.61ms promoted 48K major 9072K los 12802K
08-06 04:05:54.835 D/dalvikvm( 2573): GC_EXPLICIT freed 659K, 4% free 20466K/21264K, paused 1ms+1ms, total 6ms
08-06 04:05:54.835 D/Mono ( 2573): GC_BRIDGE num-objects 681 num_hash_entries 14158 sccs size 8284 init 0.00ms df1 7.20ms sort 16.19ms dfs2 2.32ms setup-cb 0.10ms free-data 0.97ms user-cb 9.91ms clenanup 0.44ms links 115589/115589/43399/3 dfs passes 191472/159754
08-06 04:05:54.835 D/Mono ( 2573): GC_MAJOR: (LOS overflow) pause 22.15ms, total 22.19ms, bridge 30.16ms major 5488K/9072K los 78K/12802K
In mgmain JNI_OnLoad
08-06 04:05:54.839 E/mono ( 2573):
08-06 04:05:54.839 E/mono ( 2573): Unhandled Exception:
08-06 04:05:54.839 E/mono ( 2573): at Java.Lang.Object.Finalize (08-06 04:05:54.839 E/mono ( 2573): System.ArgumentException: 'jobject' must not be IntPtr.Zero.
08-06 04:05:54.839 E/mono ( 2573): Parameter name: jobject
08-06 04:05:54.839 E/mono ( 2573): at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/163212a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:169
08-06 04:05:54.839 E/mono ( 2573): at Android.Widget.ImageView.get_Drawable () [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/163212a9/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Widget.ImageView.cs:511
08-06 04:05:54.839 E/mono ( 2573): at Xamarin.Forms.Platform.Android.ImageRenderer.Dispose (Boolean disposing) [0x00000] in :0
The program 'Mono' has exited with code 0 (0x0).
We are using xamforms 1.2.2 and are unsure if this issue persisted before. The issue is only with Android.
Any help is appreciated.