English 中文(简体)
EXC_BAD_ACCESS 只有在分配物体时方可使用装置
原标题:EXC_BAD_ACCESS only on device when allocating an object
  • 时间:2011-11-06 19:48:49
  •  标签:
  • ios

我正在带上EXC_BAD_ACCESS差错。

GADRequest *request = [[GADRequest alloc] init];

I don t have source code of GADRequest as its from Google AdMob SDK. The stack trace is below. Its happening only on device and not on simulator.

#0  0x34a80462 in objc_msgSend ()
#1  0x0017d9dc in +[GADRequest alloc] (self=<value temporarily unavailable, due to optimizations>, _cmd=<value temporarily unavailable, due to optimizations>) at /Users/mikeying/work/ios_sdk_git/googlemac/iPhone/GoogleAds/NextGen/Request/GADRequest.m:48
#2  0x0006e728 in -[AdWhirlAdapterGoogleAdMobAds getAd] (self=0x5511c0, _cmd=0x225209) at /Users/xxx/yyy/libs/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.m:68
#3  0x0007b4f6 in -[AdWhirlView makeAdRequest:] (self=0x5538f0, _cmd=0x22691c, isFirstRequest=1  01 ) at /Users/xxx/yyy/libs/AdWhirl/internal/AdWhirlView.m:370
#4  0x0007ac5c in -[AdWhirlView buildPrioritizedAdNetCfgsAndMakeRequest] (self=0x5538f0, _cmd=0x226965) at /Users/xxx/yyy/libs/AdWhirl/internal/AdWhirlView.m:235
#5  0x35818bbe in -[NSObject(NSObject) performSelector:withObject:] ()
问题回答

该方案收到EXC_BAD_ACCESS信号,即电文被发送至已转让的物体。 由于环境变异的NSZombieEnabled set to YES,物体从未被分配,而是被保存为zombie物体。 当电文被发送至Zombie物体时,执行停在通常会引起EXC_BAD_ACCESS信号的线上。

在Xcode 4.2中,你可以通过编辑办法确定环境变量,在左小组中选择“Run XYZ.app”阶段,然后选择右边的“Arguments”。

重要的是,一旦你去做,或你的申请将使用大量记忆并最终坠毁。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签