NSMutableOrderedSet removeObjectAtIndex not working consistently

28 Views Asked by At

I tried to delete entries from an NSMutableOrderedSet. The behavior is inconsistent, sometimes it works and sometimes it does not.

    NSMutableOrderedSet* detailPlaylist;

    [detailPlaylist removeObjectAtIndex:indexPath.row];
before the removal:

(lldb) po [detailPlaylist objectAtIndex:0]
{
    videoDuration = "5:15";
    videoId = "i-bu47QpWWc";
    videoSelected = n;
    videoThumbnailData = {length = 10595, bytes = 0xffd8ffe0 00104a46 49460001 01000001 ... 84200421 0801ffd9 };
    videoThumbnailUrl = "https://i.ytimg.com/vi/i-bu47QpWWc/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLDbkeqgCWR4RSyTpUhI9IM2Gd2poA";
    videoTitle = "\U5f35\U60e0\U59b9 A-Mei - \U7ad9\U5728\U9ad8\U5d17\U4e0a  \U5b98\U65b9MV (Official Music Video)";
}
(lldb) po detailPlaylist.count
1

///////
after the removal:

(lldb) po detailPlaylist.count
1
(lldb) po [detailPlaylist objectAtIndex:0]
error: warning: couldn't get cmd pointer (substituting NULL): no variable named '_cmd' found in this frame
error: Execution was interrupted, reason: internal ObjC exception breakpoint(-7)..
The process has been returned to the state before expression evaluation.
0

There are 0 best solutions below