Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19123] Ti.UI.OptionDialog crashes with unknown exception

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-07-01T18:40:02.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterFokke Zandbergen
AssigneeChristopher Williams
Created2015-07-01T08:39:02.000+0000
Updated2015-07-06T21:46:02.000+0000

Description

Both the test app in the Windows repo: https://github.com/appcelerator/titanium_mobile_windows/blob/master/test/app/optiondialog_test.js And the example in the docs: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.OptionDialog Crash with an unknown exception:
-- Start application log -----------------------------------------------------
[INFO]  Finished launching the application
[INFO]  Waiting for app to connect to log relay
[ERROR] Application Error: "Runtime Error during click event: unknown exception"

Attachments

FileDateSize
Screen Shot 2015-07-01 at 10.36.51.png2015-07-01T08:38:56.000+000039678

Comments

  1. Christopher Williams 2015-07-01

    https://github.com/appcelerator/titanium_mobile_windows/pull/343
  2. Christopher Williams 2015-07-01

    Turns out that this suffers from the same errors and limitations as AlertDialog. So the fix I posted is good, but the issue originally reported is effectively a duplicate of TIMOB-19065 Windows just throws an exception when you try to open a message dialog with "too many" buttons. It appears that limit on the phone is effectively 2 buttons, any more and it throws a runtime exception. Obviously that sucks. We may need to look into alternate implementations using some other UI widgets that allow for more options.
  3. Dawson Toth 2015-07-01

    Could we proactively detect this situation and throw a friendlier error?
  4. Lokesh Choudhary 2015-07-06

    Verified the fix. Instead of an exception the list is truncates to 2. We get this in the logs:
    [ERROR] :  Number of buttons exceeds platform maximum (2), list will be truncated.
    Closing. Environment: Appc Studio: 4.1.0.201507061234 Ti SDK: 4.1.0.v20150706111546 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-5 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source