Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2565

iOS: Crash with "pointer being freed was not allocated" on certain devices when manually closing windows in a navigation group

    Details

      Description

      I am experiencing an extremely annoying and somewhat spontaneous bug.

      I have a navigation group, and in that navgroup a window with 3 tableviews, each with one or two rows with a label inside. They all lead to new windows opened in that navigation group, loaded with normal CommonJS require statements. Let's call the tableviews T1, T2 and T3.

      T1 leads to a window with another tableview, which again leads to yet another tableview. When I click a row here, among other things, the app returns to the initial window. Since the navigation group does not expose its window stack, I have implemented my own history object:

      var close = function(win, navGroup) {
      'use strict';
      if (win.ascendent)

      { close(win.ascendent, navGroup); }

      navGroup.close(win);
      };

      module.exports.close = close;

      Now, when I return to the original window, some strange behavior ensues:

      • if I click T2 or T3, the app MAY crash - but NEVER in the simulator or on an iPhone 4S (and not on an iPhone 3GS either, it seems). It often does on an iPad or an iPod Touch, though, although it seems to do so only after trying a few times.
      • if I click T1, GO BACK via the navigation group, and THEN click T2 or T3, it apparently NEVER crashes.
      • if I remove the call to the history object - meaning that I manually backtrack from T1 to the main window - it apparently NEVER crashes.

      So, my theory is that it has something to do with manually closing a window by calling navigationgroup.close instead of letting the user press the back button.

      If I run the project in XCode, the error I get is "pointer being freed was not allocated". I have attached a symbolicated log for your pleasure.

      Let me know if you need more info.

        Attachments

          Activity

            People

            • Assignee:
              nsharma Nikhil Sharma
              Reporter:
              avlund Jacob Avlund
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration