我在 iOS7 中使用应用程序时遇到了一个非常奇怪的崩溃。它基本上是我正在开发的电子阅读器应用程序,在打开一本书并将 iPad 置于 sleep 状态时,整个 iPad 崩溃了!!!它只是不会崩溃,它会完全卡住,用户将不得不通过按住主屏幕和锁定按钮来硬重置它。如果他们不这样做,iPad 将在 5 分钟后重新启动,但在此期间,iPad 会完全卡住。
我花了很多时间检查所有线程是否干净,尝试删除所有应用程序委托(delegate)方法,如“applicationWillResignActive”、“applicationDidEnterBackground”等,但没有成功!
我正在添加控制台的日志:
Oct 21 13:53:45 iPad backboardd[29] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
Oct 21 13:53:45 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 0 (set level to 0x37e)
Oct 21 13:53:45 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 0
Oct 21 13:53:45 iPad kernel[0] <Debug>: AppleMultitouchZ2SPI: updating power statistics
Oct 21 13:53:45 iPad backboardd[29] <Notice>: MultitouchHID: detection mode: 0->255
Oct 21 13:53:45 iPad SpringBoard[33] <Warning>: [MPUNowPlayingController] Not registered for now playing notifications. Ignoring call to -unregisterForNotifications.
Oct 21 13:53:45 iPad profiled[177] <Notice>: (Note ) profiled: Service starting...
Oct 21 13:53:46 iPad Lightsail[173] <Warning>: RTMPClient -> disconnect: *** DISCONNECT... *** <retainCount == 1
Oct 21 13:53:46 iPad Lightsail[173] <Warning>: --------------------------------------- doDisconnect
Oct 21 13:53:46 iPad Lightsail[173] <Warning>: applicationWillResignActive
Oct 21 13:53:46 iPad Lightsail[173] <Notice>: TestFlight: End of Session
Oct 21 13:53:49 iPad Lightsail[173] <Warning>: applicationDidEnterBackground
Oct 21 13:53:49 iPad Lightsail[173] <Warning>: App is up to date
Oct 21 13:53:49 iPad Lightsail[173] <Warning>: {(
<UserSession: 0x177a7df0> (entity: UserSession; id: 0x1784d1d0 <x-coredata://2A1EBEB3-C354-4626-B699-7FEAA7C39D16/UserSession/p1> ; data: {
actualSessionID = 51923;
iD = "x-coredata:///UserSession/t12CF6E6E-C607-4B6B-9266-D53F0903E5199";
identifier = nil;
lastPing = "2013-10-21 11:53:42 +0000";
serverID = 1;
sessionEnd = "2013-10-21 11:53:49 +0000";
sessionID = nil;
sessionStart = "2013-10-21 11:52:17 +0000";
userSessionType = 3;
userSessionTypeID = 1308442;
}),
<UserSession: 0x17bb9e70> (entity: UserSession; id: 0x17bc5fb0 <x-coredata://2A1EBEB3-C354-4626-B699-7FEAA7C39D16/UserSession/p3> ; data: {
actualSessionID = 284053;
iD = "x-coredata:///UserSession/t12CF6E6E-C607-4B6B-9266-D53F0903E519285";
identifier = nil;
lastPing = "2013-10-21 11:53:42 +0000";
serverID = 1;
sessionEnd = "2013-10-21 11:53:49 +0000";
sessionID = nil;
sessionStart = "2013-10-21 11:53:34 +0000";
userSessionType = 1;
userSessionTypeID = 37025;
}),
<UserSession: 0x17dc5660> (entity: UserSession; id: 0x17dc5fd0 <x-coredata://2A1EBEB3-C354-4626-B699-7FEAA7C39D16/UserSession/p4> ; data: {
actualSessionID = 33899;
iD = "x-coredata:///UserSession/t12CF6E6E-C607-4B6B-9266-D53F0903E519286";
identifier = nil;
lastPing = "2013-10-21 11:53:49 +0000";
serverID = 1;
sessionEnd = "2013-10-21 11:53:49 +0000";
sessionID = nil;
sessionStart = "2013-10-21 11:53:34 +0000";
userSessionType = 7;
userSessionTypeID = 1308442;
})
)}
Oct 21 13:53:49 iPad Lightsail[173] <Warning>: ===== Server details retrieved =====
Oct 21 13:53:56 iPad profiled[177] <Notice>: (Note ) profiled: Service stopping.
Oct 21 13:55:56 iPad UserEventAgent[14] <Error>: watchdog: com.apple.backboardd not responding; forcing a crash
Oct 21 13:55:56 iPad UserEventAgent[14] <Notice>: watchdog: can be disabled with the shell command: defaults write com.apple.mobilewatchdog WatchdogEnabled -bool no
Oct 21 13:55:56 iPad ReportCrash[178] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/stacks+backboardd-2013-10-21-135556.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Oct 21 13:55:56 iPad CLTM[14] <Error>: CLTM: No ALS Event
Oct 21 13:55:56 iPad com.apple.launchd[1] (com.apple.backboardd[29]) <Notice>: (com.apple.backboardd) Exited: Killed: 9
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void IOMobileFramebuffer::swapping_client_will_stop(IOMobileFramebufferUserClient *), AppleMobileCLCD, client (0x0x96e1a600) going to wait on swap
Oct 21 13:55:57 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
Oct 21 13:55:57 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x6d0)
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void IOMobileFramebuffer::swapping_client_will_stop(IOMobileFramebufferUserClient *), AppleMobileCLCD, client (0x0x96e1a600) exiting wait on swap
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void AppleRGBOUT::do_power_state_change(): fSoft: 0 fHard: 1 swapBusy: 0 pendingSwap: 0x0 fController: 0 -> 0
Oct 21 13:55:57 iPad backboardd[179] <Notice>: void __IOHIDPlugInLoadBundles(): Loaded 5 HID plugins
Oct 21 13:55:57 iPad backboardd[179] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Oct 21 13:55:57 iPad backboardd[179] <Error>: IOHIDService compatibility thread running at priority 63 and schedule 2.
Oct 21 13:55:57 iPad backboardd[179] <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
Oct 21 13:55:57 iPad kernel[0] <Debug>: IOReturn AppleRGBOUT::set_display_device_gated(uint32_t), 1
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void AppleRGBOUT::do_power_state_change(): fSoft: 1 fHard: 1 swapBusy: 1 pendingSwap: 0x0 fController: 0 -> 1
Oct 21 13:55:57 iPad kernel[0] <Debug>: bool AppleRGBOUT::power_up_hardware()
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void AppleRGBOUT::do_power_state_change(): fSoft: 0 fHard: 1 swapBusy: 0 pendingSwap: 0x9f357a00 fController: 1 -> 1
Oct 21 13:55:57 iPad kernel[0] <Debug>: IOReturn IOMobileFramebufferUserClient::set_hotplug_notify(void *, void *) 0x32ef76d1 0x18264200
Oct 21 13:55:57 iPad kernel[0] <Debug>: IOReturn IOMobileFramebufferUserClient::set_hotplug_notify(void *, void *) 0x96e1a600 0xa8464540 0x32ef76d1 0x18264200
Oct 21 13:55:57 iPad kernel[0] <Debug>: virtual void AppleRGBOUT::do_power_state_change(): fSoft: 0 fHard: 1 swapBusy: 0 pendingSwap: 0x0 fController: 1 -> 0
Oct 21 13:55:57 iPad kernel[0] <Debug>: bool AppleRGBOUT::power_down_hardware()
Oct 21 13:55:57 iPad kernel[0] <Debug>: bool AppleRGBOUT::power_down_hardware(), clock down RGBOUT
Oct 21 13:55:57 iPad backboardd[179] <Notice>: ALS: open: legacy auto brightness plugin _plugInEnabled=true
Oct 21 13:55:57 iPad backboardd[179] <Notice>: HID: Display IOHIDDisplaySetProperty: LogLevel = 6
Oct 21 13:55:57 iPad backboardd[179] <Error>: Successfully opened the IOHIDSession
Oct 21 13:55:57 iPad backboardd[179] <Error>: HID Session async scheduling initiated.
Oct 21 13:55:57 iPad backboardd[179] <Error>: HID Session async root queue running at priority 63 and schedule 2.
Oct 21 13:55:57 iPad backboardd[179] <Error>: HID Session async scheduling complete.
Oct 21 13:55:57 iPad SpringBoard[33] <Error>: hidd died. Reestablishing connection.
Oct 21 13:55:57 iPad locationd[52] <Error>: hidd died. Reestablishing connection.
Oct 21 13:55:57 iPad SpringBoard[33] <Error>: hidd died. Reestablishing connection.
Oct 21 13:55:57 iPad UserEventAgent[14] <Error>: hidd died. Reestablishing connection.
Oct 21 13:55:57 iPad aggregated[37] <Error>: hidd died. Reestablishing connection.
Oct 21 13:55:57 iPad backboardd[179] <Notice>: MultitouchHID: device bootloaded
Oct 21 13:55:57 iPad backboardd[179] <Notice>: MultitouchHID: detection mode: 0->0
Oct 21 13:55:57 iPad backboardd[179] <Warning>: Migration complete (if performed). (Elapsed time: 0.00 seconds)
Oct 21 13:55:57 iPad imagent[56] <Warning>: [Warning] Unable to get entitlements for client task. Error: Error Domain=NSPOSIXErrorDomain Code=-1 "The operation couldn’t be completed. (POSIX error -1 - Unknown error: -1)"
Oct 21 13:55:57 iPad imagent[56] <Warning>: [Warning] Denying xpc connection, task does not have entitlement: com.apple.private.icfcallserver (SpringBoard:33)
Oct 21 13:55:57 iPad imagent[56] <Warning>: [Warning] Denying xpc connection, task does not have entitlement: com.apple.private.icfcallserver (SpringBoard:33)
Oct 21 13:55:58 iPad backboardd[179] <Warning>: -[BKSystemAppSentinel lock_bootstrap] Found running system app (com.apple.SpringBoard, pid 180). Attempting to stop it...
Oct 21 13:55:58 iPad com.apple.launchd[1] (com.apple.SpringBoard) <Notice>: (com.apple.SpringBoard) Throttling respawn: Will start in 5 seconds
Oct 21 13:55:58 iPad com.apple.launchd[1] (UIKitApplication:com.lightsail.ereader[0x9a12][173]) <Warning>: (UIKitApplication:com.lightsail.ereader[0x9a12]) Exit timeout elapsed (1 seconds). Killing
Oct 21 13:55:58 iPad com.apple.debugserver-300.2[160] <Warning>: 1 +0.000000 sec [00a0/060b]: error: ::thread_suspend (2f03) err = (os/kern) object terminated (0x00000025)
Oct 21 13:55:58 iPad com.apple.debugserver-300.2[160] <Warning>: 2 +0.001156 sec [00a0/060b]: error: ::thread_suspend (3003) err = (ipc/send) invalid destination port (0x10000003)
Oct 21 13:55:58 iPad com.apple.debugserver-300.2[160] <Warning>: 3 +0.000819 sec [00a0/060b]: error: ::task_info ( target_task = 0x1b0f, flavor = TASK_BASIC_INFO, task_info_out => 0x27d5b928, task_info_outCnt => 8 ) err = (os/kern) invalid argument (0x00000004)
Oct 21 13:55:58 iPad com.apple.debugserver-300.2[160] <Warning>: 4 +0.033603 sec [00a0/1207]: error: ::read ( -1, 0x3c69ec, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Oct 21 13:55:58 iPad com.apple.debugserver-300.2[160] <Warning>: Exiting.
Oct 21 13:56:03 iPad backboardd[179] <Warning>: Telling the system app that it can start immediately
Oct 21 13:56:03 iPad SpringBoard[183] <Warning>: Loaded logger: SBAppInstallationLog
Oct 21 13:56:03 iPad SpringBoard[183] <Warning>: Loaded logger: SBIconLog
Oct 21 13:56:03 iPad SpringBoard[183] <Warning>: Loaded logger: SBWorkspaceLogging
Oct 21 13:56:03 iPad SpringBoard[183] <Warning>: *** error reading settings archive file: <SBRootSettings: /var/mobile/Documents/com.apple.springboard.settings/RootSettings.plist>
Oct 21 13:56:03 iPad backboardd[179] <Warning>: -[BKSystemAppSentinel lock_notePresenceOfSystemApp:] Now monitoring "com.apple.SpringBoard"
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:200: string SBNonDefaultSystemAppTag is not a valid gestalt question
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:200: string hidden is not a valid gestalt question
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:837: front-facing-camera cannot generate notifications yet
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:835: ipad is static and will never generate a notification
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:835: any-telephony is static and will never generate a notification
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:835: stand-alone-contacts is static and will never generate a notification
Oct 21 13:56:04 iPad SpringBoard[183] <Error>: libMobileGestalt MobileGestalt.c:835: still-camera is static and will never generate a notification
Oct 21 13:56:04 iPad profiled[185] <Notice>: (Note ) profiled: Service starting...
Oct 21 13:56:04 iPad SpringBoard[183] <Warning>: lockdown says the device is: [Activated], state is 3
Oct 21 13:56:05 iPad misd[186] <Notice>: unable to read plist for gettingmax wireless hosts
Oct 21 13:56:05 iPad SpringBoard[183] <Warning>: BTM: attaching to BTServer
Oct 21 13:56:05 iPad SpringBoard[183] <Warning>: [Warning] Services all disappeared, removing all dependent devices
Oct 21 13:56:05 iPad SpringBoard[183] <Warning>: Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this
Oct 21 13:56:05 iPad backboardd[179] <Notice>: MultitouchHID: detection mode: 0->5
Oct 21 13:56:06 iPad SpringBoard[183] <Warning>: Application windows are expected to have a root view controller at the end of application launch
Oct 21 13:56:06 iPad SpringBoard[183] <Error>: WiFi: Consulting "no-sdio-devices" property.
Oct 21 13:56:06 iPad SpringBoard[183] <Error>: WiFi: "no-sdio-devices" property not found.
Oct 21 13:56:06 iPad kernel[0] <Debug>: launchd[188] Container: /private/var/mobile/Applications/4867203C-7B23-44F5-B161-398914C62FE5 (sandbox)
Oct 21 13:56:07 iPad SpringBoard[183] <Warning>: SMS Plugin initialized.
Oct 21 13:56:07 iPad SpringBoard[183] <Error>: WiFi: Consulting "no-sdio-devices" property.
Oct 21 13:56:07 iPad SpringBoard[183] <Error>: WiFi: "no-sdio-devices" property not found.
Oct 21 13:56:07 iPad SpringBoard[183] <Warning>: WiFi picker plugin initialized
Oct 21 13:56:07 iPad SpringBoard[183] <Notice>: 2013-10-21 13:56:07.137|183|0x16e8cdb0: Region monitoring not available or enabled. Trigger ignored!
Oct 21 13:56:09 iPad syncdefaultsd[189] <Notice>: (Note ) SYDAlwaysOnAccount: no account (null)
Oct 21 13:56:09 iPad syncdefaultsd[189] <Notice>: (Note ) SYDAccount: no account
Oct 21 13:56:09 iPad syncdefaultsd[189] <Notice>: (Note ) SYDPIMAccount: no account (null)
Oct 21 13:56:15 iPad backboardd[179] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
Oct 21 13:56:15 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 0 (set level to 0x37e)
Oct 21 13:56:15 iPad kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 0
Oct 21 13:56:15 iPad kernel[0] <Debug>: AppleMultitouchZ2SPI: updating power statistics
Oct 21 13:56:15 iPad backboardd[179] <Notice>: MultitouchHID: detection mode: 5->255
Oct 21 13:56:17 iPad profiled[185] <Notice>: (Note ) profiled: Service stopping.
正如您在行中所见: 10 月 21 日 13:55:58 iPad com.apple.launchd[1] (UIKitApplication:com.lightsail.ereader[0x9a12][173]) : (UIKitApplication:com.lightsail.ereader[0x9a12]) 退出超时已过(1 秒).杀戮
它说了一些关于退出超时的事情。 com.lightsail.ereader 是我的应用程序的标识符。
最佳答案
没关系。这是一个试图访问导致 iPad 崩溃的设备分区的 C++ 文件。我设法通过删除该代码来解决问题。如果其他人面临同样的问题,那么我建议他们检查代码中的文件操作以隔离问题。
关于iOS 7 应用程序崩溃整个 iPad,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19493959/
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
对于具有离线功能的智能手机应用程序,我正在为Xml文件创建单向文本同步。我希望我的服务器将增量/差异(例如GNU差异补丁)发送到目标设备。这是计划:Time=0Server:hasversion_1ofXmlfile(~800kiB)Client:hasversion_1ofXmlfile(~800kiB)Time=1Server:hasversion_1andversion_2ofXmlfile(each~800kiB)computesdeltaoftheseversions(=patch)(~10kiB)sendspatchtoClient(~10kiBtransferred)Cl
Rackup通过Rack的默认处理程序成功运行任何Rack应用程序。例如:classRackAppdefcall(environment)['200',{'Content-Type'=>'text/html'},["Helloworld"]]endendrunRackApp.new但是当最后一行更改为使用Rack的内置CGI处理程序时,rackup给出“NoMethodErrorat/undefinedmethod`call'fornil:NilClass”:Rack::Handler::CGI.runRackApp.newRack的其他内置处理程序也提出了同样的反对意见。例如Rack
我想用ruby编写一个小的命令行实用程序并将其作为gem分发。我知道安装后,Guard、Sass和Thor等某些gem可以从命令行自行运行。为了让gem像二进制文件一样可用,我需要在我的gemspec中指定什么。 最佳答案 Gem::Specification.newdo|s|...s.executable='name_of_executable'...endhttp://docs.rubygems.org/read/chapter/20 关于ruby-在Ruby中编写命令行实用程序
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我构建了两个需要相互通信和发送文件的Rails应用程序。例如,一个Rails应用程序会发送请求以查看其他应用程序数据库中的表。然后另一个应用程序将呈现该表的json并将其发回。我还希望一个应用程序将存储在其公共(public)目录中的文本文件发送到另一个应用程序的公共(public)目录。我从来没有做过这样的事情,所以我什至不知道从哪里开始。任何帮助,将不胜感激。谢谢! 最佳答案 无论Rails是什么,几乎所有Web应用程序都有您的要求,大多数现代Web应用程序都需要相互通信。但是有一个小小的理解需要你坚持下去,网站不应直接访问彼此
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
刚入门rails,开始慢慢理解。有人可以解释或给我一些关于在application_controller中编码的好处或时间和原因的想法吗?有哪些用例。您如何为Rails应用程序使用应用程序Controller?我不想在那里放太多代码,因为据我了解,每个请求都会调用此Controller。这是真的? 最佳答案 ApplicationController实际上是您应用程序中的每个其他Controller都将从中继承的类(尽管这不是强制性的)。我同意不要用太多代码弄乱它并保持干净整洁的态度,尽管在某些情况下ApplicationContr
当我在Rails控制台中按向上或向左箭头时,出现此错误:irb(main):001:0>/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/rb-readline-0.4.2/lib/rbreadline.rb:4269:in`blockin_rl_dispatch_subseq':invalidbytesequenceinUTF-8(ArgumentError)我使用rvm来管理我的ruby安装。我正在使用=>ruby-2.0.0-p247[x86_64]我使用bundle来管理我的gem,并且我有rb-readline(0.4.2)(人们推荐的最少
我是一个Rails初学者,但我想从我的RailsView(html.haml文件)中查看Ruby变量的内容。我试图在ruby中打印出变量(认为它会在终端中出现),但没有得到任何结果。有什么建议吗?我知道Rails调试器,但更喜欢使用inspect来打印我的变量。 最佳答案 您可以在View中使用puts方法将信息输出到服务器控制台。您应该能够在View中的任何位置使用Haml执行以下操作:-puts@my_variable.inspect 关于ruby-on-rails-如何在我的R