开发者

UIImagePickerController allowsEditing Hangs

When I set allowsEditing to YES on the image picker, the controller hangs after I hit "Choose".

While the repro is not consistent, it tends to happen when the app is busy in the background getting data from the server. Looking at the stack, the PL seems to be having a deadlock while saving an image in the background.

The delegate is simply not called. So it is not in the handler's code.

I added logic to dismiss the on low-memory warnings etc. yet I am still getting these occasional (way too frequent to my taste) freezes.

Has anyone seen that? Any known workaround? I have been googling this to no avail.

The pertinent thread stacks are below:

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 UIApplic开发者_JS百科ationMain
#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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜