title: The specified message queue synchronization barrier token has not been posted
body: <p>I have an app which as a binded service.  I am sending messages to the service, but sometimes I am getting the following error:</p>
  
  <blockquote>
    <p>E/AndroidRuntime(28216): java.lang.IllegalStateException: The
    specified message queue synchronization  barrier token has not been
    posted or has already been removed.</p>
  </blockquote>
  
  <p>Sometimes I get this error instead:</p>
  
  <blockquote>
    <p>android.util.AndroidRuntimeException: { what=888 when=0 } This message
    is already in use.</p>
  </blockquote>
  
  <p>Sometimes the UI just freezes.  I am communicating from the service to the activity and visa versa through handlers. </p>
  
  <pre><code> public void init(IBinder service){
      playerService = new Messenger(service);
      setBound(true);
      try {
          Message msg = Message.obtain(null, PlayerService.MSG_REGISTER_CLIENT);
          msg.replyTo = messenger;
          playerService.send(msg);
          while(!messageQueue.isEmpty()){
              playerService.send(messageQueue.remove());
          }
      } catch (RemoteException e) {
          // In this case the service has crashed before we could even do anything with it
          Log.d(Player.TAG, "problem binding player messenger " + e.getMessage());
      }
  }
  </code></pre>
  
  <p>Here is a method which consistenly results on freezes, the second time it is called.</p>
  
  <pre><code>public void play(String url) {
      Message msg = Message.obtain(null, PlayerService.PLAY, 0, 0);
      msg.setData(getURLBundle(url));
      sendMessage(msg);
  }
  
  private void sendMessage(Message message){
      if(!isBound){
          Log.d(Player.TAG, "isnt bound, queueing message");
          messageQueue.add(message);
      }else {
          try {
              playerService.send(message);
          } catch (RemoteException e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>I'm new to Threading, Messengers and Handlers, so any help is appreciated, thanks :)</p>