Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1060] Images in TableView crashing app with null pointer failures

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-29T01:01:00.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
LabelsImageView, TableViewRow, Titanium, crash, intermittent
ReporterRyan White
AssigneeShak Hossain
Created2014-11-20T08:36:39.000+0000
Updated2016-03-08T07:37:24.000+0000

Description

For iOS: When populating rows (containing images) in a TableView, and updating the table, replacing the rows with new rows, this type of error intermittently happens: {{ [INFO] : failbags2(95744,0x57fd1a8) malloc: *** error for object 0x7a2ca800: pointer being freed was not allocated [INFO] : *** set a breakpoint in malloc_error_break to debug }} The error is intermittent, but happens about 30% of the time, which makes it a problem. I'd posted a question: https://developer.appcelerator.com/question/179135/images-in-tableview-crashing-app-with-null-pointer-failures ... but after a day, haven't had any attempts at an answer. If I'm doing something grossly wrong - please let me know, but it looks like something is strange with garbage collection or other aspects of memory management. I could swear this problem wasn't here in previous iterations (but can't be absolutely sure). Compiling and running in xcode, when it breaks, seems to indicate that it's something to do with images, or the clearing up of them (TiUIImageView or something like that) The attached "index.js" file is for app/controllers - replace the contents of index.js with the contents of this file. In the index.js file, is a snippet to replace the index.xml file in views. I've also uploaded a zip file of my test project to: http://scratch.otron9000.co.za/failbags2.zip Just in case you want to download that and use it. When running the test app, if console.log indicates an iteration as high as 4 or 5, the test won't fail. Uninstall the app from the simulator, clean the project in Titanium, and run from Titanium, and try again. Rinse, cycle, repeat :)

Attachments

FileDateSize
index.js2014-11-20T08:36:39.000+00001636
Screen Shot 2014-11-21 at 12.37.52 PM.png2014-11-24T09:50:26.000+00001328515

Comments

  1. Shuo Liang 2014-11-21

    Tried your test case, but can't reproduce your problem. It works well for me.
  2. Ryan White 2014-11-24

    Screen shot of failure in xcode, indicating TiUIImageView as potentially the problem
  3. Ryan White 2014-11-24

    Just to be sure here - how many cycles of uninstall-clean-run did you run? Also - what is your setup? Maybe if I can copy your setup, I can get the project to work :) I also uploaded a screen cap of the error in Xcode.
  4. Harish Mridha 2015-09-03

    Hi , I tested the issue you reported. Can't reproduce your problem. It works well for me I tested this using the studio build: 4.1.1.201507141126 and TiSDK4.1.0 GA . I recommend you upgrade TiSDK to the latest build and let us know if you get the error again. I will mark this ticket as "resolved" since I can't reproduce it. However, feel free to reopen with additional information if you notice otherwise. Thanks

JSON Source