iPhone app works well on 3.x, but crashes on iOS 4.

Discussion in 'iOS Development' started by linkou.bian@gmail.com, Aug 30, 2010.

  1. linkou.bian@gmail.com

    linkou.bian@gmail.com New Member

    Joined:
    Sep 17, 2009
    Messages:
    18
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    I wrote a small application using iPhone 3.x sdk. The app works well on device/simulator 3.x. But when I switch to device/simulator 4, it exit directly when I navigate among the tab pages. Here is the log form ~/Library/Logs/CrashReporter,

    Exception Type: EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000003
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    Application Specific Information:
    objc_msgSend() selector name: isKindOfClass:
    iPhone Simulator 4.0 (211.1), iPhone OS 4.0.2 (iPhone/8A400a)

    Thread 0 Crashed: Dispatch queue: com.apple.main-thread
    0 libobjc.A.dylib 0x02502a97 objc_msgSend + 27
    1 UIKit 0x00303f20 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 955

    Could you please give me some help, thanks in advance.

    Linkou Bian
    Email/MSN: linkou.bian@gmail.com
  2. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    No Source code? How you expect help without it?
  3. linkou.bian@gmail.com

    linkou.bian@gmail.com New Member

    Joined:
    Sep 17, 2009
    Messages:
    18
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Fixed already.

    I released an object created by factory method. So it crashes as described in the post. But the key point is, why it works well with 3.x? Does it mean iOS 4 is better in memory monitoring?

    Anyway, thanks for your reply.
  4. Freerunnering

    Freerunnering Member

    Joined:
    Sep 1, 2009
    Messages:
    296
    Likes Received:
    0
    Device:
    4G iPod touch
    Memory monitoring was one of the main features of 4.0 as it's tied in with the multitasking so deeply, it keeps the app in ram while other apps are open so it continues exactly where it was when you open it again. So that could well be why it crashes on 4.0 but not 3.0 and also explain an error i had resonantly.

Share This Page