My Android app's bug is reported, But I don't know the reason, where it is from

Viewed 209

In my app, I have implemented the Fabric(bug reporting)

In Fabric I got crash report like below. But I really don't know the reason, and where is my error pointed out. I guess this error is pointing to native Android code. How could I fix it?

Everything(MessageQueue, ViewRootImpl..) is not my custom codes. Please let me know any advice and these errors make my app stopped?

Fatal Exception: java.lang.IllegalStateException: The specified message queue synchronization  barrier token has not been posted or has already been removed.
       at android.os.MessageQueue.removeSyncBarrier(MessageQueue.java:512)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1496)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7044)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
       at android.view.Choreographer.doCallbacks(Choreographer.java:702)
       at android.view.Choreographer.doFrame(Choreographer.java:638)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
       at android.os.Handler.handleCallback(Handler.java:751)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:154)
       at android.os.HandlerThread.run(HandlerThread.java:61)

I code like this using handler below. Is there any problem?

if (_intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { ringerType = "screenOn";

                    $trafficTimer = new Timer(true);
                    $trafficTimerTask = new TimerTask() {
                        @Override
                        public void run() {
                            try {
                                Intent intent = new Intent(getApplicationContext(), SQLiteHandler.class);
                                intent.putExtra("CATEGORY", "NR(DATA)");
                                intent.putExtra("TIMESTAMP", new SimpleDateFormat("yyyy.MM.dd_HH.mm.ss").format(new Date(System.currentTimeMillis())));
                                intent.putExtra("TRANSMIT", "" + (TrafficStats.getTotalTxBytes()) / 1024 + " KB");
                                intent.putExtra("RECEIVE", "" + (TrafficStats.getTotalRxBytes()) / 1024 + " KB");

                                PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
                                pendingIntent.send();
                            } catch (PendingIntent.CanceledException e) {
                                e.printStackTrace();
                            }
                        }
                    };

                    $trafficTimer.schedule($trafficTimerTask, 0, 10 * 1000);
                } else if (_intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
                    ringerType = "screenOff";

                    if ($trafficTimer != null) {
                        $trafficTimer.cancel();
                        $trafficTimer = null;
                    }
0 Answers
Related