An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object - ios

When running my app on device, it crashes right when I initiate my AvPlayer to stream an mp3. However, it works fine on simulator.
I have tried to run it through Zombie and I get the following error message when it crashes : "An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object (zombie) at address: 0x108c020e0"
I am using an Activity indicator in previous scenes but I have tried to remove it completely, leaving no line of code mentioning any UIActivityIndicatorView and I still get the same error.
Any idea of how to deal with this? Can it be linked to the system activity indicator displayed the status bar?
Many thanks for your help

It's a crash because of abusing appearance API not as documenting (setting a property not marked with UI_APPEARANCE_SELECTOR).
For reference, see here.

Related

Message sent to deallocated instance in swift

I'm getting an error that causes the app to crash. My application having list of the videos(My application screen divided in two part, one for player and second for videos list). I am using AVPlayerViewController for play the video. If user clicks continuously two item that the app to crash.
I have tried to run using NSZombie and I get the following message :
An Objective-C message was sent to a deallocated 'FigPlaybackItem'
object (zombie) at address: 0x14734ed00.
Do you have any idea of how to solve this issue?
Here is the output from Allocation instrument with NSZombies Detection if it helps:

Box iOS SDK Issue: [BoxAPIMultipartToJSONOperation respondsToSelector:]: message sent to deallocated instance 0x1707a32c0

I get this error from the box sdk when I try to upload a file. It never occurs on the first upload. Always on the second upload. (I upload 25 files, I upload 25 again and this memory error pops up)
I tracked the problem down to box code with NSZombies. Basically the NSStream Delegate in the "BoxAPIMultiPartToJSONOperation.m" file is sending a message/calling a method on the object at this address after it gets deallocated.
My guess is that it's this line [self performSelector:#selector(retryWrite:) withObject:theStream afterDelay:0.1];
There was a github issue about this a while ago: https://github.com/box/box-ios-sdk-v2/issues/76
The issue there was that the NSStream delegate was calling a method on something after it was supposed to be cancelled. Was resolved by making sure to shut off the stream once the thing finished.
My latest idea is to try and kill the Box API threads (yeah I'm that desperate.)
If anyone has faced this specific issue I'd love to hear how you resolved it.
Thanks.

Catching the crash log on iOS

The main idea is to catch the crash log (or the reason of the error) and send it to a server.
I know that iTunes does log the crashes from the users' devices but I need to find if there's a way to get it and store it on our server.
I was trying "PlCrashReporter" and i finished implementing it (as they did on this link https://www.plcrashreporter.org/documentation/api/v1.0/example_usage_iphone.html).
Problem
The function applicationDidFinishLaunching is not called when the crash occurs.
Am I on the right track?
Is there a specific function which is called upon a crash in AppDelegate ?
Thanks in advance
EDIT
I've also tried the solution of the following question:
iOS crash log catch, debug info.. Catch and send via email to the Dev team
It actually works but there are some errors that are cause by Swift and not Objective-C (Like Error while unwrapping optional value) were not caught..
Any suggestions?
You should use Crashlytics. You then can use a custom web hook to receive the crash reports.

MPRemoteMediaPickerController timed out waiting for fence barrier from com.apple.MusicUIService

MPRemoteMediaPickerController timed out waiting for fence barrier from com.apple.MusicUIService
I get this error on iOS7... only.
I saw another post regarding this error, but no one responded to it.
Cant find any solution on google either
I just started receiving this when I first ran my app on iOS7.1. I'm not even using MPRemoteMediaPickerController (directly). I'm using MPMediaPickerController, but I'm purposefully reusing the object so the user goes back to the same place that they left the next time they choose a song.
In 7.1 I'm getting this warning and the picker displays a useless (can't cancel out) white view.
Solution was to toss the MPMediaPickerController after each use. The error does not seem to happen if I have a fresh one each time.

iOS app crashing because of FlurryAds

I am experiencing a hard to debug problem. My program crashes because a message is sent to a deallocated object. Using Zombie Objects, I have found out what is causing it to crash, but don't know how to fix it. When my view dissappears, I set the FlurryAds delegate to nil, and upon that view appearing I set it to the view. When I background my app and am in this view, I immediately get a crash. Is there a bug in Flurry?
This is the message printed to the console:
2013-01-18 14:04:44.626 Purdue Course Sniper[19212:c07] *** -[FlurryAd space]: message sent to deallocated instance 0xa6ac490
I am not sending this message anywhere ^^. Why is this message being sent anyways? The delegate is set to nil..
I work for Flurry and I will be happy to help. I need to understand a little more about your integration. Namely, more about this statement "When my view dissappears, I set the FlurryAds delegate to nil, and upon that view appearing I set it to the view". What view is disappearing and appearing? Is this a fullscreen ad? It would also help to know details of your account with Flurry. Can you send an email to support#flurry.com so we can access your account? Thanks and sorry you are experiencing an issue.
(Full disclosure: I work in the Support team at Flurry)

Resources