Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6229] iOS: DashboardView is leaking memory

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T15:19:01.000+0000
Affected Version/sRelease 1.7.5
Fix Version/sSprint 2011-49, Release 1.8.0.1, Release 2.0.0
ComponentsiOS
Labelsmodule_dashboardview, qe-testadded
ReporterMauro Parra-Miranda
AssigneeStephen Tramer
Created2011-11-17T21:23:49.000+0000
Updated2012-02-24T12:25:07.000+0000

Description

PROBLEM DESCRIPTION

If you are updating a DashboardView (by means of removing the data, then the view, then creating new data, then creating the dashboardview). In the test code (attached or included here) we only have a button that will refresh the DashboardView, and a DashboardView. Everytime that the button is pressed, the DashboardView will refresh, but will leak some stuff.

STEPS TO REPRODUCE

1. Get the code: http://pastie.org/private/nifrkckutcfyinasidqucg 2. Create a new mobile project in Titanium 3. Get the code into the app.js 4. Compile 5. Press "Refresh" until crash.

EXPECTED RESULTS

The DashboardView refreshing without issues.

ACTUAL RESULTS

The App is crashing.

EXTRA INFO

This happens in iOS 4.x and 5.0. The leak size is like 300k each refresh.

Attachments

FileDateSize
crash-6229-2011120901.txt2011-12-09T12:30:02.000+000012229
crash-6229-2011120902.txt2011-12-09T12:30:02.000+000019992
crashReports.zip2011-12-06T15:46:38.000+000015094
Screen Shot 2011-12-09 at 12.36.44 PM.png2011-12-09T12:41:45.000+0000122230

Comments

  1. Wilson Luu 2011-12-06

    Reopening bug. Provided code crashes in the following environment: Titanium Studio, build: 1.0.7.201112060130 OS: Mac OS X Lion SDK Build: 1.8.0.1.v20111205164258 Devices: iOS Simulator (4.3), ipod 3rd Gen (4.0.2), ipad 2 (4.3.5) See attachments for crash reports. I was only able to retrieve crash reports for the ipod and ipad devices. Note: Provided code did not crash on iphone 4S (5.0.1)
  2. Blain Hamon 2011-12-06

    The two crashes are exception-style crashes. We need the console logs to determine what happened.
  3. Blain Hamon 2011-12-09

  4. Blain Hamon 2011-12-09

    Two crash logs taken from xCode: Contains both console and the symbolicated crash log.
  5. Blain Hamon 2011-12-09

    By the way, this is how to map a shortcut to the memory warning menu item to facilitate aggressive GC testing.
  6. Stephen Tramer 2011-12-09

    Note that I updated the interval from 50 to 200 in the test code; more realistic simulation of a human supertapper, and setting it lower can result in some strange race conditions involving remember/forget that we must examine and aren't part of this bug. In fact, even at this speed, you'll get the occasional warning in xcode... but no fatal memory panics in instruments (curiously, instruments may register one, but the app continues executing).
  7. Blain Hamon 2011-12-09

    Code reviewed and tested.
  8. Stephen Tramer 2011-12-09

    Required additional fixes, and needs the 1.8.0.1 merge.
  9. Wilson Luu 2011-12-10

    Closing bug. Verified fix on: OS: Mac OS X Lion SDK build: 1.8.0.1.v20111209204243, 1.9.0.v20111209203840 Titanium Studio, build: 1.0.7.201112080131 Device: ipod 3rd Gen (4.0.2)
  10. Stephen Tramer 2011-12-14

    Reopening to remove merge tag.
  11. Natalie Huynh 2012-01-05

    Open to update label

JSON Source