I have been using the SDWebImage for a while in my project and it has been working great. Until, I have upgraded to Xcode 6.0.1 recently and suddenly, everything is a chaos. Everytime, I try to call the method:
UIImageView setImageWithURL:placeholderImage
I am getting the unrecognized selector sent to instance crash. I have googled it a bit and the only solution that I can come across is this, which in turns gets me to the issue # 494. Now, iPhone 5S or not, it's crashing every time. Here are the related settings of my project:
Any idea, what I am missing here?
Related
Many crashes happened below the iOS9.3 (which means devices with iOS10 are OK)..
The crash logs seem to show that it's not a problem about API that can only be used below iOS 9.3 .
But I have no idea about the crash logs. ( I'm sorry ...for I just start to study iOS development for only 2 month )
Could you please help me analyze the crash logs ?
Really Thanks !
crash log 1
crash log 2
AXE_BAD_ACCESS - this is problem with memory. One of function tried to use variable which already released. I think you need to check use your TableView and cells for this table.
Also to find problem with memory you can try to use zombies
Used to have the similar strange crashes in my app. And only in production, when testing from TestFlight. Building on device with ios 9 caused no problems.
Maybe it sounds strange, but try to convert all images you use in app to images with included sRGB color profile. For me it helped.
When I try to run project on real device (iPhone 5 and 5S with iOS 8.1) I get following compiler errors:
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:26:42: No visible #interface for 'UIImage' declares the selector 'initWithData:'
animatedImage = [[UIImage alloc] initWithData:data];
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:47:34: No known class method for selector 'animatedImageWithImages:duration:'
animatedImage = [UIImage animatedImageWithImages:images duration:duration];
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:155:21: No known class method for selector 'animatedImageWithImages:duration:'
return [UIImage animatedImageWithImages:scaledImages duration:self.duration];
My project was working normally until this morning. I changed nothing, just tried to debug on real device. The strangest part of that is I can run/debug on emulator (on any iPhone device with iOS 8) without any error.
When I downgrade deployment target from 8.1 to 8, XCode can successfully build and run the project for emulator and real device.
I tried completely removing SDWebImage and adding it back but didn't solve the problem.
I am using XCode 6.1 (Swift) and iOS 8.1 SDK on my project.
What might be causing the problem that suddenly appeared?
As has been said on other questions, the new "ModuleCache" directory within DerivedData has been responsible for many of these problems.
Here's the path:
/Users/[user]/Library/Developer/Xcode/DerivedData/ModuleCache
Simply delete the module cache, or the entire derived data directory as many have been doing on a daily basis for the last few iOS SDK iterations.
I came here looking for a different answer to a similar problem since this solution isn't fixing my current problem, but I figured I would share this as it will fix many of these.
On my app, when I add the googleCast SDK, the app crash at launching, on this method [[DCIntrospect sharedIntrospector] start];. But when I don't have GoogleCast SDK, everything is working fine.
Here is the assertion log :
*** Assertion failure in -[GCKPB_PBFieldDescriptor initWithFieldDescription:rootClass:], /Volumes/BuildData/pulse-data/agents/wpye22.hot/recipes/415961027/base/googlemac/iPhone/Chromecast/SDKv2/Protos/../../../../ThirdParty/ProtocolBuffers/objectivec/Classes/PBDescriptor.m:409
This works fine if I run the project on an iPhone 5C, but crashing on the simulator (32-bit simulator).
Any idea on how to solve this crash, and still continue to use DCIntrospect ?
I had the same issue.
I was able to reproduce this issue, so I filed this bug.
Introspection triggers the +initialize method of the GCKPB_PBGeneratedMessage class.
This method apparently makes some bad assumptions about when +initialize will get triggered.
While waiting for a fix you can always use the workaround suggested here and mock GCKPB_PBGeneratedMessage's +initialize method.
I have being seeing crashes in my iOS app, when opening LA Times (www.latimes.com). The crash happens in WebCore somewhere and I have no clue where. Profiling with both "Zombie" or "leaks" do not return anything for this "EXE_BAD_ADDRESS" error.
I also checked with a small, bare UIWebView app and I could reproduce the effects.
Right now, I see this happening only with LA times, but I am not sure if there are other sites as well.
Can someone check on and guide me in what could be the possible error/source for this crash?
EDIT: I have added a small UIWebView project demonstrating this bug at
github
EDIT 2: The app (include the demo at github) works perfectly fine on iOS 7.0, but crashes in iOS 7.1 ... seems a recent bug with iOS 7.1. I have issued a bug report to Apple and will keep updated.
Thanks in advance,
Nikhil
I happened to bump into that same issue with one of my apps in iOS>7.0 only.
It seems to be a sync issue which can be fixed by creating the webview from the main thread only.
As a fix I just wrapped my UIWebView creation in a dispatch_sync(dispatch_get_main_queue(), ^{ ... });
And it solved the problem.
Of course if your code is running on the main thread you shouldn't wrap it this way ;)
This is driving me crazy...
I have been using Google Maps SDK for iOS for a while (even in an App Store product).
Now, I cannot make it run in the iOS simulator any longer! It doesn't matter which project I try to run (even the sample code from the SDK), it will always crash the first time a map is added, e.g.:
self.view = [GMSMapView mapWithFrame: frame camera: camera];
This is the log messages I get:
2013-05-16 10:59:01.047 SDKDemos[939:1303] ADDRESPONSE - ADDING TO MEMORY ONLY: http://dl.google.com/geosdk/latest
2013-05-16 10:59:01.050 SDKDemos[939:1b03] Google Maps SDK for iOS version: 1.2.2.3031
2013-05-16 10:59:01.050 SDKDemos[939:1b03] New version of Google Maps SDK for iOS available: 1.3.0.3430
2013-05-16 10:59:01.111 SDKDemos[939:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
I have lately tried an antivirus SW on this mac, so one theory is that it may have blocked some vital Google Maps data from downloading. Now, I have uninstalled this anti-virus SW, removed Xcode's DerivedData and reset the iOS Simulator, but with the same disappointing result.
All projects I have tried are working perfectly fine when I run them on my iPhone. I have also another mac where everything works fine on the simulator. So clearly something must have happened with this particular machine.
Any advice?
Update
Initially, I focused entirely on the first warning message (ADDRESPONSE - ADDING TO MEMORY ONLY: http://dl.google.com/geosdk/latest), but I have now realised that the only purpose of the URL mentioned there is to download a string with the latest SDK version number (currently "1.3.0.3430"). Since the SDK then correctly prints that string two lines further down, I find it very unlikely that this line is related to the real cause of the crash. (I have changed the title of this question accordingly.)
Hard to say if this really qualifies as an answer...
In any case, I'd like to document the outcome of this, in case someone else stumbles upon the same problem in the future:
After having been away a couple of days, I returned today, turned on my iMac, made a new test run, and...
The problem was gone!
Everything just worked as expected!
I have not changed a single line of code or anything at all in the Xcode configuration.
The only thing I did was to once again delete Xcode's DerivedData and reset the simulator (which I did numerous times last week, but without success at that time).
I guess that my assumption must have been right, that there must have been a cache somewhere in my machine, but outside Xcode´s DerivedData, that caused this problem. Then I was away a couple of days, and this cache simply timed out!
Even if this may sound a bit far-fetched, I cannot think of another reason for this weird behaviour.
It would have been really useful to know where this cache is located, so that one could clean it up without needing to shut down the mac for some days!