AGImagePickerController icon indicating copy to clipboard operation
AGImagePickerController copied to clipboard

EXC_BAD_ACCESS on AGIPCGridCell.m\layoutSubviews

Open enriquevald opened this issue 10 years ago • 6 comments

Hi arturgrigor,

I installed the AGImagesPicker... but I'm getting an error (EXC_BAD_ACCESS) in AGIPCGridCell.m\layoutSubviews in the line:

... for (AGIPCGridItem *gridItem in self.items) ...

Could you help me please?

Thansk

enriquevald avatar Aug 05 '13 12:08 enriquevald

Please attach the crash report or paste it here.

arturgrigor avatar Aug 05 '13 16:08 arturgrigor

Hi,

I'm using the simulator and I can´t get more information of EXC_BAD_ACCESS (code=1...). I have 16 photos in the camera roll (4 by row). I debbug the code and I noted that the layoutSubviews method is called again after I reach to the last row and in this point the error is fired.

I hope to be clear

Best reards

enriquevald avatar Aug 05 '13 17:08 enriquevald

Please type 'bt' in the debug console to show you the backtrace and paste it here along with every other info that you can grab, iOS version, which simulator are you using (iPhone/iPad), etc.

arturgrigor avatar Aug 05 '13 17:08 arturgrigor

Here you are:

(lldb) bt

  • thread #1: tid = 0x1c03, 0x0124f09b libobjc.A.dylibobjc_msgSend + 15, stop reason = EXC_BAD_ACCESS (code=2, address=0x8) frame #0: 0x0124f09b libobjc.A.dylibobjc_msgSend + 15 frame #1: 0x00002ce8 travel_p-[AGIPCGridCell layoutSubviews](self=0x0a47d2c0, _cmd=0x00717421) + 264 at AGIPCGridCell.m:87 frame #2: 0x001d22dd UIKit-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 279 frame #3: 0x012516b0 libobjc.A.dylib-[NSObject performSelector:withObject:] + 70 frame #4: 0x04160fc0 QuartzCore-[CALayer layoutSublayers] + 240 frame #5: 0x0415533c QuartzCoreCA::Layer::layout_if_needed(CA::Transaction*) + 468 frame #6: 0x04155150 QuartzCoreCA::Layer::layout_and_display_if_needed(CA::Transaction_) + 26 frame #7: 0x040d30bc QuartzCoreCA::Context::commit_transaction(CA::Transaction_) + 324 frame #8: 0x040d4227 QuartzCoreCA::Transaction::commit() + 395 frame #9: 0x040d48e2 QuartzCoreCA::Transaction::observer_callback(**CFRunLoopObserver_, unsigned long, void_) + 96 frame #10: 0x029b1afe CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION** + 30 frame #11: 0x029b1a3d CoreFoundation__CFRunLoopDoObservers + 381 frame #12: 0x0298f7c2 CoreFoundation__CFRunLoopRun + 1106 frame #13: 0x0298ef44 CoreFoundationCFRunLoopRunSpecific + 276 frame #14: 0x0298ee1b CoreFoundationCFRunLoopRunInMode + 123 frame #15: 0x01ee87e3 GraphicsServicesGSEventRunModal + 88 frame #16: 0x01ee8668 GraphicsServicesGSEventRun + 104 frame #17: 0x00181ffc UIKitUIApplicationMain + 1211 frame #18: 0x00009812 travel_pmain(argc=1, argv=0xbffff35c) + 130 at main.m:16 frame #19: 0x00002765 travel_p`start + 53 (lldb)

enriquevald avatar Aug 05 '13 18:08 enriquevald

... and target for Iphone (simulator) IOS 6.1

enriquevald avatar Aug 05 '13 18:08 enriquevald

Another warning that may help: '__bridge' casts have no effect when not using ARC

enriquevald avatar Aug 06 '13 08:08 enriquevald