Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14124] Android: V8Exception when getting Tab's title on KitchenSink

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-05-02T20:39:30.000+0000
Affected Version/sRelease 2.1.4, Release 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterEduardo Gomez
AssigneeEric Merriman
Created2013-06-05T19:21:38.000+0000
Updated2017-05-02T20:39:30.000+0000

Description

Issue

Looks like e.tab.title can be only read once.

Steps to reproduce

1. Get Kitchen Sink app :) 2. Install & Run 3. Monitor output - a runtime exception is noticeable.

Offending code

- https://github.com/appcelerator/KitchenSink/blob/master/Resources/ui/common/ApplicationTabGroup.js#L140 If you add a such line of code the Tab's title shows up: - Ti.API.info(' JSON.stringify(e.tab.title): '+ JSON.stringify(e.tab.title)); Output: - 06-05 11:54:19.297: I/TiAPI(11303): JSON.stringify(e.tab.title): "Base UI" Then you will eventually get (Device stack trace):
06-05 11:54:18.414: I/ActivityManager(512): Displayed com.appcelerator.kitchensink/org.appcelerator.titanium.TiActivity: +583ms (total +1s569ms)
06-05 11:54:19.273: I/TiAPI(11303):  FOCUS RECEIVED IN base_ui
06-05 11:54:19.273: W/TitaniumModule(11303): (KrollRuntimeThread) [1000,1450] Coverage is not enabled, no coverage data will be generated
06-05 11:54:19.281: I/gralloc(512): Allocated 0x660072 size 6488161
06-05 11:54:19.289: I/TiAPI(11303):  undefined
06-05 11:54:19.297: I/TiAPI(11303):   JSON.stringify(e.tab.title): "Base UI"
06-05 11:54:19.351: I/TiAPI(11303):  tab blur - new index undefined old index undefined
06-05 11:54:19.508: I/AlarmManager(512): sending alarm Alarm{40b05618 type 0 com.android.vending}
06-05 11:54:20.023: D/Finsky(1843): [1] 5.onFinished: Installation state replication succeeded.
06-05 11:54:20.289: I/TiAPI(11303):  FOCUS RECEIVED IN base_ui
06-05 11:54:20.289: W/TitaniumModule(11303): (KrollRuntimeThread) [1011,2461] Coverage is not enabled, no coverage data will be generated
06-05 11:54:20.289: I/TiAPI(11303):  undefined
06-05 11:54:20.312: I/TiAPI(11303):  tab blur - new index undefined old index undefined
06-05 11:54:20.367: E/TiExceptionHandler(11303): (main) [80,2541] ----- Titanium Javascript Runtime Error -----
06-05 11:54:20.367: E/TiExceptionHandler(11303): (main) [0,2541] - In ui/common/ApplicationTabGroup.js:135,69
06-05 11:54:20.367: E/TiExceptionHandler(11303): (main) [0,2541] - Message: Uncaught TypeError: Cannot read property 'title' of undefined
06-05 11:54:20.367: E/TiExceptionHandler(11303): (main) [0,2541] - Source: 		Ti.API.info(' JSON.stringify(e.tab.title): '+ JSON.stringify(e.tab.title));/
06-05 11:54:20.406: E/V8Exception(11303): Exception occurred at ui/common/ApplicationTabGroup.js:135: Uncaught TypeError: Cannot read property 'title' of undefined

Associated Q&A thread

http://developer.appcelerator.com/question/150744/downloaded-kitchensink-210-now-working-on-my-android-device

Comments

No comments

JSON Source