IllegalMonitorStateException on 'object.wait()' call randomly

by svd » Fri, 23 Apr 2010 08:04:51 GMT

Sponsored Links
 My code throws an IllegalMonitorStateException on 'object.wait()'
call, even though wait is invoked inside a synchronized block. And
this exception occurs only randomly not always.

below is my code snippet:

while (!mFinish) {
          synchronized (mResponse) {
                    if (!mResponse.isEmpty()) {
                           do something
                    } else {
                        try {
                        } catch (InterruptedException ie) {


Also all the 'notify' methods are in synchronized block.
Please point out if there is anything wrong in my code?


Other Threads

1. access to the audio channel

I'm working on an Android Project.
 I'm trying to create an application using DTMF (Dual Tone Multi
Frequency) to provide special service to user. In fact, I would like
that once you call someone, this person could put you through (using
The process is the following:
1- You call your contact
2- You ask him to put you through
3- He enter a DTMF sequence (containing the number to be dialed by
your own phone,..)
4- Your phone receive the DTMF tones, end this call and dial the new
number (decoded)

Therefore, I would like to know if it's possible to access the audio
channel in DevPhone or G1.
Thanks in advance.

2. paused activities' state


i have a question: when an activity is paused (because of its window
being partially covered by another activitiy's), does it still get
scheduled? i.e. is there multitasking between activities?

thanks a lot!

3. Test browsertestplugin

4. how can i change the layout_gravity by code?

5. static getString()??

6. Permission on apk

7. Custom Locale, Spare parts - how to get them?