【问题标题】:iOS App crash and exited abnormally with signal 11: Segmentation fault: 11iOS App 崩溃并异常退出,信号为 11:Segmentation fault: 11
【发布时间】:2016-04-07 14:05:34
【问题描述】:

我正在开发 Titanium iOS 模块,用于在一定范围内修剪视频,并完成了它,它工作正常, 但是点击修剪按钮时应用程序有时会崩溃,

我只是在点击修剪按钮时执行以下过程,

  1. 删除 NSTempDirectory 中现有的 .mov 文件,
  2. 使用 AVAssetExportSession 将 AVAsset 导出到同一路径

    self.exportSession = [[AVAssetExportSession alloc] initWithAsset:anAsset presetName:AVAssetExportPresetPassthrough];

它工作几次,但不经常工作, 应用程序在 iOS 模拟器中因以下日志而崩溃,

[DEBUG] :  [ioslib] [ios-sim]
[DEBUG] Session did end with error (null)
[DEBUG] :  [ioslib] [ios-sim] 
[DEBUG] Removing named pipe at `/var/folders/0k/yjm3h6ts0z1bdbr8hvn_h1h00000gq/T//ios-sim-stderr->pipe-1460036674'
[DEBUG] :  [ioslib] [ios-sim] 
[DEBUG] Removing named pipe at `/var/folders/0k/yjm3h6ts0z1bdbr8hvn_h1h00000gq/T//ios-sim-stdout-pipe-1460036674'
[DEBUG] :  [ioslib] [ios-sim] Exited with code: 0
  • 以下崩溃日志是在 iOS 设备 5S 中运行时

    4 月 5 日 16:47:22 s-iPhone-4-1 ReportCrash[360] : ReportCrash 针对 PID 357 Apr 5 16:47:23 s-iPhone-4-1 ReportCrash[360]:为进程 AppName[357] 制定崩溃报告 4 月 5 日 16:47:23 s-iPhone-4-1 com.apple.launchd[1] (UIKitApplication:com.xxx.xxxx[0xae94][357]) : (UIKitApplication:com.xxxx.xxx[0xae94])作业似乎已崩溃:分段错误:11 4 月 5 日 16:47:23 s-iPhone-4-1 backboardd[28]:应用程序 'UIKitApplication:com.xxx.xxx[0xae94]' 异常退出,信号 11:分段错误:11

谁能给我建议解决方案,如果您需要其他任何东西,请告诉我。

提前致谢

【问题讨论】:

  • 那么您使用什么模块?链接到github?您在那里提出过问题吗?
  • @Rene Pot,感谢您的快速回答,我通过引用此 git hub iOS App 开发了自己的模块

标签: video memory crash appcelerator appcelerator-titanium


【解决方案1】:

我发现了一个错误并修复了,

它的发生是因为 removeItemAtURL ,我只是将其替换为 removeItemAtPath

    NSFileManager *fm = [NSFileManager defaultManager];
    //[fm removeItemAtURL:url error:&err]; // This causes crash
    [fm removeItemAtPath:url.path error:&err]; 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-05
    • 1970-01-01
    • 2014-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多