ios – 在暂停休息后间歇性地选择TableViewCell时,iPhone应用程序冻结

ios – 在暂停休息后间歇性地选择TableViewCell时,iPhone应用程序冻结,第1张

概述在过去的两周里,我一直在努力解决这个问题 – 在搜索我的代码或堆栈溢出后无法找到解决方案. 问题: 我有一个带有tableView的View Controller,带有单元格.大多数时候,当我点击其中一个单元格将我推送到另一个View Controller时,它运行正常.但有时当我点击一个单元格时,该应用程序冻结.它不会崩溃 – 只是冻结.我通常必须按下主页按钮,再次启动应用程序 – 此时启动需 在过去的两周里,我一直在努力解决这个问题 – 在搜索我的代码或堆栈溢出后无法找到解决方案.

问题:

我有一个带有tableVIEw的VIEw Controller,带有单元格.大多数时候,当我点击其中一个单元格将我推送到另一个VIEw Controller时,它运行正常.但有时当我点击一个单元格时,该应用程序会冻结.它不会崩溃 – 只是冻结.我通常必须按下主页按钮,再次启动应用程序 – 此时启动需要永久,导致应用程序崩溃.然后我启动应用程序AGAIN,它返回到我的应用程序的第一页.

我发现很难复制 – 在正常启动和使用它工作正常.这似乎通常发生在我在背景中使用应用程序一段时间,或设备已锁定.除了内存清理所需的变量之外,还不完全确定这会如何影响事物.

作为一个注释,我使用PrettyKit库,所以我的单元格是prettytableVIEwCells.

崩溃报告:

IncIDent IDentifIEr: A58F4152-0593-481D-8269-1A8115739349CrashReporter Key:   2dc2c9f2bdbc6370165a53719bc7610fcbe36dddHarDWare Model:      iPhone4,1Process:         Yoga [50409]Path:            /var/mobile/Applications/DEE2950F-4629-43D4-BA6E-349E4119094F/Yoga.app/YogaIDentifIEr:      YogaVersion:         ??? (???)Code Type:       ARM (Native)Parent Process:  launchd [1]Date/Time:       2013-04-23 10:41:02.152 +1000OS Version:      iOS 6.1.3 (10B329)Report Version:  104Exception Type:  00000020Exception Codes: 0x000000008badf00dHighlighted Thread:  0Application Specific information:Yoga [50409] has active assertions beyond permitted time: {(    <BKProcessAssertion: 0x1f590b90> IDentifIEr: Suspending process: Yoga[50409] permittedBackgroundDuration: 10.000000 reason: suspend owner pID:26 preventSuspend  preventThrottleDowncpu  preventThrottleDownUI )}Elapsed total cpu time (seconds): 8.260 (user 8.260,system 0.000),67% cpu Elapsed application cpu time (seconds): 5.953,49% cpuThread 0 name:  dispatch queue: com.apple.main-threadThread 0:0   CoreFoundation                  0x313a21fa -[__NSSetM addobject:] + 3261   Foundation                      0x31dfd1f8 __44-[NSISEngine fixupIntegralizationViolations]_block_invoke_0 + 8682   Foundation                      0x31dfe9a4 -[NSISEngine withoutoptimizingAtEndRunBlockWithautomaticoptimizationDisabled:] + 1043   Foundation                      0x31dfce8a -[NSISEngine fixupIntegralizationViolations] + 904   Foundation                      0x31dfe766 -[NSISEngine optimize] + 745   Foundation                      0x31dffc4e -[NSISEngine constraintDIDChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:] + 826   Foundation                      0x31dffcc8 -[NSISEngine trytochangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:] + 567   Foundation                      0x31e0564e -[NSLayoutConstraint _trytochangeContainerGeometryWithUndoHandler:] + 2668   Foundation                      0x31e059d6 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 3829   UIKit                           0x3368e14a -[UIVIEw(UIConstraintBasedLayout) _autoresizingConstraints_frameDIDChange] + 34210  UIKit                           0x33253c32 -[UIVIEw(Geometry) setFrame:] + 55811  UIKit                           0x3329ec4c -[UItableVIEwCellContentVIEw setFrame:] + 4812  Foundation                      0x31d03ff2 _NSSetRectValueAndNotify + 10613  UIKit                           0x332a18cc -[UItableVIEwCellLayoutManager layoutSubvIEwsOfCell:] + 218814  UIKit                           0x332a0968 -[UItableVIEwCell layoutSubvIEws] + 5615  UIKit                           0x332557fe -[UIVIEw(CALayerDelegate) layoutSublayersOfLayer:] + 25416  QuartzCore                      0x32fffd86 -[CALayer layoutSublayers] + 21017  QuartzCore                      0x32fff924 CA::Layer::layout_if_needed(CA::Transaction*) + 45618  QuartzCore                      0x33000858 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 1219  QuartzCore                      0x3300023e CA::Context::commit_transaction(CA::Transaction*) + 23420  QuartzCore                      0x3300004c CA::Transaction::commit() + 31221  QuartzCore                      0x32fffeac CA::Transaction::observer_callback(__CFRunLoopObserver*,unsigned long,voID*) + 5622  CoreFoundation                  0x3141f6ca __CFRUNLOOP_IS_CALliNG_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 1823  CoreFoundation                  0x3141d9bc __CFRunLoopDoObservers + 27224  CoreFoundation                  0x3141dd12 __CFRunLoopRun + 73825  CoreFoundation                  0x31390eb8 CFRunLoopRunspecific + 35226  CoreFoundation                  0x31390d44 CFRunLoopRunInMode + 10027  GraphiCSServices                0x34f692e6 GSEventRunModal + 7028  UIKit                           0x332a62fc UIApplicationMain + 111629  Yoga                            0x000af198 0xae000 + 450430  libdyld.dylib                   0x395a9b1c start + 0Thread 1 name:  dispatch queue: com.apple.libdispatch-managerThread 1:0   libsystem_kernel.dylib          0x39660648 kevent64 + 241   libdispatch.dylib               0x39590974 _dispatch_mgr_invoke + 7922   libdispatch.dylib               0x39590654 _dispatch_mgr_thread$VARIANT$mp + 32Thread 2 name:  WebThreadThread 2:0   libsystem_kernel.dylib          0x396700fc __psynch_mutexwait + 241   libsystem_c.dylib               0x395b9124 pthread_mutex_lock + 3882   WebCore                         0x373a6418 _WebTryThreadLock(bool) + 1843   WebCore                         0x373a634a WebRunLoopLock(__CFRunLoopObserver*,voID*) + 424   CoreFoundation                  0x3141f6ca __CFRUNLOOP_IS_CALliNG_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 185   CoreFoundation                  0x3141d9bc __CFRunLoopDoObservers + 2726   CoreFoundation                  0x3141dde8 __CFRunLoopRun + 9527   CoreFoundation                  0x31390eb8 CFRunLoopRunspecific + 3528   CoreFoundation                  0x31390d44 CFRunLoopRunInMode + 1009   WebCore                         0x373a4500 RunWebThread(voID*) + 44010  libsystem_c.dylib               0x395c930e _pthread_start + 30611  libsystem_c.dylib               0x395c91d4 thread_start + 4Thread 3 name:  com.apple.NSURLConnectionLoaderThread 3:0   libsystem_kernel.dylib          0x3965feb4 mach_msg_trap + 201   libsystem_kernel.dylib          0x39660048 mach_msg + 362   CoreFoundation                  0x3141f040 __CFRunLoopServiceMachPort + 1243   CoreFoundation                  0x3141dd9e __CFRunLoopRun + 8784   CoreFoundation                  0x31390eb8 CFRunLoopRunspecific + 3525   CoreFoundation                  0x31390d44 CFRunLoopRunInMode + 1006   Foundation                      0x31cdd3d0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 3047   Foundation                      0x31d60e80 __NSThread__main__ + 9688   libsystem_c.dylib               0x395c930e _pthread_start + 3069   libsystem_c.dylib               0x395c91d4 thread_start + 4Thread 4 name:  com.apple.CFSocket.privateThread 4:0   libsystem_kernel.dylib          0x39670594 __select + 201   CoreFoundation                  0x314231f2 __CFSocketManager + 6742   libsystem_c.dylib               0x395c930e _pthread_start + 3063   libsystem_c.dylib               0x395c91d4 thread_start + 4Thread 5 name:  JavaScriptCore::BlockFreeThread 5:0   libsystem_kernel.dylib          0x3967008c __psynch_cvwait + 241   libsystem_c.dylib               0x395c1d2a _pthread_cond_wait + 6422   libsystem_c.dylib               0x395c1aa0 pthread_cond_timeDWait + 403   JavaScriptCore                  0x3535fc70 WTF::ThreadCondition::timeDWait(WTF::Mutex&,double) + 1044   JavaScriptCore                  0x35471552 JsC::BlockAllocator::blockFreeingThreadMain() + 785   JavaScriptCore                  0x35483fa8 WTF::wtfThreadEntryPoint(voID*) + 126   libsystem_c.dylib               0x395c930e _pthread_start + 3067   libsystem_c.dylib               0x395c91d4 thread_start + 4Thread 6 name:  JavaScriptCore::MarkingThread 6:0   libsystem_kernel.dylib          0x3967008c __psynch_cvwait + 241   libsystem_c.dylib               0x395c1d2a _pthread_cond_wait + 6422   libsystem_c.dylib               0x395cbf14 pthread_cond_wait + 363   JavaScriptCore                  0x35404f3c JsC::SlotVisitor::drainFromShared(JsC::SlotVisitor::SharedDrainMode) + 1444   JavaScriptCore                  0x35404e7c JsC::MarkStackThreadSharedData::markingThreadMain() + 1405   JavaScriptCore                  0x35483fa8 WTF::wtfThreadEntryPoint(voID*) + 126   libsystem_c.dylib               0x395c930e _pthread_start + 3067   libsystem_c.dylib               0x395c91d4 thread_start + 4Thread 7 name:  WebCore: CFNetwork LoaderThread 7:0   libsystem_kernel.dylib          0x3965feb4 mach_msg_trap + 201   libsystem_kernel.dylib          0x39660048 mach_msg + 362   CoreFoundation                  0x3141f040 __CFRunLoopServiceMachPort + 1243   CoreFoundation                  0x3141dd9e __CFRunLoopRun + 8784   CoreFoundation                  0x31390eb8 CFRunLoopRunspecific + 3525   CoreFoundation                  0x31390d44 CFRunLoopRunInMode + 1006   WebCore                         0x3743ed02 WebCore::runLoaderThread(voID*) + 1387   JavaScriptCore                  0x35483fa8 WTF::wtfThreadEntryPoint(voID*) + 128   libsystem_c.dylib               0x395c930e _pthread_start + 3069   libsystem_c.dylib               0x395c91d4 thread_start + 4UnkNown thread crashed with unkNown flavor: 5,state_count: 1

码:

我已通过日志记录确定代码在冻结之前成功通过了我的dIDSelectRowAtIndexPath和prepareForSegue方法.因此我认为它与表格单元构造有关?或者我没有解决的一些内存问题?

- (voID)tableVIEw:(UItableVIEw *)tableVIEw dIDSelectRowAtIndexPath:(NSIndexPath *)indexPath{    [self performSegueWithIDentifIEr:@"logPracticeDetails" sender:indexPath];    [self.tableVIEw deselectRowAtIndexPath:indexPath animated:YES];}- (voID)prepareForSegue:(UIStoryboardSegue *)segue sender:(ID)sender{    NSIndexPath *indexPath = sender;    if ([segue.IDentifIEr isEqualToString:@"logPracticeDetails"])    {        YLLogPracticeVIEwController *controller = segue.destinationVIEwController;        controller.logPractice = [self.logEntry.logEntryPractices objectAtIndex:indexPath.row];    }}

任何帮助非常感谢.

解决方法 对于仍然有类似问题的人,我发现原因是我的项目中的autoLayout.

我所要做的就是为我的UIVIEwController停用autoLayout并冻结冻结.

总结

以上是内存溢出为你收集整理的ios – 在暂停/休息后间歇性地选择TableViewCell时,iPhone应用程序冻结全部内容,希望文章能够帮你解决ios – 在暂停/休息后间歇性地选择TableViewCell时,iPhone应用程序冻结所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/web/1020785.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存