Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12931] Android: View - App crashes if you click on a switch control at the end of a view that passes the phone's screen

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDone
Resolution Date2015-06-05T02:04:46.000+0000
Affected Version/sRelease 3.0.0, Release 3.0.2
Fix Version/sRelease 4.0.0
ComponentsAndroid
Labelsn/a
ReporterWilson Luu
AssigneeHieu Pham
Created2013-03-02T02:40:47.000+0000
Updated2017-03-16T21:42:22.000+0000

Description

*Details:* If you extend a view (that is a child of ScrollView) pass the phone's screen and click on a switch control at the end, then the app will crash and return a SIGSEGV in logcat. *This bug is reproducible on 3.0.0.GA* *Steps to Reproduce:* 1. Install attached sample app 2. Go to *basic vertical panning* or *basic horizontal panning* 3. Scroll vertically or horizontally (depending on which test) to the end of the view 3a. While scrolling to the end of the view, tap the view a couple of times 4. Press the switch control *Actual:* App will crash and return SIGSEGV error in logcat (see attachments) *Expected:* App should not crash if view is extended pass the phone's screen *Note:* 1. This error seems to occur on initial install of the app. After a couple of hours, the issue does not reappear again. 2. Was not able to reproduce on the Nexus 4 (4.2.1)

Attachments

FileDateSize
droid1_error.txt2013-03-02T02:40:47.000+00004293
fromSoasta.txt2013-03-04T19:36:47.000+000027212
nexusS_error.txt2013-03-02T02:40:47.000+00008840
PerformanceTestSuite.zip2013-03-02T02:40:47.000+00003843821
wluuPerformanceTestSuite.zip2013-03-04T19:36:47.000+00003846074

Comments

  1. Wilson Luu 2013-03-04

    Changing severity of bug to blocker. Below is my reason: I've attached a modified app (wluuPerformanceTestSuite.zip) which uses a label control instead of switch control in the *basic vertical panning* and *basic horizontal panning* test. And, the horizontal and vertical views are extended by 500 dp. Now, in SOASTA TouchTest, while recording this new app, the app will crash and restart itself consistently (see fromSoasta.txt). It seems that the recording mechanism in SOASTA TouchTest is exposing this memory issue.
  2. Allen Yeung 2013-03-15

    This is an issue with the window proxy being collected and it fails when we try to open it again in an event listener. Currently, only direct children of a window will keep a window proxy alive, but children that are several layers deep don't prevent the window proxy from being garbage collected by v8. We need to spend some time exploring ways to properly keep track of these proxies, whether that be an array of children in views, or doing it through some V8 api. The quick fix for now would be to move the window proxy into the scope of the event listener. In horizontalPanning.js, move 'myWin' inside the finishSwitch event listener. This will create a new window proxy every time it is clicked (I'm guessing that's what you wanted in the first place anyways).
  3. Lokesh Choudhary 2015-03-13

    Tried to reproduce. Was not able to repro with latest 4.0 SDK, but with 3.5.0.GA could repro it only once per device install. Tested on 3 devices. Environment: Appc Studio : 4.0.0.201503062102 Ti SDK : 4.0.0.v20150312095013 CLI : 3.5.0-dev Alloy : 1.5.1 MAC Yosemite : 10.10.2 Nexus 5 - Android 5.0 Sony Experia - android 4.1.2 Samsung S4 - android 4.4.2
  4. Chee Kiat Ng 2015-06-05

    Marking as fixed in 4.0.0
  5. Lee Morris 2017-03-16

    Can confirm that this was done.

JSON Source