objective c - iOS: Error When Scrolling Quickly Through Photos? -


I am currently using MWPhotoBrowser in my application and when I scroll through the pictures quickly, Receive the following error:

Received Memory Warning 2014-02-17 16: 42: 35.117 App [10803: 60b] *** Disclaimer Exceptions Ending the App due to 'NS Generic Expression' Reason: '*** Collection & lt; __SSARMRM: 0x156f3160 & gt; It was being mutated while being calculated. *** Throw First call stack: (The 0x2e71de83 0x38a7a6c7 0x2e71d971 0x151167 0x15139b 0x311643ff 0x3116446f 0x31164665 0x31164805 0x3111ea67 0x38f5f0af 0x38f6072f 0x38f61959 0x2e6e85b1 0x2e6e6e7d 0x2e651471 0x2e651253 0x3338b2eb 0x30f06845 0xff035 0x38f73ab7) libc ++ abi.dylib: Type NSException not come exception Ending with

I am currently loading images stored locally in the app.

This is an exception throwing tool:

  - (zero) Release aliorerring photo: {{ID PHOTOS} in {_photos} {if (p! = [NSNull null]) {if (preserveCurrent & amp; p == [self photoAtIndex: self.currentIndex]) {continue; // Skip current] [P unload unlimited image]; Any help would be appreciated!   

>

I do not know which version you use Using MWPhotoBrowser, but in the latest, releaseAllUnderlyingPhotos: reads the method:

  - (zero) ReleaseAllUnderlyingPhotos: (BOOL) preserveCurrent {// Make a copy , When this array is modified, as long as we are getting the images released through NSArray * copy = [_photos copy]; For (id p in copy) {if (p! = [NSNull null]) {if (preserveCurrent & amp; amp; p == [self photoAtIndex: self.currentIndex]) {continue; // Skip current] [P unload unlimited image]; }} // Release thumb copy = [_thumb photo copy]; For (copy id) {if (p! = [NSNull null]) {[p unloadUnderlyingImage]; }}}  

Please keep these two lines in mind:

  NSArray * copy = [_photos copy]; For the first time,  a new array  copy  to save this walk  (via IDP in copy) {/ code> 

_photos; _photos is being modified in other locations .

In your code, is releasing this now useful photo: is removing the object directly from the _photos array, but this array should be modified in other parts of the code For example, for example, didReiveiveMemoryWarning , as is your case.

Once you change the code to your copy, your code should be removed in _photos and other code issued in .


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -