- Home /
What things cause this message?The content was stopped because a...
What things cause this message?
The content was stopped because a fatal content error has been detected.
This is throwing me in two scenes that load as StreamPlayer, With the other if it is working correctly should look for things that can cause this fatal message ?
I feel like when you see the blue screen of the dead T_T
will accept any comments as to contribute something to tell me that may be doing wrong to someone else to happen?
was solved without doing anything or is it something specific or is about many things together?
something I could indicate where to start looking, do not ask for the solution, only the generic causes
i also have that problem, and don't know why... it seems happen uncertainly
Answer by KidNamedLox · Aug 21, 2012 at 02:37 AM
Just ran across this again today. We've seen it here a couple of times on the projects we've worked on. We believe it has either to do with how generics are broken in the version of mono that unity is using or the Component.GetComponent functions have a bug in them that randomly show their ugly head.
To fix this, in the code, go through all references to GetComponent, GetComponents, GetComponentInChildren, and GetComponentsInChildren and make sure they refer to the gameObject for these functions.
So rather than:
void TestBehaviourFunc()
{
Renderer myRenderer = GetComponent<Renderer>();
}
you would use
void TestBehaviourFunc()
{
Renderer myRenderer = gameObject.GetComponent<Renderer>();
}
If this doesn't work, I'd suggest looking for anything that might be nesting generics, where a class taking a generic parameter has a function taking a different generic parameter.
Example:
class TestGeneric<T>
{
public TestFunc<G>()
{
}
}
should be
class TestGeneric<T>
{
public TestFunc(Type secondType)
{
}
}
The second is a bit clunkier, but at least it doesn't crash the web player.
Having this same problem. I have a large project, already live on iOS and Android, just now trying to port to WebPlayer (facebook canvas).
I'm looking at $$anonymous$$idNamedLox's solution (changing all calls to GetComponent and not using nested generics.
Is this solution really known to fix the error? The logs for the error are super generic and effectively useless. I hate to start making sweeping changes to my code to address what seems like a compiler/runtime bug, and then not sure how likely it is to even fix the problem.
Answer by dice929 · Apr 08, 2013 at 08:28 AM
On some browsers (eg. Chrome and IE) it is likely to cause a cache overflow. I had the same problem and converted 3000 lines of successive spaghetti code into several functions to make it running simultaneously. Now it also runs on Chrome and IE not causing the plugin crash.
For more information: http://forum.unity3d.com/threads/177077-Max-amount-of-variables-Crashing-Chrome-and-IE-running-in-Firefox
Answer by voldemarz · Mar 01, 2014 at 07:37 PM
I've seen this message caused by huge constructor (5000+ lines) that was only initializing a dictionary (string -> List of 350 strings). Don't ask why...
That was "fixed" by splitting it into two functions.