1

My app works perfectly fine both in debug and release mode. But in Google play store vitals section there are 3000+ crashes reported within a weeks time with stacktrace as shown below. I am not able to understand this log so as to locate the reason for so many crashes for almost every devices as reported in play store console. Kindly help.

android.runtime.JavaProxyThrowable: at SQLite.SQLite3.Prepare2 (SQLitePCL.sqlite3 db, System.String query) [0x0001b] in <e6176266e10e4143a13a15e20e5b743c>:0
at SQLite.SQLiteCommand.Prepare () [0x00011] in <e6176266e10e4143a13a15e20e5b743c>:0
at SQLite.SQLiteCommand.ExecuteScalar[T] () [0x00030] in <e6176266e10e4143a13a15e20e5b743c>:0
at SQLite.SQLiteConnection.ExecuteScalar[T] (System.String query, System.Object[] args) [0x0003a] in <e6176266e10e4143a13a15e20e5b743c>:0
at myPackageName.Database.GetIntQuery (System.String query) [0x0002a] in <809af0b6f0d1412384da8eba135166d9>:0
at myPackageName.OnDateTimeChangeReciever.OnReceive (Android.Content.Context context, Android.Content.Intent intent) [0x00032] in <809af0b6f0d1412384da8eba135166d9>:0
at Android.Content.BroadcastReceiver.n_OnReceive_Landroid_content_Context_Landroid_content_Intent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_context, System.IntPtr native_intent) [0x00017] in <cbbabc5429d44d1b8e99c2e5c70fc4fc>:0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr,intptr,intptr)
  at crc642451e40f8204bea1.OnDateTimeChangeReciever.n_onReceive (Native Method)
  at crc642451e40f8204bea1.OnDateTimeChangeReciever.onReceive (Unknown Source)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3989)
  at android.app.ActivityThread.access$1400 (ActivityThread.java:268)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1993)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:237)
  at android.app.ActivityThread.main (ActivityThread.java:7811)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1068)

Related code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V4.App;

namespace myPackageName
{
    [BroadcastReceiver]
    class OnDateTimeChangeReciever : BroadcastReceiver
    {
        public OnDateTimeChangeReciever()
        {

        }
        public override void OnReceive(Context context, Intent intent)
        {
            if (intent.Action.Equals(Intent.ActionDateChanged) || intent.Action.Equals(Intent.ActionTimeChanged))
            {
                Intializer i = new Intializer();
                Database db = new Database();
                MyGlobals.ShowTimes = db.GetIntQuery("select value from Prayer where id =14");
                double latcheck = db.GetDoubleQuery("select value from PraySettings where id =22");
                double lngcheck = db.GetDoubleQuery("select value from PraySettings where id =23");
                if (MyGlobals.ShowTimes == 1 & MyGlobals.Latitude != 99999999 & MyGlobals.Logitude != 99999999)
                {
                    i.SetNextAlarm(context, 666);
                }
                if (db.GetIntQuery("Select value from Settings where id =15;").ToString() == "1")
                {
                    i.SetAlarm(context, 08, 00, 00, 1);
                }
                if (db.GetIntQuery("Select value from Settings where id =16;").ToString() == "1")
                {
                    i.SetAlarm(context, 20, 00, 00, 2);
                }
                db = null;
                i = null;
            }
        }
    }


}

        public int GetIntQuery(string query) 
        {
            string dbPath = Path.Combine (
                System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal),
                "tzmpo_t.rar");

            int result = 0;
            if (File.Exists(dbPath))
            {
                using (var db = new SQLiteConnection(dbPath))
                {
                    result = db.ExecuteScalar<int> (query);

                    db.Close();
                } 


            }
            return result;


        }
Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
Ovais Khan
  • 205
  • 2
  • 16
  • Someone please help, as it is urgent. – Ovais Khan Jun 01 '21 at 15:24
  • Isn't there more to this stack trace? Seems incomplete to me. – Cheesebaron Jun 02 '21 at 07:55
  • Nothing more than this. This is the only information that's in Google Play Console Vitals Section. – Ovais Khan Jun 02 '21 at 09:16
  • Well. I guess you could "fix" the crash with a try/catch around the code. In addition, I would consider adding some better crash reporting. This could be through AppCenter or some other service. This of course wouldn't fix the root cause, but perhaps provide you better insight into what is actually going wrong. – Cheesebaron Jun 02 '21 at 11:25

0 Answers0