集合< __ NSCFDictionary:0x15a2fae0>在被列举时被突变

时间:2016-03-03 13:07:54

标签: ios uitableview

我的应用中有时会出现此错误。我打印了对象并得到了这个:

(lldb) po 0x15a2fae0
{
    "0x15d8bcd0.posErrorMarker{id: 4558}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d8baf0.posErrorMarker{id: 4554}" = <00007b43 00000000 0000f03f>;
    "0x15d8aad0.negError{id: 4525}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15a3f620.marker{id: 4353}" = <00007b43 00000000 0000f03f>;
    "0x15d8bab0.posErrorMarker{id: 4552}" = <00007b43 00000000 0000f03f>;
    "0x15d8ad10.posErrorMarker{id: 4526}" = <00007b43 00000000 0000f03f>;
    "0x15d8b300:UIView-Encapsulated-Layout-Height.marker{id: 4567}" = <00803b44 00000000 0000f0bf>;
    "0x15d8b3f0.posErrorMarker{id: 4541}" = <00007b43 00000000 0000f03f>;
    "0x15d89a80.negError{id: 4563}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15a3f5f0.marker{id: 4351}" = <00803b44 00000000 0000f0bf>;
    "0x15d8baf0.negError{id: 4555}" = <00803b44 00000000 0000f03f>;
    "0x15d8b880.negError{id: 4551}" = <00803b44 00000000 0000f03f>;
    "0x15d86b60.posErrorMarker{id: 4546}" = <00007b43 00000000 0000f03f>;
    "0x15d8ad50.negError{id: 4529}" = <00803b44 00000000 0000f03f>;
    "0x15a3f4a0.marker{id: 4333}" = <00803b44 00000000 0000f03f>;
    "0x1590d210.posErrorMarker{id: 4539}" = <00007b43 00000000 0000f03f>;
    "0x15d8a900.posErrorMarker{id: 4516}" = <00007b43 00000000 0000f03f>;
    "0x15d8b880.posErrorMarker{id: 4550}" = <00007b43 00000000 0000f03f>;
    "0x15a3f590.marker{id: 4346}" = <00007b43 00000000 0000f03f>;
    "0x15a43eb0.marker{id: 4324}" = <00803b44 00000000 0000f03f>;
    "0x15a43ee0.marker{id: 4326}" = <00803b44 00000000 0000f03f>;
    "0x15d8aea0.negError{id: 4535}" = <00803b44 00000000 0000f03f>;
    "0x15d8b030.posErrorMarker{id: 4536}" = <00007b43 00000000 0000f03f>;
    "0x15d8a900.negError{id: 4517}" = <00803b44 00000000 0000f03f>;
    "0x15a3f560.marker{id: 4343}" = <00007b43 00000000 0000f03f>;
    "0x15d89a00.negError{id: 4561}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d8a8b0.posErrorMarker{id: 4514}" = <00007b43 00000000 0000f03f>;
    "0x15d8b840.posErrorMarker{id: 4548}" = <00007b43 00000000 0000f03f>;
    "0x15d8b2d0:UIView-Encapsulated-Layout-Width.marker{id: 4564}" = <00803b44 00000000 000000c0>;
    "0x15d8bc90.posErrorMarker{id: 4556}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d86b60.negError{id: 4547}" = <00803b44 00000000 0000f03f>;
    "0x15a3f650.marker{id: 4355}" = <00007b43 00000000 0000f03f>;
    "0x15d8a8b0.negError{id: 4515}" = <00803b44 00000000 0000f03f>;
    "0x15d8b840.negError{id: 4549}" = <00403b44 00000000 0000f03f>;
    "0x15d8b3f0.negError{id: 4542}" = <00803b44 00000000 0000f03f>;
    "0x1590d210.negError{id: 4540}" = <00803b44 00000000 0000f03f>;
    "0x15a43f10.marker{id: 4329}" = <00803b44 00000000 0000f03f>;
    "0x15d8a980.negError{id: 4523}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d89f00.posErrorMarker{id: 4498}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15a3f530.marker{id: 4340}" = <00007b43 00000000 0000f03f>;
    "0x15d8ad50.posErrorMarker{id: 4528}" = <00007b43 00000000 0000f03f>;
    "0x15d8ad10.negError{id: 4527}" = <00803b44 00000000 0000f03f>;
    "0x15d8a3f0.posErrorMarker{id: 4506}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d8b030.negError{id: 4537}" = <00803b44 00000000 0000f03f>;
    "0x15d8a440.negError{id: 4509}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
    "0x15d8b650.negError{id: 4545}" = <00803b44 00000000 0000f03f>;
    "0x15a43f40.marker{id: 4332}" = <00803b44 00000000 0000f03f>;
    "0x15d8b650.posErrorMarker{id: 4544}" = <00007b43 00000000 0000f03f>;
    "0x15a43e50.marker{id: 4319}" = <00803b44 00000000 0000f03f>;
    "0x15d8bab0.negError{id: 4553}" = <00803b44 00000000 0000f03f>;
    "0x15a3f5c0.marker{id: 4349}" = <00803b44 00000000 0000f0bf>;
    "0x15d8aea0.posErrorMarker{id: 4534}" = <00007b43 00000000 0000f03f>;
    "0x15d89f40.posErrorMarker{id: 4500}" = <00803b44 00000000 0000f03f 00007b43 00000000 0000f03f>;
}

对此有任何帮助吗?

1 个答案:

答案 0 :(得分:1)

很可能您在迭代期间更改了您的收藏。为了避免崩溃,您可以复制密钥并使用this post中所示的方法进行迭代,或使用apple建议的方法。我认为最简单的方法是在迭代之前复制集合。