Closed karmeye closed 1 year ago
I noticed that building in release mode prevents the crash. You can also set change #define GUARD_ITEMS 1
to #define GUARD_ITEMS 0
. Does not address the underlying problem though as I'm not exactly sure the the GUARD_ITEMS are about. Perhaps verification that the bit counts are within the max number of bits that can be allocated?
They’re actually quite ancient, and can probably be turned off altogether now. There were some buffer overrun problems in that code at one point, where things were generating invalid array indices. All fixed now though, so you can just turn off that code.
Great thanks :+1:
but if turn off the #define GUARD_ITEMS 0 and when drag to remove the second last icon, will crash
[NSMutableIndexSet addIndexesInRange:]: Range {2438690640, 1} exceeds maximum index value of NSNotFound - 1'
it is happend random, in AQGridView:setAnimatingCells when i remove the sencond lastest icon
I haven't completely vetted this yet, but this seems to work well so far in my testing:
#if __LP64__
#define SCRIBBLE_MARK 0x5555555555555555
#else
#define SCRIBBLE_MARK 0x55555555
#endif
Maybe not elegant, but I'm just trying to get some old code working reliably.
NSAssert(_newToOldIndexMap[_newGridData.numberOfItems] == SCRIBBLE_MARK, @"Eeek! Scribbling on guards didn't work!");
Anyone fixed this method (AQGridViewUpdateInfo updateNewGridDataAndCreateMappingTables) for 64 bit builds?
I get assertion on: NSAssert(_oldToNewIndexMap[_oldGridData.numberOfItems] == 0x55555555, @"Eeek! Scribbling on guards didn't work!");