The weird iOS8 + Unity3D hiccup - ios

We've run into a strange problem when using Unity3D and iOS8. After about 1 minute there is a large (sometime a bit smaller) hiccup and we can't figure out why. Garbage collection?
We spent a few days trying to find out what the problem was and then created a minimalistic demo project where the exact same problem occurs.
The hiccup does not appear on iOS 7 or lower devices, not on Android and not in the editor. Only iOS8. We've tried build both with the latest release of Unity and the latest 4.6 beta.
Does anyone have a suggestion on how to fix this? Is it a bug in Unity3D?
Demo project:
Click the "Black bar" in the first scene to get to scene two where the problem occurs.
Look closely at the casinos. After about 1 minute you will see that they stop for a moment and then jump forward. As if a few frames were missed.
The problem does not seem to appear if we go straight to "scenetwo" from launch.
https://github.com/dale/demoproject-hiccup
EDIT 2014-10-20:
Unity has now responded with this. "We got other reports on this issue. It seems to be caused by new "feature" of iOS8, where is watchdog is generating exception report if your app is shuffling threads too often. We are looking into ways how to mitigate/avoid these reports."

Unity has now responded with this.
"We got other reports on this issue. It seems to be caused by new "feature" of iOS8, where is watchdog is generating exception report if your app is shuffling threads too often. We are looking into ways how to mitigate/avoid these reports."

Related

IBDesignablesAgentCocoaTouch and Interface Builder Cocoa Touch Tool are eating my CPU

Does anyone know what these two: IBDesignablesAgentCocoaTouch and Interface Builder Cocoa Touch Tool are doing ?
Every time I have Xcode open these two are using so much CPU that my fans are at max speed.
I am using Xcode 9 beta 5 at the moment. Not sure if these all started with beta 5 or beta 4.
Can I do something to prevent them using so much CPU ?
Issue seems to be fixed in Xcode 9 Beta 6
I had this issue for a few hours and in the end I finally fixed it. IBCTT was eating up cpu and memory 5gb at one point and Xcode was unresponsive. I updated everything, cleared every cache and even tried throttling the tool but in the end the issue was simple but hard to detect. If that seems like your issue read on.
What you must do is clear all constraints on any view in the storyboard with errors if you are able to load it at least once. Then reset to suggested constraints and save.
If your storyboard has many views you want to Editor -> Refactor to storyboard the most complex or recently added/edited view.
You may notice in the crash report that it mentions an error not reporting a reason. Seems that I was having an error that I couldn't detect since the storyboard wouldn't load anyways. Refactoring out the view with the issue, then loading it first on a fresh restart showed the error and allowed me to clear constraints immediately.
Then restart Xcode by shutting down without force quitting to avoid the crash report and allow Xcode to start normally. Clear build folder then recompile.
This issue followed me through three installs of Xcode, 9.1 GM and 9.2 beta 1 and 2(9c34b) and a couple High Sierra beta updates (4 currently), so the issue seems to be deep within the AutoLayout engine. In all fairness to Apple constraints are a powerful idea but the variations involved on tools end is a nightmare.
Also my Interface Builder Cocoa Touch Tool is back to 84mb in Activity Monitor so I'm back to work....good luck!

After upgrading to unity 5.4 Substance crash after building for iOS and goes missing

I am experiencing yet another weird one. After upgrading from unity 5.3.6f1 to unity 5.4.0f3 every time i open a my project it crashes(if the substance is not included it doesnt crash only when i build the project). it then breaks the substance, they are stuck in generating state. After fixing the substance and then building the project for iOS platform the crash happens during the build process and the substance breaks in the build, in other words the substance is completely broken and all references are missing. i created a unlisted video here that you can see what i mean, Check out the video here Crazy right?
I've tried reproducing the error with a new project but it works fine when i build. so I'm wondering if it hasn't got anything to do with actually upgrading from the previous version.
Can anyone share any light on this?
Thanks in advance
P.S. here is the code it spits out just before it breaks the substance.
material->IsFlagEnabled (ProceduralMaterial::Flag_Clone) || m_PingedMaterial == NULL || m_PingedMaterial == material
UnityEditor.DockArea:OnGUI()
It turned out that this was a bug. and the Allegorithmic team and Unity team got it fixed so quickly. The version with the fix is Unity 5.5b6, I've tested it and it works 100%
Substance: Fixed crash when selecting a ProceduralMaterial after switching build platform. (820301)
Substance: Fixed occasional ProceduralMaterial asset import crash. (822217)
Substance: Fixed SubstanceImporter.ExportBitmaps generated file names.

XCode 7.2.1 - cdtool cannot compile occurs irregularly

The app I am developing has a weird issue since a few months. Sometimes during building an archive the error cdtool cannot compile occurs. But only sometimes.
When I wipe the derived-data and do a clean-archive it works again.
I found a variety of people asking similar questions, but they all had this error occur nonstop.
To be precise: The error occurs always during archiving and always on the same file which is Config.xcdatamodel. This CoreData model only has one version so version-conflicts aren't a problem (also verified on the file-system).
Unfortunately it is nearly not reproducable at all, it seems to occur 100% randomly. It also doesn't provide an closer information about what exactly it is, that fails.
In the image there are two compile-errors. Thats because the Config.xcdatamodel that fails, is in both targets. They won't be used at the same time, so it should be fine. I also suspect that the second error-message is based on the first (upper) one.
Did anyone ever observe such a behaviour? I'm currently using XCode 7.2.1

Unity3d Xcode Mprotect remapping failed error. What it is and how to fix?

I'm stumped with an error I found and from my searches, only a few have also received it a long time ago and I'm not quite sure if / how a solution was achieved.
The error I'm getting in xcode is
Mprotect failed at 0xed50000 (length 212992) with errno 12
Mprotect remapping failed
The game works fine in the editor and all other platforms. This error is iOS specific and happens every session that goes past the login process (loads another scene) for > 10 seconds. The exact time is inconsistent. I say inconsistently because it doesn't seem to happen right after an interaction. My game does download data and images so my hunch (and a lousy hunch at that) is threading / wait time is the cause of the inconsistently.
Here's some of my search results
http://forum.unity3d.com/threads/mprotect-failed-at-0x51fa000.15858/
this is from all the way back from 2008 and it looked like it was a
hotfixed by Unity
http://forum.unity3d.com/threads/mprotect-remapping-failed.15443/
this is more of the same but a Unity dev did mention:
Workaround: don't allocate mono objects too frequently, reuse them if
possible (this would also improve your performance).
This is a little embarrassing since I'm a self taught Unity user but
what exactly does that mean and can I apply it to my problem?
My system info:
Currently on Unity 5.3 but has been happening since 5.2 Xcode is version 7.2 but has been happening since 7.0 I think My game is 2d, it uses NGUI, it downloads data and images from the internet.
Thank you so much for your read and time. Hope you can help!

XCode 4.2 on OSX 10.7.1 (Lion) Crashing/Locking Up all the time. Anyone Know how to fix?

This should not create any Issues with the NDA as I am not asking anyone to reveal any functionality of the application, I have asked on the Developer Forums, but They dont have the user base or the response speed of StackOverflow.
I have been working with XCode for a while now. And other then these issues, I REALLY LIKE the new xcode. I will (when these issues are resolved) recommend this application to all iOS/OSX developers.
Anyhow.
I am currently developing iOS applications. And am Running this setup on Mac OSX 10.7.1 (Lion)
Issue 1:
If I use the Interface builder it will first of all stay open even after I navigate away from it and it is no longer visible or to my knowledge "running". After a while it will consume more then 4 gigs of active memory. I will have the activity monitor open and Will eventually have less than 20megs left of free memory. I upgraded my MacMini to 8 Gigs of memory and at this point it will get down to about 200 Megs of memory left and will eventually release the memory that IB had held onto. If I do not open IB in XCode 4 it tends to use a lot less memory. (adding 8 gigs of memory makes this memory leak a lot less of a problem)
Issue 2: (MOST ANNOYING, HOPING FOR A FIX TO THIS ONE MOST)
This one only currently happens on one of the Three machines I code on. And what happens is while programming if I [Run] the app it will work for a while. Then at some point through the process it will begin to Lock Up when I press Run or Command-R. If I save the code file and run. It will not lock up. However if I forget to save, It will not only lock up. But will force me to terminate the XCode app, and Subsequently Recode everything that I had edited since the last save and the Application Run. This is by far the most annoying bug I have encountered this far.
Issue 3:
This bug happens more and more often the longer the application and operating system has been running. Running into the iPad will give me a number of Errors including "Unable to Connect to Debugger" or "Finished Successfully" among others. But the important part of this issue is that the application will never get sent to the iOS device. It will compile and say it finished. But there will be a error in the output pane.
I hope others have encountered these errors and Hopefully there is a quick fix with config files or something that will make development a lot more convenient. Thanks to anyone for resolution to any of these issues.....
EDIT
I finally received an email from apple support. I have emailed them off a Capture from XCode 4 and will hopefully hear something from them. Or maybe they will just release a new beta. Either way I hope to get this resolved asap.
For issue #2 you might want to try auto-saving your code before runs. See XCODE auto save code when build and run? instructions. Not sure if these instructions will work for 4.2 but you get the idea.
I had issues with my Xcode 4.2 install crashing initially. Re-running the installer over the already installed Xcode 4.2 fixed them. Obviously I don't know what the underlying issue with the install was, but although the first install reported installation was successful, obviously it wasn't. Perhaps worth trying.
When a newer version of Xcode 4.2 becomes available to you (cough), you might want to see whether installing that one fixes the problem. Perhaps given the issues, you should try uninstalling the previous version first rather than installing over the top?
Do you use multiple windows? They are anathema to Xcode 4. If you persist in your heresy, it may corrupt some files, and slow itself down. You will see a lot of beachballing, and it will be in some sort of GC.
You can work around this by deleting a workspace-specific file hidden inside your project. (I will have to look up which one, if this describes your case.)
With the new Beta GM Release they have seemingly fixed the issue with the Hanging.
Thanks for the Answers. Ill +1 anyone who helped but ultimately it was apple that fixed the issue.... For now

Resources