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]