BlackBerry 10 Apps That Use SystemDialog May Freeze on Startup on BlackBerry OS 10.3.1+

Rapid John
Posted on March 16, 2015, 6:10 pm
57 secs

BlackBerry have informed their developers that changes in BlackBerry OS 10.3.1.1276 and higher can cause an application to freeze.

An application will freeze if either of the following is met:

  • A Cascades application displays a SystemDialog before calling Application.setScene(bb::cascades::AbstractPane *scene).
  • A Native (non Cascades) application displays a SystemDialog before creating a window group.

In BlackBerry OS 10.3.1.1276 and higher, SystemDialog is no longer shown until an application has a window group that owns the dialog. The window group is created in Cascades applications when setScene(bb::cascades::AbstractPane *scene) is called.

Native applications not using Cascades will need to create their own window group.

Applications that called SystemDialog.exec() before calling setScene will now freeze, blocking for input from the dialog that is never displayed.

The workaround is to move the exec() call after setScene or to use the SystemDialog.show() method, which is not blocking.

Why this changed:

 If an application created a SystemDialog that didn’t have a window group, the dialog may not be tied to the application. This means the dialog is not minimized or closed when the application is minimized or closed. If an application displayed a dialog which couldn’t be dismissed, the user needed to reboot their device to clear the dialog.  This was triggered by a race condition, so you may not have seen this case in your own testing.

[signoff predefined=”Enjoy this?” icon=”users”][/signoff]

Rapid John
Rapid John has a quarter of a century in programming for Government and Corporate bodies and is proficient in most major programming languages.  He is constantly running around showing us his latest bit of code and telling us how fantastic it is. (John we know). He is responsible for carrying out presentations to corporate and business customers and is a BlackBerry Elite.

Leave a Reply

You must be logged in to post a comment.