Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS After XCode Validate Project Settings #214

Open
DenVog opened this issue Jun 6, 2015 · 2 comments
Open

EXC_BAD_ACCESS After XCode Validate Project Settings #214

DenVog opened this issue Jun 6, 2015 · 2 comments

Comments

@DenVog
Copy link

DenVog commented Jun 6, 2015

I have an older app that I recently opened with XCode 6.3.2. Did a build on a device running iOS 8.3 and it seemed to run fine. XCode pestered me to

Validate Project Settings / Update to recommended settings
After doing so, I see a crash when I run on a device:
AQGridViewUpdateInfo line 775 NSUInteger newIndex = _oldToNewIndexMap[oldIndex]; gets Thread 1:EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8)
Other than updating to the latest version of AQGridView, I've only made 2 changes:

  1. Changed GUARD_ITEMS so you can build in debug without crashing.
    updateNewGridDataAndCreateMappingTables for 64 bit #208
  2. Workaround for compiler error: too many arguments
    Fixed XCode 6 compiler error #211
@Malek-aljundi
Copy link

Did you manage to fix this error ??

@HeyZiko
Copy link

HeyZiko commented Dec 5, 2016

We implemented #211 and #208 and hit this problem.
During debugging, I saw that (in my case) the app hit line 190:
_oldToNewIndexMap == NULL.
On line 775 (where the failure occurs), the code is trying to access that variable (even though it's null). Classic.
To fix, I added the following to the condition in to for loop: && _oldToNewIndexMap != NULL. This seems to have solved our problems, but we don’t use the library extensively so tread carefully.

To recap, line 773 should now look like this:
for ( NSUInteger oldIndex = [movingSet firstIndex]; oldIndex != NSNotFound && _oldToNewIndexMap != NULL; oldIndex = [movingSet indexGreaterThanIndex: oldIndex] )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants