Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple rejected me, no idea why, or how to fix it

so heres the story, Apple recently rejected my app, saying it crashed on their phones, (iPhone 3G and ipod touch 2g), and send me two crash logs. NEITHER of which I can make sense out of.

Here they are.

 Incident Identifier: BA4382DD-DA6A-47F7-800D-43AD30919064
 CrashReporter Key:   53e41ca2a52f91affddc86f49ce9c4be851fcfd6
 OS Version:          iPhone OS 3.1.2 (7D11)
 Date:                2010-01-14 15:59:57 -0800

Free pages:        317
Wired pages:       11274
Purgeable pages:   0
Largest process:   iConicCars

Processes
         Name                 UUID                    Count resident pages
       amfid <b4f3e5a61456edf85b6ada59064ec311>      93
  iConicCars <851d264eb074e465891dcd67b67a8e79>    5928 (jettisoned) (active)
  MobileMail <0798395dde43ca46317db6e674dfbbfd>     503 (jettisoned)
 MobilePhone <82c9bd8583f4b09706a16b08e641a4b9>     464 (jettisoned)
     notifyd <d6b12a4e424e10e5ce91efd8d39f22af>      77
    BTServer <c940c4c7252113a7303cc1f7d1429c17>     253
  CommCenter <b1d6c4fe3ce2bc0374471196ab15b8d4>     313
 SpringBoard <c5c29b56a2bb445fc73203e03f67fa78>    1954 (active)
  accessoryd <32ceed5c3c32625ac23cd870f61364af>     107
     configd <aae411e8289912124271f109ceee8f85>     290
   fairplayd <cdce5393153c3d69d23c05de1d492bd4>     156
   mDNSResponder <db98efaea94329959789f73a16f9f46e>     123
mediaserverd <612fbbfa0546609cf6c6b13ae6f333cf>     767 (jettisoned)
   lockdownd <171865bfe3725c3d5047df8c00ed5d77>     294
     syslogd <1cb3e9f2375fad9e345bd16655be4a50>      66 (jettisoned)
     launchd <c5bc115d47313218505394f96770782a>      76

**End**

Incident Identifier: 8E52889B-0260-4AAD-A39C-FC170FB637D4
CrashReporter Key:   45d118e8a4be9b3163eab905af870f05dfddb12d
OS Version:          iPhone OS 3.1.2 (7D11)
Date:                2010-01-14 13:41:31 -0800

Free pages:        309
Wired pages:       12550
Purgeable pages:   0
Largest process:   iConicCars

Processes
         Name                 UUID                    Count resident pages
      iConicCars <851d264eb074e465891dcd67b67a8e79>    5641 (jettisoned) (active)
       SCHelper <b87bd080a670f9512426e8721dc1f03c>     103
            misd <a41e5d5f4b8922ab272c55df84aec4fd>     140
    installd <620ede129454bcd824f0b6cec13b15d3>     212
 SpringBoard <c5c29b56a2bb445fc73203e03f67fa78>    1545 (jettisoned) (active)
        iapd <fea164e93479b90e1dd39a293dd3865c>     251 (jettisoned)
     syslogd <1cb3e9f2375fad9e345bd16655be4a50>      83 (jettisoned)
mediaserverd <612fbbfa0546609cf6c6b13ae6f333cf>     302 (jettisoned)
    BTServer <c940c4c7252113a7303cc1f7d1429c17>     345
   lockdownd <171865bfe3725c3d5047df8c00ed5d77>     279
     notifyd <d6b12a4e424e10e5ce91efd8d39f22af>     104
  CommCenter <b1d6c4fe3ce2bc0374471196ab15b8d4>     151
     configd <aae411e8289912124271f109ceee8f85>     264
   fairplayd <cdce5393153c3d69d23c05de1d492bd4>     517
   mDNSResponder <db98efaea94329959789f73a16f9f46e>     100
     launchd <c5bc115d47313218505394f96770782a>      67

**End**

they said even after a reboot, there is no difference. Heres the kicker, it works perfectly on my iPhone 3GS, and in the simulator with NO memory leaks.

So, what on earth do i do?

UPDATE:

Log for in the simulator [Session started at 2010-01-16 20:01:44 +1300.] GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all Attaching to process 1152. dyld: could not load inserted library: /usr/lib/libgmalloc.dylib

Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.) warning: Couldn't find minimal symbol for "_sigtramp" - backtraces may be unreliable Cannot access memory at address 0x0 Cannot access memory at address 0x0 (gdb)

like image 218
Sam Jarman Avatar asked Jan 16 '10 05:01

Sam Jarman


1 Answers

As others have said, you are using too much memory.

If you are using multiple pages of view controllers, try this simple test - run your app with the ObjectAlloc Instrument. Click on something to bring up a subview, you should see your memory increase - now dismiss that view and go back to the main one, the memory should go down. If it does not, that is your problem (or one of them anyway, but that is a likley starting point).

To try and track this down, place breakpoints in dealloc for each of your view controllers and see what actually gets called. For view controllers that are not released like you expect, in ObjectAlloc you can see where each retain against an object was issued, and decide what retained the object when it should not have done so.

In general the ObjectAlloc flow should look like a graph that goes up and down all the time, not constantly rising.

Also if you are using a lot of images consider re-sizing them to the exact size you need instead of starting with a much larger size and scaling. Using that much memory must be due to using images and not releasing them. Leaks will not report anything if you still have references to memory you are retaining.

Also, buy an older Touch for testing.

like image 81
Kendall Helmstetter Gelner Avatar answered Sep 24 '22 00:09

Kendall Helmstetter Gelner