Overcoming the Error WaitingInMainSignalCatcherLoop (OEW)


OEW1:    SOLD






AVAILABLE:    1

I have an Android application that updates the screen every 33 milliseconds, displaying a rectangle at a pair of coordinates. Here is the code for the custom view.

I used to have a separate thread handling the drawing, but it caused issues with variables having different values across threads. When I ran the program, I encountered this error instead:

04-20 10:54:35.577    1925-1931/com.thatoneprogrammerkid.gameminimum I/art﹕ Thread[2,tid=1931,WaitingInMainSignalCatcherLoop,Thread*=0xae668400,peer=0x12c00080,"Signal Catcher"]: reacting to signal 3
04-20 10:54:35.577    1925-1931/com.thatoneprogrammerkid.gameminimum I/art﹕ [ 04-20 10:54:35.627  1925: 1931 W/art      ]

Explanation

This is not an error; instead, the VM is notifying you that your application received signal 3 (SIGQUIT). Most likely, the cause is that the application is unresponsive, and the system is performing ANR (Application Not Responding) processing — SIGQUIT causes the VM to print the stack trace.

Do you see ANR complaints in the logcat?

Looking at your code, you are looping inside surfaceCreated(), which runs on the UI thread. This means your application will not be able to process messages from the system (or draw on Views, or receive user input). You can use a separate thread as you did before (but with better synchronization), or simply remove the loop from surfaceCreated() and then have your drawing handler issue a postDelayed() each time it executes.


Post a Comment

Previous Next

نموذج الاتصال