adsheet warning - ios

can anyone explain the meaning/reason of this adsheet warning please?
Nov 23 09:24:06 unknown AdSheet[256] <Warning>: AdSheet running for 59.992 seconds with 1 clients and 1 assertions [banner:1]: info.company.app (State: Foreground Running) (Background: 0, no timer) has 1 banners: 0xee74b00:EDFD972C-2C31-45A6-A57C-F129F8D0CB97 (created 2011-11-23 17:23:44 +0000) [Visible: never] [In Window: YES]
it repeats every 20 seconds (in the log) and increments the "running for xx.xx seconds" with 20 seconds each time.
It comes up in the log with my iAd supported application and regardless whether the Test Advertisement is loaded or not.
after I kill the application it continues two or three times with:
Nov 23 09:33:06 unknown AdSheet[256] <Warning>: AdSheet running for 599.993 seconds with 0 clients and 0 assertions []:
and then it stops
thank you

I'm pretty sure the [Visible: never] has to do with the warning. Are you sure your AdSheet is visible and entirely on the screen? Did you by any chance accidently add a copy of the AdSheet to your viewController in IB that you don't know of? You should keep in mind that Ads should appear in the foreground.

Related

Run Api code after killed the App iOS flutter -Background fatch- plugins

after run the simulate Background fetch I see That in the log.
I tested using. real device iPhone 8 - iOS 13.4.1
I waited two days nothing happened.
The log:
2020-05-29 18:05:53.515643+0300 Runner[372:40553] [TSBackgroundFetch scheduleProcessingTask]
2020-05-29 18:05:53.523393+0300 Runner[372:40553] [TSBackgroundFetch finish] flutter_background_fetch (2 of 2)
🔵-[BackgroundTaskManager startPreventSuspendTimer:] BG time remaining: 20 | Total tasks: 1
2020-05-29 18:05:54.032876+0300 Runner[372:40857] 🔵-[BackgroundTaskManager startPreventSuspendTimer:] BG time remaining: 20 | Total tasks: 1
🔵-[TSLocationManager onSuspend:] enabled? 1)
If the user kills your app, nothing further will happen in the background. I take "kill" to mean a hard, force quit. Merely hitting the Home button sends your app to the background.
Can't you just send you a note when the appDelegate receives a "applicationWillTerminate" or a "applicationWillResignActive"?

iOS Extension is hanging on launch/Extension did not initialize in time

I'm currently getting a weird situation. Here's how I get into it. Note that I do NOT get this problem when the first 2 steps are skipped.
I make a background NSURLSession in a Share Extension.
I start a download task.
I call exit(0).
The code looks like this:
NSString *address = #"https://googledrive.com/host/0B5zObXR9UzgmbFpob2J5eXpjNXc/file3m";
self.mySession = [self configureMySession];
NSURL *url = [NSURL URLWithString:address];
NSURLSessionTask *myTask = [self.mySession downloadTaskWithURL:url];
[myTask resume];
exit(0);
With this code the following happens. The extension continually respawns, hangs on launch, respawns, hangs on launch, ad infinitum. Here are some of the log messages.
Aug 12 10:55:16 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27082]): Extension did not
initialize in time.
Aug 12 10:55:16 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension): Service only ran for 5
seconds. Pushing respawn out by 5 seconds.
Aug 12 10:55:21 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.apple.imfoundation.IMRemoteURLConnectionAgent): The
_DirtyJetsamMemoryLimit key is not available on this platform.
Aug 12 10:55:26 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27085]): Extension is
hanging on launch. Killing.
Aug 12 10:55:26 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27085]): Extension did not
initialize in time.
Aug 12 10:55:26 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension): Service only ran for 5
seconds. Pushing respawn out by 5 seconds.
Aug 12 10:55:31 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.apple.imfoundation.IMRemoteURLConnectionAgent): The
_DirtyJetsamMemoryLimit key is not available on this platform.
Aug 12 10:55:36 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27086]): Extension is
hanging on launch. Killing.
Aug 12 10:55:37 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27086]): Extension did not
initialize in time.
Aug 12 10:55:37 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension): Service only ran for 5
seconds. Pushing respawn out by 5 seconds.
Aug 12 10:55:42 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.apple.imfoundation.IMRemoteURLConnectionAgent): The
_DirtyJetsamMemoryLimit key is not available on this platform.
Aug 12 10:55:47 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27087]): Extension is
hanging on launch. Killing.
Aug 12 10:55:47 Asperas-MacBook-Pro-2
com.apple.CoreSimulator.SimDevice.6867B1A7-8694-4D6D-8480-69FE89F39C27.launchd_sim[23018]
(com.asperasoft.faspex-app.FaspexExtension[27087]): Extension did not
initialize in time.
Anyone know what might be causing this behavior?
For the curious, I am doing this so that the application:handleEventsForBackgroundURLSession:completionHandler: method of my containing app's UIApplicationDelegate class gets called. I realize that it is a little shady, but... there aren't many ways to communicate between a share extension and its containing app, so it's what I got.
EDIT: I'm now using this workaround https://stackoverflow.com/a/24614589/3923882 (UIWebView) so this question isn't really that pressing. Still interested if anyone has an answer though.

EXC_BAD_ACCESS in main on iPad only

When I test my app on my iPad I can consistently and reliably get it to crash. When it does, I get an EXC_BAD_ACCESS error in main, and the root cause is far from obvious. I have tried the following steps to try to shed more light on it:
I have enabled zombies. This doesn't seem to have had any affect at all in the output, which makes me think this is not a zombie issue (but clearly I could be wrong).
I have add an exception breakpoint, but when the app crashes, the exception breakpoint doesn't kick in, and all I get is the standard green arrow next to line 16 of main.
I have run the Analyzer and corrected the few minor error that were revealed there. Still, no effect.
I have confirmed that the same problem is occurring for two of my testers who receive the build via test flight.
I have performed a 'Clean' as well as a 'Clean Build Folder'
Here is whats especially weird. When I test on the iPad the app crashes consistently. When I test in a simulator it will not crash no matter what I do. So if it IS a zombie I am at a loss as to how to discover which object need retained better. Further, if I test on my iPhone, the app also does not crash.
Where the crash occurs: In the app, I have a number of sprite nodes that display information, when I touch one of them (actually, what I am touching is a child sprite made to look like a cancel button), what is supposed to happen is that I remove the cancel button's parent from its parent with:
[[self parent] removeFromParent];
Pic of call stack:
There is nothing in the console in the main xcode window, but this is in the console of the device (from the organizer window:
Apr 10 08:50:39 Roberts-iPad com.apple.debugserver-310.2[596] <Warning>: 69 +0.000164 sec [0254/060b]: far -> 788
Apr 10 08:50:39 Roberts-iPad com.apple.debugserver-310.2[596] <Warning>: 70 +0.000079 sec [0254/060b]: esr -> 796
Apr 10 08:50:39 Roberts-iPad com.apple.debugserver-310.2[596] <Warning>: 71 +0.000081 sec [0254/060b]: exception -> 800
Apr 10 08:50:42 Roberts-iPad backboardd[31] <Error>: HID: The 'Passive' connection 'Bubble Fit' access to protected services is denied.
Apr 10 08:50:43 Roberts-iPad backboardd[31] <Warning>: CoreAnimation: updates deferred for too long
Apr 10 08:50:57 Roberts-iPad lockdownd[25] <Notice>: 01cdc000 _select_socket: receive secure message timeout!
Apr 10 08:50:57 Roberts-iPad lockdownd[25] <Notice>: 01cdc000 _receive_message: walk away - non-SSL 1
Up until yesterday I thought I was very, very close to shipping :P I would appreciate any advice on how to shed more light on what the root cause of this exception is. Thanks!
UPDATE: As LearnCocos2D points out below, I may very well have the same SpriteKit bug he links to. The suggestion is to override removeFromParent. I tried this, but it produces an error:
- (void)removeFromParent
{
[self removeFromParent];
self = nil;
[super removeFromParent];
}
The error it produces is that self cannot be assigned to outside of init. How should I rewrite that?
As it turns out, this really was a bug in SpriteKit, further discussed here:
Sprite Kit iOS 7.1 crash on removeFromParent
My fix was to override removeFromParent, in the SKShapeNode subclass that contained the children that needed to be nil'ed before the parent was removed, as thus:
- (void)removeFromParent
{
[self.addButton removeFromParent];
[self.cancelButton removeFromParent];
self.addButton = nil;
self.cancelButton = nil;
[super removeFromParent];
}
The children shape nodes are properties of the parent.

Problems with iOS app quitting with no debug info and no log messages

I have an app here that could be boiled down to uiscrollviews with images that you can flick through. I'm experiencing something really strange here though.
When flicking through each image (have roughly 60 of them in total), at some point the app just quits. I'm running it in XCode 4 (GM seed 2), and I'm getting no debug info, and no messages in the console at all. Turned on NSZombieEnabled, but that didn't change anything.
I'm not even getting a crash log on the device. I've run it through instruments, and it doesn't report any leaks, and my memory usage goes between 700 and 1100KB when run on the device.
I even checked each of my "pages" (the ones you flick through) and added messages at init and dealloc, and I can confirm that they're all getting deallocated properly (only keep the current and the pages on each side loaded).
Now, this seem to mostly happen at the same point in the app when I just start at the beginning and flick through each page going right, plus or minus a few pages, all pointing toward a memory issue, I do get a memory warning from the device, but there is absolutely nothing pointing to me using a lot of memory at all, nor that there are any leaks.
I got this from the console on the device when the app quits:
Mar 8 14:13:37 unknown configd[26] : jetsam: kernel memory event (92), free: 451, active: 2894, inactive: 2267, purgeable: 0, wired: 16709
Mar 8 14:13:37 unknown configd[26] : jetsam: kernel termination snapshot being created
Mar 8 14:13:37 unknown com.apple.launchd[1] : (com.apple.AOSNotification) Exited: Killed: 9
Mar 8 14:13:37 unknown com.apple.launchd[1] : (UIKitApplication:com.apple.mobilemail[0xc2ee]) Exited: Killed: 9
Mar 8 14:13:37 unknown com.apple.launchd[1] : (UIKitApplication:no.NRC.NRCMag[0x3c6c]) Exited: Killed: 9
Mar 8 14:13:37 unknown com.apple.launchd[1] : (com.apple.dataaccess.dataaccessd) Exited: Killed: 9
Mar 8 14:13:37 unknown SpringBoard[30] : Received memory warning. Level=1
Mar 8 14:13:37 unknown SpringBoard[30] : Application 'Perspective' exited abnormally with signal 9: Killed: 9
Mar 8 14:13:38 unknown SpringBoard[30] : Application 'Mail' exited abnormally with signal 9: Killed: 9
Mar 8 14:13:38 unknown SpringBoard[30] : Memory level is not normal (60%). Delaying auto-relaunch of 'Mail' for 30 seconds.
Mar 8 14:13:38 unknown SpringBoard[30] : Received memory warning. Level=2
Mar 8 14:13:38 unknown kernel[0] : launchd[1253] Builtin profile: dataaccessd (sandbox)
Mar 8 14:13:39 unknown AOSN[1252] : AOSNotification Daemon Starting...
Mar 8 14:13:39 unknown AOSN[1252] : Device Information. Name: Calypso, BuildVersion: 8F190, Product Type: iPad1,1, Unique Device ID: f02b304ed9a62109de1f3efd3e1e23158a76b2d4
Mar 8 14:13:40 unknown ReportCrash[1254] : Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-03-08-141339.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Mar 8 14:13:40 unknown SpringBoard[30] : Received memory warning. Level=1
Mar 8 14:13:40 unknown dataaccessd[1253] : DA|Registered for wake notification
Mar 8 14:13:40 unknown AOSN[1252] : Push: Loading...
Mar 8 14:13:41 unknown profiled[1257] : profiled|Service starting...
Mar 8 14:13:41 unknown dataaccessd[1253] : EAS|EAS Protocol Manager set to ASProtocolUnknown
Mar 8 14:13:41 unknown dataaccessd[1253] : CalDAV|A refresh fired, but we're still waiting on a gatekeeper lock
Mar 8 14:13:42 unknown dataaccessd[1253] : EAS|EAS Protocol Manager set to ASProtocol12_1
Now this mentions a crash report, but how do I get a hold of this when it doesn't show up in the Organizer in XCode? And why am I getting memory warnings when Instruments (and a thorough look at my code) says that I'm not using much memory, nor leaking?
Help!
EDIT: Got 3.2.6 up and running here and the console now gives me this:
Program received signal: “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")
Okay, so I figured it out here, and it's a bit silly.
I use UIImage's imageNamed method to load each image/page, and apparently this was causing the memory warnings.
There's a couple of things that bother me a bit about this.
The caching is obviously a good thing, but apparently in 4.3 GM it doesn't seem to actually empty its cache when a memory warning occurs.
The memory usage building up isn't being reported as being used by my app.

ipad app crashes on new iOS 4.1.2 but works on 3.2

I have a app in which i play a splash video and have added some custom fonts.
The app works fine on ipad 3.2 but on 4.2 etc it crashes. The log says that i release something that i dint alloc. I have checked my code a hundred times and i dont do any such thing.
Either ways it works on the simulator and on the device(both 3.2)
any ideas?
EDIT:
<Error>: df(7903,0x3e3d7898) malloc: *** error for object 0x1a11b0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Wed Jan 19 20:35:38 unknown UIKitApplication:com..imagazine[0x9c7c][7903] <Notice>: def(7903,0x3e3d7898) malloc: *** error for object 0x1a11b0: pointer being freed was not allocated
Wed Jan 19 20:35:38 unknown UIKitApplication:com.imagazine[0x9c7c][7903] <Notice>: *** set a breakpoint in malloc_error_break to debug
Wed Jan 19 20:35:39 unknown ReportCrash[7905] <Notice>: Formulating crash report for process df[7903]
Wed Jan 19 20:35:39 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.imagazine[0x9c7c]) Job appears to have crashed: Abort trap
Wed Jan 19 20:35:39 unknown SpringBoard[27] <Warning>: Application 'df' exited abnormally with signal 6: Abort trap
Wed Jan 19 20:35:39 unknown ReportCrash[7905] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/df_2011-01-19-203538_Sumas-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
SOLUTION:
First of all use the NSZombies and you will catch such errors.
The Problem: I had a timer setup for every 0.2sec and it was clearing a UIView and allocating it, not every 0.2secs but maybe once every 5secs.
I did a standard check:
if(vewCustom!= nil) {
[vewCustom removeFromSuperView];
[vewCustom release];
vewCustom = nil;
}
But the strange thing was i verified the code hundreds of times and I was not over releasing and either ways it worked on iOS4.2 for iPhone.
I removed the Timer but still it was crashing and then I removed the release and now it works fine.
Strange but it would be good if someone can explain what i was doing wrong.
You could try running the app in debug with zombies enabled. This way you'll get a stack trace on the overreleased object here's a link on how to set it up.
http://iosdevelopertips.com/debugging/tracking-down-exc_bad_access-errors-with-nszombieenabled.html
Assume that the log is true. The easiest way to find it is to enable Zombies and then exercise your application throughly. See here (tip #1):
http://loufranco.com/blog/files/debugging-memory-iphone.html
Another thing to do is a Build and Analyze and look at each thing it flags. In my experience there are very few false positives.
Just noticed this while looking for something else. The reason for the crash is that removeFromSuperview causes the superview to release the view. Thus, the release that follows is redundant (over-release). Won't be an issue with ARC, but could cause some confusion in other situations

Resources