*** -[__NSDictionaryI release]: message sent to deallocated instance 0x1702e8a80 after upgrading from AlamoFire 3.x to AlamoFire 4.x and Swift 3 -


i getting *** -[__nsdictionaryi release]: message sent deallocated instance 0x1702e8a80 using alamofire 4.4 , xcode 8.3. have been able trace zombie frustating because not handle object allocation, alamofire .

here´s code

alamofire.request(url).validate().responsejson { (response) in     if response.result.isfailure {         self.offlineerror(self, selector: #selector(self.gotosales))     } else {         let sales = salesviewcontroller()         self.navigationcontroller?.pushviewcontroller(sales , animated: true)     } } 

also here can find screenshot form xcode instrument console .

    malloc/autorelease/release (3)          00:01.884.473   foundation  newjsonvalue 2   retain  +1  2   00:01.884.497   alamofire   0x10071df1b 3   retain  +1  3   00:01.884.528   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 4   release -1  2   00:01.884.529   alamofire   0x10071dfef 5   retain  +1  3   00:01.884.667   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*)     retain/release (4)          00:01.884.679   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 10  release -1  2   00:01.884.799   alamofire   0x100719557 12  retain  +1  2   00:01.884.902   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 13  retain  +1  3   00:01.884.907   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 14  retain  +1  4   00:01.884.907   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 15  retain  +1  0   00:01.884.911   libswiftcore.dylib  _dynamiccasttoexistential(swift::opaquevalue*, swift::opaquevalue*, swift::targetmetadata<swift::inprocess> const*, swift::targetexistentialtypemetadata<swift::inprocess> const*, swift::dynamiccastflags) 16  retain  +1  5   00:01.884.912   appname 0x1000fc367 17  retain  +1  6   00:01.885.006   appname 0x1000fc3c7     retain/release (2)          00:01.885.046   appname 0x10010364f 20  release -1  5   00:01.885.060   appname 0x1001035ff 21  release -1  4   00:01.885.065   appname 0x1000fc7bb 22  release -1  3   00:01.885.067   appname 0x1000fd3bb 23  release -1  2   00:01.885.067   appname 0x1000fd3d3 24  release -1  1   00:01.885.068   appname 0x1000fd3fb 25  release -1  0   00:01.885.071   appname 0x1000fd78f 26  zombie      -1  00:01.885.746   alamofire   0x10071148b 

edit:

stack dsym enabled :

    malloc/autorelease (2)  +1      00:01.411.929   foundation  newjsonvalue     retain/release (6)          00:01.411.943   alamofire   0x100739f1b     retain/release (4)          00:01.412.052   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 10  retain  +1  4   00:01.412.141   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 11  retain  +1  5   00:01.412.145   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 12  retain  +1  6   00:01.412.146   libswiftcore.dylib  swift::metadataimpl::buffervaluewitnessesbase<swift::metadataimpl::valuewitnesses<swift::metadataimpl::objcretainablebox> >::initializebufferwithcopyofbuffer(swift::valuebuffer*, swift::valuebuffer*, swift::targetmetadata<swift::inprocess> const*) 13  retain  +1  0   00:01.412.149   libswiftcore.dylib  _dynamiccasttoexistential(swift::opaquevalue*, swift::opaquevalue*, swift::targetmetadata<swift::inprocess> const*, swift::targetexistentialtypemetadata<swift::inprocess> const*, swift::dynamiccastflags) 14  retain  +1  7   00:01.412.150   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 15  retain  +1  8   00:01.412.158   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1)     retain/release (2)          00:01.412.167   appname partial apply 18  release -1  7   00:01.412.176   appname 0x1001775e4 19  release -1  6   00:01.412.180   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 20  release -1  5   00:01.412.182   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 21  release -1  4   00:01.412.182   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 22  release -1  3   00:01.412.183   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 23  release -1  2   00:01.412.186   appname flviewcontroller.(checkstatus(bool) -> ()).(closure #1) 26  zombie      -1  00:01.412.268   foundation  __nsoqschedule_f 

any appreciated


Comments