简体   繁体   English

Android Asynctask指纹错误

[英]android Asynctask fingerprint error

10-22 09:36:23.598 14313-14512/com.exampple.app A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 14512 (AsyncTask #5)
10-22 09:36:23.703 541-541/? A/DEBUG: *** *** *** *** *** *** *** *** ***    *** *** *** *** *** *** ***
10-22 09:36:23.703 541-541/? A/DEBUG: Build fingerprint: 'Xiaomi/hydrogen/hydrogen:6.0.1/MMB29M/V7.5.4.1.MBCMIDE:user/release-keys'
10-22 09:36:23.704 541-541/? A/DEBUG: Revision: '0'
10-22 09:36:23.704 541-541/? A/DEBUG: ABI: 'arm64'
10-22 09:36:23.704 541-541/? A/DEBUG: pid: 14313, tid: 14512, name: AsyncTask #5  >>> com.exampple.app <<<
10-22 09:36:23.705 541-541/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
10-22 09:36:23.730 541-541/? A/DEBUG:     x0   0000000000000000  x1   0000000000000000  x2   00000055831f5730  x3   000000558322c1e0
10-22 09:36:23.730 541-541/? A/DEBUG:     x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
10-22 09:36:23.730 541-541/? A/DEBUG:     x8   0000000000000403  x9   0000007fae1bda70  x10  0000000000000003  x11  0000000000000010
10-22 09:36:23.731 541-541/? A/DEBUG:     x12  0000007fae1bdaf8  x13  00000055830a1c70  x14  00000055829dd000  x15  00000000ebad607f
10-22 09:36:23.731 541-541/? A/DEBUG:     x16  0000007fae1b6a58  x17  0000000000000000  x18  00000055831f5730  x19  00000055831f57c8
10-22 09:36:23.731 541-541/? A/DEBUG:     x20  00000055831f5730  x21  0000007faae40000  x22  000000006ffaa648  x23  0000007f8b397208
10-22 09:36:23.731 541-541/? A/DEBUG:     x24  0000007f8b3972b8  x25  0000007f8b3972d8  x26  0000000070403aaf  x27  000000006ffaa648
10-22 09:36:23.731 541-541/? A/DEBUG:     x28  000000558325b330  x29  0000007f8b397180  x30  0000007faa941248
10-22 09:36:23.731 541-541/? A/DEBUG:     sp   0000007f8b397180  pc   0000007faac62b30  pstate 0000000020000000
10-22 09:36:23.734 541-541/? A/DEBUG: backtrace:
10-22 09:36:23.734 541-541/? A/DEBUG:     #00 pc 000000000044fb30  /system/lib64/libart.so (_ZN3art6Thread28PopDeoptimizationReturnValueEv+24)
10-22 09:36:23.734 541-541/? A/DEBUG:     #01 pc 000000000012e244  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+536)
10-22 09:36:23.734 541-541/? A/DEBUG:     #02 pc 000000000042b2a8  /system/lib64/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+460)
10-22 09:36:23.734 541-541/? A/DEBUG:     #03 pc 0000000000459954  /system/lib64/libart.so (_ZN3art6Thread14CreateCallbackEPv+744)
10-22 09:36:23.735 541-541/? A/DEBUG:     #04 pc 0000000000067754  /system/lib64/libc.so (_ZL15__pthread_startPv+52)
10-22 09:36:23.735 541-541/? A/DEBUG:     #05 pc 000000000001c644  /system/lib64/libc.so (__start_thread+16)
10-22 09:36:23.921 541-541/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_06
10-22 09:36:23.921 541-541/? E/DEBUG: AM write failed: Broken pipe
10-22 09:36:23.924 1245-15797/? E/ActivityManager: Invalid thumbnail dimensions: 0x0
10-22 09:36:23.931 4751-6427/? E/octvm_klo: read: Unexpected EOF!
10-22 09:36:24.062 1245-1287/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 60)
10-22 09:36:24.087 1245-3077/? E/InputDispatcher: channel 'b057529 com.exampple.app/com.exampple.app.fragmentbase.Activity_Login (server)' ~ Channel is unrecoverably broken and will be disposed!
10-22 09:36:24.095 4859-4863/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-22 09:36:24.096 4859-4863/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
10-22 09:36:27.078 4859-4863/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-22 09:36:27.084 4859-4863/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
10-22 09:36:27.088 4859-4863/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]

I dont know where i am facing the error. 我不知道我在哪里遇到错误。 My Android Phone is Redmi MI Max, Android version,6.0.1. 我的Android手机是Redmi MI Max,Android版本是6.0.1。 it is i made the API call and success the json data and saving the data using Asynctask background thread,thread saved success fully by on Postexecute not working..here i am not using any fingerprint access. 它是我使API调用并成功使用json数据并使用Asynctask后台线程保存数据,该线程通过Postexecute完全无法成功保存成功。.在这里,我没有使用任何指纹访问。 but it is showing fingerprint error. 但显示指纹错误。

   public void userLogin(String schoolCode, String userName, String password, String deviceId) {
    try {
        boolean isDataSet = false;
        String url = Constants.MAIN_SERVER_URL;
        JSONObject jsonObject = new JSONObject();
        jsonObject.put(Params.SCHOOLCODE, schoolCode);
        jsonObject.put(Params.USERNAME, userName);
        jsonObject.put(Params.PASSWORD, password);
        jsonObject.put(Params.DEVICE_ID, deviceId);

        api.call(url, jsonObject, new Api.CallBack() {
            @Override
            public void done(String url, JSONObject jsonObject, AjaxStatus status) {
                boolean isDataSet = false;
                try {
                    if (jsonObject != null) {
                        int statusCode = jsonObject.getInt(Params.STATUS);
                        if (statusCode == StatusCodes.SUCCESS) {
                            isDataSet = true;
                            JSONObject dataObject = jsonObject.getJSONObject(Params.DATA);
                            new UserLogInInfoSaving(dataObject).execute();
                        } else {
                            String message = Utils.getValidStringFromJSON(jsonObject, Params.MESSAGE);
                            JSONObject jsonErrorObj = new JSONObject();
                            jsonErrorObj.put(Params.MESSAGE, message);
                            Log.e("ERRROR", " IN DASHBOARD INFORMATION ".concat(status.getMessage()));
                            if (dataCompletedAction != null) {
                                dataCompletedAction.onRecordsCompleted(jsonErrorObj);
                            }
                        }
                    } else {
                        Toast.makeText(ctx, status.getMessage(), Toast.LENGTH_SHORT).show();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                } finally {
                    if (!isDataSet) {
                        Log.e("ERRROR", " IN DASHBOARD INFORMATION ".concat(status.getMessage()));
                        if (dataCompletedAction != null) {
                            dataCompletedAction.onRecordsCompleted(null);
                        }
                    }
                }

            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Check the user log in and i am saving the record into the Database 检查用户登录,我将记录保存到数据库中

 private class UserLogInInfoSaving extends AsyncTask<Void, Void, Void> {
    JSONObject jsonObject;


    UserLogInInfoSaving(JSONObject jsonObject) {
        this.jsonObject = jsonObject;
    }

    @Override
    protected Void doInBackground(Void... params) {
        DBSchools dbSchools = null;
        try {
   //                Saving school information
            Constants.ACTIVE_USER_ID =    Utils.getValidStringFromJSON(jsonObject, Params.USER_ID);
                if (jsonObject.has(Params.SCHOOL_INFO)) {
                JSONObject jsonSchoolInfoObj =   jsonObject.getJSONObject(Params.SCHOOL_INFO);
                 String newSchoolCode = Utils.getValidStringFromJSON(jsonSchoolInfoObj, Params.SCHOOLCODE);
                if(newSchoolCode!=null && !newSchoolCode.equals("NA")) {
                    dbSchools=DBSchools.set(newSchoolCode, isFirstSchool(), jsonSchoolInfoObj);
                    if(dbSchools!=null) {
                        Constants.CURRENT_SCHOOL_CODE = dbSchools.getSchoolCode();
                        Constants.SERVER_URL = dbSchools.getSchoolUrl();
                        DBParent.set(Constants.CURRENT_SCHOOL_CODE, Constants.SERVER_URL, Constants.ACTIVE_USER_ID, jsonObject);                         
                    }
                }
            }
        } catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(Void v) {
        super.onPostExecute(v);
         try {
                JSONObject jsonSchoolInfoObj = jsonObject.getJSONObject(Params.SCHOOL_INFO);
                String newSchoolCode = Utils.getValidStringFromJSON(jsonSchoolInfoObj, Params.SCHOOLCODE);
                String parentId = Utils.getValidStringFromJSON(jsonObject, Params.USER_ID);
                JSONArray jsonArray = Utils.getValidJSONArrayFromJSON(jsonObject, Params.STUDENT_INFO);
                                    new StudentInfoSaving(jsonArray, Constants.SERVER_URL, newSchoolCode, parentId).execute();
         }catch (Exception e){
               e.printStackTrace();
         }
    }

When i removed the code from post execute and do it on doInBackgroud method in UserLogInInfoSaving class with the help of runOnUiMethod(), it is working fine. 当我从后执行中删除代码并借助runOnUiMethod()在UserLogInInfoSaving类中的doInBackgroud方法上进行操作时,它工作正常。 but when its go to postExecute() method of the same class rises the error. 但是当它进入相同类的postExecute()方法时,会引发错误。

Has anybody seen this kind of error?Help me. 有人看到这种错误了吗? I am still stuck with this problem. 我仍然坚持这个问题。 Helps will be appreciated 帮助将不胜感激

启动调试模式,这是由于您的Params.SCHOOL_INFO将null值传递给jsonobject所引起的,因为post execute方法中使用了jsonobject

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM