title: RuntimeException: Could not dispatch event @ otto
body: <p>we have an issue in our current app-version with the EventHandler from otto.
  We get a <code>RuntimeException</code> in our crash-log, with following description:</p>
  
  <blockquote>
    <p>"Reason: java.lang.RuntimeException: Could not dispatch event:
    classcom.nameOfBrand.ui.events.SwitchFragmentEvent to handler
    [EventHandler public void
    com.nameOfBrand.ui.activities.MainActivity.onSwitchFragmentEvent(com.nameOfBrand.ui.events.SwitchFragmentEvent)]"</p>
  </blockquote>
  
  <p>We have a button and in its onClickListener we fire an self-defined <code>SwitchFragmentEvent</code>.
  In some weird situations, the framework can't dispatch the Event and throws an <code>RuntimeException</code>.</p>
  
  <p>The fragment with the button extends <code>AbstractResultListFragment</code> and this one extends <code>AbstractFragment</code>. We register the EventBus in the onResume of AbstractFragement and unregister it at onPause. Everything works fine, except at this one button :/</p>
  
  <p>Does anyone have an idea or had ever to do with something like this?</p>
  
  <p><strong>UPDATE:</strong>
  Scompt was right. The RuntimeException was thrown from otto cause of a NullPointerException in our code. Thx</p>
  
  <p>Tipp: Read your crash-logs until the end ;)</p>