- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 IOS 应用程序在 Debug模式下工作没有问题,提交后已被苹果审核团队拒绝(IPV6 连接...等),我已经为 Release模式生成了 .ipa 文件来测试我的应用程序是否有一个真正的崩溃问题,我发现它确实像他们提到的那样崩溃了。
注意:崩溃问题不是由 IPV6 引起的,因为它也会在 IPV4 上崩溃
首先我想知道为什么在 Debug模式下不会发生此崩溃?其次,经过两天的挖掘,到现在我还没弄清楚我的应用程序崩溃问题的主要原因是什么??
这是我的代码:
import UIKit
import SDWebImage
class Codingtbl: UITableViewController {
@IBOutlet var imgtbl: UITableView!
var imgarray = [Images]()
let backendless = Backendless()
override func viewDidLoad() {
super.viewDidLoad()
imgtbl.delegate=self
imgtbl.dataSource=self
}
override func viewDidAppear(_ animated: Bool) {
loaddatawithquery()
}
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return imgarray.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let cell = self.imgtbl.dequeueReusableCell(withIdentifier: "csmcell") as! csmcell{
let imgurl = URL(string : self.imgarray [(indexPath as NSIndexPath).row].imgurl!)
cell.imgiv.sd_setImage(with: imgurl)
return cell
}else{
let cell = csmcell()
let imgurl = URL(string : self.imgarray [(indexPath as NSIndexPath).row].imgurl!)
cell.imgiv.sd_setImage(with: imgurl)
return cell
}
}
func loaddatawithquery(){
let whereClause = "catogary ='telecom'"
let dataQuery = BackendlessDataQuery()
dataQuery.queryOptions.pageSize=50
dataQuery.whereClause = whereClause
backendless.data.of(Images.ofClass()).find(dataQuery,response: {(result: BackendlessCollection?) -> Void in
let data = result?.getCurrentPage() as! [Images]
for obj in data {
self.imgarray.append(obj)
}
self.imgtbl.reloadData()
},
error: { (fault: Fault?) -> Void in
let alert = UIAlertController(title: "info", message:"Please connect to the internet", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default) { _ in
let viewController = self.storyboard?.instantiateViewController(withIdentifier: "mainmenu") as! Main_Menu
self.navigationController?.pushViewController(viewController, animated: true)
})
self.present(alert, animated: true){}
})
}
}
和崩溃报告:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018d83a014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018d901460 pthread_kill + 112
2 libsystem_c.dylib 0x000000018d7ae3f4 abort + 140
3 libswiftCore.dylib 0x00000001004e7570 swift_deletedMethodError (__hidden#17462_:282)
4 libswiftCore.dylib 0x00000001004ccfdc _hidden#16819_ (__hidden#16861_:392)
5 libswiftCore.dylib 0x00000001004cd06c swift_dynamicCastClass (__hidden#16861_:478)
6 libswiftCore.dylib 0x00000001004cdbd0 swift_dynamicCastUnknownClassUnconditional (__hidden#16793_:49)
7 libswiftCore.dylib 0x00000001004d00a4 _hidden#16825_ (__hidden#16861_:1637)
8 libswiftCore.dylib 0x00000001004cec6c swift_dynamicCast (__hidden#16861_:1676)
9 libswiftCore.dylib 0x00000001004cefb8 swift_dynamicCast (__hidden#16861_:1684)
10 Horizon Wave 0x00000001000ca15c _hidden#659_ (__hidden#722_:0)
11 Horizon Wave 0x00000001000caaf8 _hidden#664_ (__hidden#722_:0)
12 Horizon Wave 0x00000001000cafb4 _hidden#667_ (__hidden#722_:0)
13 Horizon Wave 0x00000001000cb868 _hidden#672_ (__hidden#722_:0)
14 Horizon Wave 0x00000001000f88c4 _hidden#3021_ (__hidden#3052_:302)
15 Horizon Wave 0x00000001000f8364 _hidden#3011_ (__hidden#3052_:208)
16 Horizon Wave 0x00000001000f8388 _hidden#3011_ (__hidden#3052_:214)
17 Horizon Wave 0x00000001000cdbb4 _hidden#1017_ (__hidden#1060_:290)
18 libdispatch.dylib 0x000000018d6f5200 _dispatch_call_block_and_release + 24
19 libdispatch.dylib 0x000000018d6f51c0 _dispatch_client_callout + 16
20 libdispatch.dylib 0x000000018d6f9d6c _dispatch_main_queue_callback_4CF + 1000
21 CoreFoundation 0x000000018e819f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
22 CoreFoundation 0x000000018e817b18 __CFRunLoopRun + 1660
23 CoreFoundation 0x000000018e746048 CFRunLoopRunSpecific + 444
24 GraphicsServices 0x00000001901c9198 GSEventRunModal + 180
25 UIKit 0x0000000194720628 -[UIApplication _run] + 684
26 UIKit 0x000000019471b360 UIApplicationMain + 208
27 Horizon Wave 0x00000001000c4768 main (__hidden#180_:12)
28 libdyld.dylib 0x000000018d7285b8 start + 4
更新我只将loaddata函数更改为
func loaddata2() {
let whereClause = "catogary ='telecom'"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
var error: Fault?
let bc = Backendless.sharedInstance().data.of(Images.ofClass()).find(dataQuery, fault: &error)
if error == nil {
for obj in bc?.data as! [Images]{
imgarray.append(obj)
print("%%%%%%%%%%%%%%%%%%%\(obj.imgurl!)")
}
self.imgtbl.reloadData()
}
else {
print("Server reported an error: \(error)")
}
崩溃报告更改如下!!
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018d83a014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018d901460 pthread_kill + 112
2 libsystem_c.dylib 0x000000018d7ae3f4 abort + 140
3 libswiftCore.dylib 0x000000010045b570 swift_deletedMethodError (__hidden#17462_:282)
4 libswiftCore.dylib 0x0000000100440fdc _hidden#16819_ (__hidden#16861_:392)
5 libswiftCore.dylib 0x000000010044106c swift_dynamicCastClass (__hidden#16861_:478)
6 libswiftCore.dylib 0x0000000100441bd0 swift_dynamicCastUnknownClassUnconditional (__hidden#16793_:49)
7 libswiftCore.dylib 0x00000001004440a4 _hidden#16825_ (__hidden#16861_:1637)
8 libswiftCore.dylib 0x0000000100442c6c swift_dynamicCast (__hidden#16861_:1676)
9 libswiftCore.dylib 0x0000000100442fb8 swift_dynamicCast (__hidden#16861_:1684)
10 Horizon Wave 0x00000001000be1d0 _hidden#661_ (__hidden#728_:0)
11 Horizon Wave 0x00000001000be5fc _hidden#664_ (__hidden#728_:0)
12 Horizon Wave 0x00000001000bd084 _hidden#636_ (__hidden#728_:0)
13 Horizon Wave 0x00000001000bc704 _hidden#625_ (__hidden#728_:0)
14 UIKit 0x00000001946cd2f0 -[UIViewController _setViewAppearState:isAnimating:] + 848
15 UIKit 0x00000001946cd854 -[UIViewController _endAppearanceTransition:] + 220
16 UIKit 0x0000000194785e48 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1236
17 UIKit 0x0000000194856fa8 __49-[UINavigationController _startCustomTransition:]_block_invoke + 232
18 UIKit 0x00000001947dcad4 -[_UIViewControllerTransitionContext completeTransition:] + 116
19 UIKit 0x000000019492cffc __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke.97 + 712
20 UIKit 0x00000001946ee024 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 492
21 UIKit 0x00000001946edb48 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
22 UIKit 0x00000001946ed988 -[UIViewAnimationState animationDidStop:finished:] + 160
23 QuartzCore 0x0000000191b76404 CA::Layer::run_animation_callbacks(void*) + 260
24 libdispatch.dylib 0x000000018d6f51c0 _dispatch_client_callout + 16
25 libdispatch.dylib 0x000000018d6f9d6c _dispatch_main_queue_callback_4CF + 1000
26 CoreFoundation 0x000000018e819f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
27 CoreFoundation 0x000000018e817b18 __CFRunLoopRun + 1660
28 CoreFoundation 0x000000018e746048 CFRunLoopRunSpecific + 444
29 GraphicsServices 0x00000001901c9198 GSEventRunModal + 180
30 UIKit 0x0000000194720628 -[UIApplication _run] + 684
31 UIKit 0x000000019471b360 UIApplicationMain + 208
32 Horizon Wave 0x00000001000b7e84 main (__hidden#180_:12)
33 libdyld.dylib 0x000000018d7285b8 start + 4
任何想法将不胜感激
最佳答案
检查调试和发布之间的不同设置。检查如果关闭优化会发生什么,这也可以让您调试代码。检查您是否有可以修复代码的日志记录语句或断言。
关于IOS 应用程序崩溃仅在 Release模式下发生?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40160379/
下面的代码旨在在首次打开工作簿时运行。 Sub Auto_Open() Dim LastRow As Integer LastRow = Sheet6.UsedRange.Rows.Count Act
当我尝试操作我的代码时,除了弹出调试错误外,它执行得很好。错误信息在这里。 我的完整代码在这里。 #include using namespace std; class String { publi
The invocation of the constructor on type 'WpfApplication1.MainWindow' that matches the specified bi
我正在使用 BaseAdapter: public class MyAdapter extends BaseAdapter{ private final LayoutInflater mInflate
我想做网页抓取。我写了代码 var connection = require('./mysqlConnection'); var c = new Crawler({ maxConnections
我的系统中发生 Java 堆空间错误。我尝试了很多来自 Stack Overflow 的解决方案,但没有任何效果。当我工作时 当按下 OK 然后 (我的项目没有错误) 我的 eclipse.ini 是
环境: i5 750 DDR3 4GWin7 专业版 x64 sp1 DXSDK 9.0c 2010 年 6 月 GeForce GT240(驱动程序 275.33)512MB MSVC 2008 s
这段代码是我写的。 import socket host = 'localhost' port = 3794 s = socket.socket(socket.AF_INET, socket.SOCK
我正在尝试引用 UTC 时间间隔获取本地日期时间,我正在执行下面的代码。 var dtString =DateTime.UtcNow.ToString(@"yyyy-MM-ddTHH\:mm\:ss
我有一个非常简单的 C# 问题,它从库中加载 Windows WPF 窗口。这是代码: public partial class App : Application { public App(
我目前正在使用带有导航组件的底部导航,它工作正常但是当我们点击导航项 fragment 正在加载然后闪烁正在发生,即使当前选择的项目也会发生闪烁。它在加载 fragment 时发生。我的应用程序屏幕背
我是新来的 kotlin , 当我开始 Null Safety 时,我对下面的情况感到困惑. There's some data inconsistency with regard to initia
我有一个框,其中包含同时发生的两个独立的 css 转换。 当转换发生时,图标下方的标题和段落文本移动位置 参见 JS Fiddle:http://jsfiddle.net/Lsnbpt8r/ 这是我的
在为黑莓 10 构建电话间隙应用程序时,我遇到了异常情况。 [BUILD] Populating application source [BUILD] Parsing config.xml [
这个问题在这里已经有了答案: How to properly stop the Thread in Java? (8 个回答) 3年前关闭。 我看过How to properly stop the T
我试图弄清楚发生 fatal error 时如何刷新页面。基本上我正在访问图像 api 并将图像复制到我的服务器。我还每次都创建照片的缩略图版本。我会每隔一段时间收到一条错误消息,指出我的脚本试图分配
我正在尝试使用断言函数检查元素是否在屏幕上。我在我的测试应用程序 (AndroidDriver) 中使用 Appium 和 Java。我期望的是,如果元素在屏幕上,则返回 1;如果不在屏幕上,则返回
我正在开发图像上传系统。我使用 CommonsMultipartResolver 设置 maxUploadSize。当我尝试上传超过最大尺寸的图像文件时,会发生 MaxUploadSizeExcced
我有以下代码和@ComponentScan(basePackages = "com.project.shopping"),包结构为 com.project.shopping.Controller co
我尝试运行此程序作为测试,但收到错误“发生了 JNI 错误,请检查您的安装并重试”,然后是“发生了 Java 异常”。关于如何解决这个问题有什么想法吗? package java; public cl
我是一名优秀的程序员,十分优秀!