[Mono-bugs] [Bug 583271] New: App crash when creating basic table based navigation app without IB

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 25 10:36:05 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=583271

http://bugzilla.novell.com/show_bug.cgi?id=583271#c0


           Summary: App crash when creating basic table based navigation
                    app without IB
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: gnorton at novell.com
        ReportedBy: philippe at activa.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8

The following minimal app (not using Interface Builder) crashes (most of the
time). At first the error is: 

_NSAutoreleaseNoPool(): Object 0x53485b0 of class
NSConcreteMapTableValueEnumerator autoreleased with no pool in place - just
leaking
Stack...

After that, things go really bad and the app crashes hard at some point.

This is the source code of a test case (complete application):

    public class Application
    {
        static void Main (string[] args)
        {
            UIApplication.Main(args,null,"AppDelegate");
        }
    }

    [Register("AppDelegate")]
    public class AppDelegate : UIApplicationDelegate
    {
        UIWindow window;

        public override bool FinishedLaunching (UIApplication app, NSDictionary
options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            UINavigationController rootController = new
UINavigationController(new TableController());

            window.AddSubview(rootController.View);

            window.MakeKeyAndVisible();

            return true;
        }


        // This method is required in iPhoneOS 3.0
        public override void OnActivated (UIApplication application)
        {
        }

    }

    public class TableController : UITableViewController
    {
        public TableController()
        {
        }

        public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();

            this.TableView.Source = new DataSource(this);
        }

        class DataSource : UITableViewSource
        {
            UITableViewController controller;

            public DataSource(UITableViewController controller)
            {
                this.controller = controller;
            }

            public override int NumberOfSections(UITableView tableView)
            {
                return 1;
            }

            public override int RowsInSection(UITableView tableview, int
section)
            {
                return 20;
            }

            public override UITableViewCell GetCell(UITableView tableView,
NSIndexPath indexPath)
            {
                string cellIdentifier = "Cell";

                var cell = tableView.DequeueReusableCell(cellIdentifier) 
                           ?? 
                           new UITableViewCell(UITableViewCellStyle.Default,
cellIdentifier);


                cell.TextLabel.Text = "Cell " + (indexPath.Row+1);

                return cell;
            }

            public override void RowSelected(UITableView tableView, NSIndexPath
indexPath)
            {
                controller.NavigationController.PushViewController(new
TableController(), true);
            }
        }
    }



Reproducible: Always

Steps to Reproduce:
1. Compile the source code
2. Run the app on the simulator or device

Actual Results:  
*** _NSAutoreleaseNoPool(): Object 0x53485b0 of class
NSConcreteMapTableValueEnumerator autoreleased with no pool in place - just
leaking
Stack: (0x7dd6af 0x73ee52 0x7bb1ec 0x10f4ae8 0x10f4c8d 0x10f9d77 0x50f1962
0x6ef101c 0x6ef0fbf 0x6ef48b7 0x6ef4847 0x14fc9f 0x263b5d 0x1207ba 0x151bc2
0x1f9bd3 0x23cca0 0x26cfa3 0x982fefbd 0x982fee42)
Error connecting stdout and stderr (127.0.0.1:10001)

Expected Results:  
no errors. working app!

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list