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.
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)
The two crashes are exception-style crashes. We need the console logs to determine what happened.
Two crash logs taken from xCode: Contains both console and the symbolicated crash log.
By the way, this is how to map a shortcut to the memory warning menu item to facilitate aggressive GC testing.
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).
Code reviewed and tested.
Required additional fixes, and needs the 1.8.0.1 merge.
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)
Reopening to remove merge tag.
Open to update label