[AC-1998] A rendering function causes UI freezes on Android when code is included with Ti.include(). Does not occur when same function is copied with eval() and then called.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Hold |
Resolution Date | 2013-03-15T18:37:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, crash, triage, ui |
Reporter | Matthias Zaugg |
Assignee | Mauro Parra-Miranda |
Created | 2012-11-01T13:34:58.000+0000 |
Updated | 2016-03-08T07:40:56.000+0000 |
Description
I have an app that exposes a single variable( var api = {}; ) to the global scope. The app is glued together with Ti.include() by including different files that all contain a self-executing anonymous function containing code, which extends the api-var with functionality.
There is a content renderer function, which accepts some JSON data and a window as parameters and then renders some controls based on the JSON data on the window. This function is contained in a single file(ContentRenderer.js in gist).
This rendering function is used by other components. Here the problem occurs: When this function is used, it causes random but regular UI freezes(ANR) on Android devices. Strangely this does not happen when i make a copy(not by reference) of the function with eval(). The problematic lines in the code can be found in the following gist in the file ContentModule.js line 14-19:
https://gist.github.com/3993412
The gist contains also the logfile from Dalvik Debug Monitor.
Hi Matthias, We'd like to be able to reproduce this without spending time guessing unprovided code. If you could fill in the blanks in a new project and post a self-contained runnable test case ASAP that would be most useful. Cheers.
Waiting on updated code. When provided, we will reopen.