UIImagePickerController允许编辑挂起

时间:2011-09-02 20:29:29

标签: ios

当我在图像选择器上将allowsEditing设置为YES时,控制器会在我点击“选择”后挂起。

虽然repro不一致,但当应用程序在后台忙于从服务器获取数据时,往往会发生这种情况。看着堆栈,PL在背景中保存图像时似乎遇到了死锁。

根本没有调用委托。所以它不在处理程序的代码中。

我添加了逻辑来消除低内存警告等但我仍然偶尔会遇到这种情况(过于频繁我的口味)冻结。

有没有人见过这个?任何已知的解决方法?我一直在谷歌搜索无济于事。

相关的线程堆栈如下:

UI (thread 0):

#0  0x312aec00 in mach_msg_trap
#1  0x312ae75e in mach_msg
#2  0x329cb2be in __CFRunLoopServiceMachPort
#3  0x329cd568 in __CFRunLoopRun
#4  0x3295dec2 in CFRunLoopRunSpecific
#5  0x3295ddca in CFRunLoopRunInMode
#6  0x30c0541e in GSEventRunModal
#7  0x30c054ca in GSEventRun
#8  0x35bd3d68 in -[UIApplication _run]
#9  0x35bd1806 in UIApplicationMain
#10 0x00003a38 in main at main.m:9

Thread 6:

#0  0x312aec74 in **semaphore_timedwait_signal_trap**
#1  0x312aef4c in semaphore_timedwait_signal
#2  0x367f4818 in _pthread_cond_wait
#3  0x367f4a04 in pthread_cond_timedwait_relative_np
#4  0x325f4a54 in -[NSCondition waitUntilDate:]
#5  0x325ee9ba in -[NSConditionLock lockWhenCondition:beforeDate:]
#6  0x325ee906 in -[NSConditionLock lockWhenCondition:]
#7  0x31dc87a0 in -[PLImageLoadingThread _run]
#8  0x325d8388 in -[NSThread main]
#9  0x3264a5cc in __NSThread__main__
#10 0x367cd310 in _pthread_start

Thread 7:

#0  0x312b0d18 in __semwait_signal
#1  0x367f4866 in _pthread_cond_wait
#2  0x3679beb8 in pthread_cond_wait
#3  0x325e590a in -[NSCondition wait]
#4  0x325c781c in -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:]
#5  0x32649b86 in -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:modes:]
#6  0x31e421fa in -[PLCropOverlay(PhotoSaving) _backgroundSavePhoto:]
#7  0x325d8388 in -[NSThread main]
#8  0x3264a5cc in __NSThread__main__
#9  0x367cd310 in _pthread_start

0 个答案:

没有答案