Open ximmyxiao opened 3 years ago
A demo simulating this kind of CATiledLayer crash can be download from here: https://github.com/ximmyxiao/TestTiledLayerDealloc
I am also facing this issue. @ximmyxiao Did you find a solution for it?
@ankitpoplify ,sorry , still did not fix it, seems some over-release problem , but it seems hard to know where is the reason
@ankitpoplify see my lastest issue comments , maybe you can try it
In my project , I will receive some crash logs (not happened very frequent) like this :
And after my digging in to it , I found I can reproduce this problem , it's just because the CALayer object of DTLazyImageView will be dealloc before the the DTLazyImageView deallocing , And I can reproduce this crash with the DTCoreText Demo after changeing the performSelectorOnMainThread to this (just add a dispatch after 2 seconds to simulate the real network conditions)
And the image.html will just leave remote images only
Image Handling
And after these works be done , run the demo , click the 'Image Handling' to push the controller in , and pop it out soon , the program will crash soon.
And If I don't use the DTTiledLayerWithoutFade ,the program will works very well ,
And I can avoid this crash with a strong-weak dance of block , But I think the DTLazyImageView 'layer object becomes a zombie before the DTLazyImageView object dealloc it self is not normal,it means some problem behind it , and I 'm quite sure it has something to do with DTTiledLayerWithoutFade layer class , It seems that the SubView's layer will be dealloced by CATiledLayer unexpected. But I don't know how to fix the DTTiledLayerWithoutFade.
So If any more about crash is needed ,just let me know. thanks