【问题标题】:Xcode 12 quit unexpectedly in Mac OS 10.15.4Xcode 12 在 Mac OS 10.15.4 中意外退出
【发布时间】:2021-01-12 08:58:45
【问题描述】:

Xcode 12 在 Mac OS 10.15.4 中意外退出。

文档“Main.storyboard”存在问题,已发现并修复。

这可能是由于 SCM 操作(例如合并)造成的。请保存文档以解决问题。

多个资源同名:groupTableViewBackgroundColor。

Date/Time:        2020-09-26 08:18:54 +0530
End time:         2020-09-26 08:26:49 +0530
OS Version:       Mac OS X 10.15.4 (Build 19E266)
Architecture:     x86_64h
Report Version:   29

Data Source:      Stackshots
Shared Cache:     0x2fb4000 01EE95E0-91B0-354A-BD0A-C761305CD75D

Command:          Xcode
Path:             /Applications/Xcode 12.app/Contents/MacOS/Xcode
Identifier:       com.apple.dt.Xcode
Version:          12.0 (17219)
Build Version:    2
Product Build Version: 12A7209
Project Name:     IDEFrameworks
Source Version:   17219000000000000
Parent:           launchd [1]
PID:              2432

Event:            hang
Duration:         475.00s
Duration Sampled: 1.99s (process was unresponsive for 473 seconds before sampling)
Steps:            20 (100ms sampling interval)

Hardware model:   MacBookAir7,2
Active cpus:      4

Time Awake Since Boot: 5700s

Fan speed:        1234 rpm

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------


Heaviest stack for the main thread of the target process:
  20  <truncated backtrace>
  20  __psynch_mutexwait + 10 (libsystem_kernel.dylib + 12386) [0x7fff6a22a062]
 *20  psynch_mtxcontinue + 0 (pthread + 9566) [0xffffff7f82d6e55e]


Process:          Xcode [2432]
UUID:             BEF84410-992D-3871-AD2A-C8C9AB4BD25C
Path:             /Applications/Xcode 12.app/Contents/MacOS/Xcode
Architecture:     x86_64
Parent:           launchd [1]
UID:              501
Sudden Term:      Tracked
Footprint:        490.54 MB
Start time:       2020-09-26 08:26:47 +0530
End time:         2020-09-26 08:26:48 +0530
Num samples:      20 (1-20)
CPU Time:         0.022s (52.9M cycles, 37.5M instructions, 1.41c/i)
Note:             Unresponsive for 473 seconds before sampling
Note:             4 idle work queue threads omitted

【问题讨论】:

    标签: ios xcode xcode12


    【解决方案1】:

    我遇到了完全相同的问题。 好消息,我找到了解决方案!

    短篇小说:

    您需要找到以 tableCellGroupedBackgroundColor 作为颜色的 View 并更改它。
    提示:tableView 单元格使用此颜色作为背景颜色,请先看那里。

    长篇大论:

    每次我打开 Main.storyboard 更新到 Xcode 12.2 后,都会显示与您相同的消息。

    假设是颜色不兼容(在我们的例子中是 tableCellGroupedBackgroundColor),我打开 Main.storyboard 作为 Source Code(右键单击 Main.storyboard -> Open As -> Source Code)并搜索“tableCellGroupedBackgroundColor”。

    我注意到这种颜色在文件末尾的“资源”中出现了好几次,而它应该只出现一次。 这可能是 Xcode 显示错误消息的原因。

    在上面看,我注意到特定颜色在 tableView 单元格的背景颜色中。 所以我将 Main.storyboard 作为 Interface Builder 重新打开(右键单击 Main.storyboard -> Open As -> Interface builder-Storyboard)并将所有 tableView 单元格中的背景颜色更改为默认值。
    专业提示:您可以直接从源代码中删除颜色,方法是删除将颜色引用到视图的行。

    就是这样! 之后一切都再次完美!

    【讨论】:

    • 什么相同的颜色会被darkTextColor替换?
    【解决方案2】:

    我对其他信息也有类似的问题。在 xCode 12 和 12.2 beta 中,我的主故事板在几分钟后出现,我得到: 文档“Main.storyboard”有 15 个问题被发现并修复。 保存弹出窗口还显示: 这可能是由于诸如合并之类的 SCM 操作造成的。请保存文档以解决问题。 对我来说,错误有 3 种类型: 1- 多个资源具有相同的名称:darkTextColor。 2- 多个资源具有相同的名称:groupTableViewBackgroundColor。 3- 多个资源具有相同的名称:tableCellGroupedBackgroundColor。 它要求保存以便修复,但它根本不修复。

    在保存之前或之后环境中都没有警告。

    当项目最终加载时,如果我编辑它一段时间,它就会停止响应,我必须强制 xCode 退出。如果我在 xCode 11.7 中加载我的应用程序,它会立即显示并且工作正常。如果我们的一位用户使用该应用程序的工作版本升级到 IOS14,它会在某些视图中崩溃,但是如果我使用 xCode12 编译,即使使用无法打开的故事板文件,并且我在 IOS14 上发布,应用程序运行良好并且显示损坏的视图起来。

    当我在 xCode 12 中调试并导航到损坏的视图时,app/xCode 会停止,但不会显示警告或错误。我试图更改和删除情节提要文件中的这一行但没有成功:

    【讨论】:

      猜你喜欢
      • 2021-01-12
      • 1970-01-01
      • 2015-08-07
      • 1970-01-01
      • 1970-01-01
      • 2017-04-05
      • 1970-01-01
      • 2016-10-25
      • 1970-01-01
      相关资源
      最近更新 更多