Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Blocking operation not permitted on event dispatch thread

by Retired on ‎02-16-2010 11:05 AM (4,066 Views)


This article applies to the following:

  • BlackBerry® wireless devices based on Java™
  • BlackBerry Device Software 4.1


The dispatch thread (or main event thread) processes system messages. Blocking this thread prevents system messages from being processed, which leads to a message queue overflow and termination of the application. To prevent it, BlackBerry Device Software 4.1 and later no longer allow an application to initiate a call to a blocking method from the main event thread.

However, if an application attempts to block on the main event thread, an exception is thrown and the Blocking operation not permitted on event dispatch thread statement appears. To resolve this issue, move any blocking operations into their own threads.

Additional Information

Examples of blocking methods are as follows:

  • the read method of the InputStream class
  • the acceptAndOpen method of the StreamConnectionNotifier interface
  • the doModal method of the Dialog class
Users Online
Currently online: 28 members 2,516 guests
Please welcome our newest community members: