Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 应用程序在7分钟后不能正常工作?_Iphone_Ios_Memory Leaks_Crash - Fatal编程技术网

Iphone 应用程序在7分钟后不能正常工作?

Iphone 应用程序在7分钟后不能正常工作?,iphone,ios,memory-leaks,crash,Iphone,Ios,Memory Leaks,Crash,我正在开发iPhone应用程序。这个应用程序在开始的6到7分钟内运行良好,但在那之后,我的应用程序的一些功能就不起作用了。例如,我在我的应用程序中使用NSTimer使用时钟声音效果,它工作6或7分钟后,它会自动静音,然后再次执行此代码 -(IBAction)retryagain { PlistDemoViewController *sec=[[PlistDemoViewController alloc] initWithNibName:@"PlistDemoViewC

我正在开发iPhone应用程序。这个应用程序在开始的6到7分钟内运行良好,但在那之后,我的应用程序的一些功能就不起作用了。例如,我在我的应用程序中使用NSTimer使用时钟声音效果,它工作6或7分钟后,它会自动静音,然后再次执行此代码

   -(IBAction)retryagain
   {    
    PlistDemoViewController *sec=[[PlistDemoViewController alloc] initWithNibName:@"PlistDemoViewController" bundle:nil];
    [self presentModalViewController:sec animated:YES];
    [sec release];
    }
这段代码在6或7分钟前运行良好,但在那之后它崩溃了,我的控制台如下所示

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:
'Could not load NIB in bundle: 'NSBundle </Users/moon/Library/Application
Support/iPhone Simulator/4.1/Applications/B4AA89F7-E4C8-47D1-B50E-291236543EBF
/PlistDemo.app> (loaded)' with name 'PlistDemoViewController''


              *** Call stack at first throw:
(
0   CoreFoundation                      0x029cbb99 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x027c040e objc_exception_throw + 47
2   CoreFoundation                      0x02984238 +[NSException raise:format:arguments:] + 136
3   CoreFoundation                      0x029841aa +[NSException raise:format:] + 58
4   UIKit                               0x004c84f8 -[UINib instantiateWithOwner:options:] + 2024
5   UIKit                               0x004c9eb5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
6   UIKit                               0x0037f95f -[UIViewController _loadViewFromNibNamed:bundle:] + 70
7   UIKit                               0x0037d675 -[UIViewController loadView] + 120
8   UIKit                               0x0037d54f -[UIViewController view] + 56
9   UIKit                               0x0037ede3 -[UIViewController viewControllerForRotation] + 36
10  UIKit                               0x0037b026 -[UIViewController _visibleView] + 90
11  UIKit                               0x006411d2 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 269
12  UIKit                               0x002f9d17 -[UIWindow _setRotatableClient:toOrientation:duration:force:] + 921
13  UIKit                               0x0056c67b -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 768
14  UIKit                               0x0038110d -[UIViewController presentModalViewController:withTransition:] + 2937
15  PlistDemo                           0x00002cd3 -[PlistDemoViewController retryagain] + 115
16  UIKit                               0x002d37f8 -[UIApplication sendAction:to:from:forEvent:] + 119
17  UIKit                               0x0035ede0 -[UIControl sendAction:to:forEvent:] + 67
18  UIKit                               0x00361262 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
19  UIKit                               0x0035fe0f -[UIControl touchesEnded:withEvent:] + 458
20  UIKit                               0x002f73d0 -[UIWindow _sendTouchesForEvent:] + 567
21  UIKit                               0x002d8cb4 -[UIApplication sendEvent:] + 447
22  UIKit                               0x002dd9bf _UIApplicationHandleEvent + 7672
23  GraphicsServices                    0x03516822 PurpleEventCallback + 1550
24  CoreFoundation                      0x029acff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
25  CoreFoundation                      0x0290d807 __CFRunLoopDoSource1 + 215
26  CoreFoundation                      0x0290aa93 __CFRunLoopRun + 979
27  CoreFoundation                      0x0290a350 CFRunLoopRunSpecific + 208
28  CoreFoundation                      0x0290a271 CFRunLoopRunInMode + 97
29  GraphicsServices                    0x0351500c GSEventRunModal + 217
30  GraphicsServices                    0x035150d1 GSEventRun + 115
31  UIKit                               0x002e1af2 UIApplicationMain + 1160
32  PlistDemo                           0x00002a5e main + 84
33  PlistDemo                           0x00002a01 start + 53
34  ???                                 0x00000001 0x0 + 1
    )

terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
Data Formatters unavailable (Error calling dlopen for: "/Developer/Applications    /Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib": "dlopen(/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib, 10): no suitable image found.  Did find:
/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib: open() failed with errno=24")
 (gdb)  
由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:
'无法在名为'PlistDemoViewController'的捆绑包'NSBundle(loaded)'中加载NIB'
***第一次抛出时调用堆栈:
(
0 CoreFoundation 0x029cbb99例外预处理+185
1 libobjc.A.dylib 0x027c040e objc_异常_抛出+47
2 CoreFoundation 0x02984238+[N异常提升:格式:参数:][136
3 CoreFoundation 0x029841aa+[N异常提升:格式:][58
4 UIKit 0x004c84f8-[UINib实例化所有者:选项:][2024
5 UIKit 0x004c9eb5-[NSBundle(UINSBUNDLEADTIONS)LOADNIBNAME:所有者:选项:][168
6 UIKit 0x0037f95f-[UIViewController\u LoadViewFromNibName:bundle:][70
7 UIKit 0x0037d675-[UIViewController loadView]+120
8 UIKit 0x0037d54f-[UIVIEW控制器视图]+56
9 UIKit 0x0037ede3-[UIViewController视图控制器旋转]+36
10 UIKit 0x0037b026-[UIViewController_visibleView]+90
11 UIKit 0x006411d2-[UIClientRotationContext initWithClient:TooOrientation:duration:andWindow:+269
12 UIKit 0x002f9d17-[UIWindow\u setRotatableClient:TooOrientation:duration:force:+921
13 UIKit 0x0056c67b-[UIWindowController转换:从ViewController:到ViewController:目标:DiEndSelector:+768
14 UIKit 0x0038110d-[UIViewController presentModalViewController:带转换:][2937
15 PlistDemo 0x00002cd3-[PlistDemoViewController重试]+115
16 UIKit 0x002d37f8-[UIApplication sendAction:to:from:forEvent:+119
17 UIKit 0x0035ede0-[UIControl发送操作:到:forEvent:+67
18 UIKit 0x00361262-[UIControl(内部)\u发送操作预防:带事件:][527
19 UIKit 0x0035fe0f-[UIControl触摸已选择:带事件:][458
20 UIKit 0x002f73d0-[UIWindow\u sendTouchesForEvent:+567
21 UIKit 0x002d8cb4-[UIApplication sendEvent:+447
22 UIKit 0x002dd9bf _UIApplicationHandleEvent+7672
23图形服务0x03516822 PurpleEventCallback+1550
24 CoreFoundation 0x029acff4\uuuuCFRUNLOOP\u正在调用\uuU OUT\uU至\uU A\uU源1\uU执行功能\uuuu52
25 CoreFoundation 0x0290d807\uuu CFRunLoopDoSource1+215
26 CoreFoundation 0x0290aa93 _ucfrunlooprun+979
27 CoreFoundation 0x0290a350 CFRUNLOOPS+208
28 CoreFoundation 0x0290a271 CFRUNLOOPSRUNINMODE+97
29图形服务0x0351500c GSEventRunModal+217
30个图形服务0x035150d1 GSEventRun+115
31 UIKit 0x002e1af2 UIApplicationMain+1160
32 PlistDemo 0x00002a5e干管+84
33 PlistDemo 0x00002a01启动+53
34°?0x00000001 0x0+1
)
在抛出“NSException”实例后调用terminate
程序收到信号:“SIGABRT”。
数据格式化程序不可用(调用dlopen时出错:“/Developer/Applications/Xcode.app/Contents/PlugIns/gdbmidugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib:”dlopen(/Developer/Applications/Xcode.app/Contents/PlugIns/gdbmiduggins/PBGDBIntrospectionSupport.A.dylib,10):未找到合适的图像。未找到:
/Developer/Applications/Xcode.app/Contents/PlugIns/gdbmidegulation.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib:open()失败,错误号为24“)
(gdb)
任何人都可以为我提供有关此问题的指导?

编辑2:

你会尝试使用这个代码吗

PlistDemoViewController *sec= [[PlistDemoViewController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:sec animated:YES];
因为你的nib是以你的控制器命名的,所以is也应该这样做;我只希望,不会崩溃

编辑:

如果仔细阅读错误消息:

'无法在名为'PlistDemoViewController'的捆绑包中加载NIB:'NSBundle(loaded)'

它表示找不到PlistDemoViewController

你能检查一下这个名字拼写是否正确吗

旧答案:

您正在
PlistDemoViewController
retryreach
方法中显示模式视图,但失败。我的建议是让你
检查您传入的所有参数,并再次检查您试图显示的xib的定义。

您用于计划计时器的时间间隔是多少

实际上,以动画方式呈现视图控制器需要一些时间


请在时间间隔中再增加5秒,或在不显示动画的情况下显示视图控制器。我想这会对你有所帮助。

你能检查一下第115行或附近的-[PlistDemoViewController retryagain]代码吗?@san检查我的编辑,然后再检查一遍@sergio我清楚地检查了所有这些事情,我想可能是由于内存泄漏。R我的控制台显示内存泄漏。?从控制台日志中,无法判断是否存在内存泄漏。你可以在instruments下运行应用程序来检查,但如果问题是由scar引起的