33

When debugging in Android Studio, in certain scenarios the app crashes with following exception:

08-27 18:01:25.144  19241-24656/? E/AndroidRuntime﹕ FATAL EXCEPTION: pool-7-thread-1
Process: com.callsign.android.dev, PID: 19241
java.lang.InterruptedException
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1991)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2025)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:820)

This happens

  • only when debugging
  • only on certain devices (i.e. Moto G, Nexus 4)

It does not happen on Oneplus One or Xperia L for example.

I haven't found any other information to help us identify the problem. Anybody else running into this issue?

5
  • 3
    I am currently seeing this issue on Genymotion emulated devices as well. Unfortunately, I don't have any insight into the issue. Aug 28, 2015 at 21:48
  • I got the same problem on Samsung
    – K.Sopheak
    Dec 19, 2016 at 7:04
  • I am facing same issue on but not only debug but also on live app. if anybody can help it would be appreciated Feb 20, 2017 at 9:14
  • Is this issue coming after you stop execution on break point?
    – Rahul
    Aug 1, 2017 at 17:18
  • It can be confuse, but, when you're debugging, make you sure don't have any variable handle on debug console. Aug 28, 2017 at 17:24

1 Answer 1

0

Try Async Task or for your part of code. "AbstractQueuedSynchronizer" looks Synchronizing problem.

public class Task extends AsyncTask<Void, Void, Void>
    {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }

        protected Void doInBackground(Void... paths) {
            //here your code (approx from line 400 to 850)
           return null;
        }

        @Override
        protected void onPostExecute(Void result) {
            super.onPostExecute(result);
        }
    }

for call Task on button click or from any other method

new Task().execute();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.