Font can not load WP8, Cocos2d xna

Topics: Windows Phone 8
Oct 4, 2013 at 11:45 AM
Edited Oct 8, 2013 at 4:46 AM
Dear totallyevil,

When I resume game from background by Back key press, the font did not load like Image

I see an error in log windows:

A first chance exception of type 'System.NullReferenceException' occurred in SharpDX.Direct3D11.DLL
An exception of type 'System.NullReferenceException' occurred in SharpDX.Direct3D11.DLL and wasn't handled before a managed/native boundary
System.NullReferenceException: Object reference not set to an instance of an object.
   at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut)
   at SharpDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description)
   at Microsoft.Xna.Framework.Graphics.Texture2D.CreateTexture()
   at Microsoft.Xna.Framework.Graphics.Texture.GetTexture()
   at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipmap, SurfaceFormat format, SurfaceType type, Boolean shared)
   at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipmap, SurfaceFormat format)
   at Microsoft.Xna.Framework.Content.Texture2DReader.Read(ContentReader reader, Texture2D existingInstance)
   at Microsoft.Xna.Framework.Content.ContentTypeReader`1.Read(ContentReader input, Object existingInstance)
   at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T]()
   at Microsoft.Xna.Framework.Content.SpriteFontReader.Read(ContentReader input, SpriteFont existingInstance)
   at Microsoft.Xna.Framework.Content.ContentTypeReader`1.Read(ContentReader input, Object existingInstance)
   at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T]()
   at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[T]()
   at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)
   at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
   at Cocos2D.CCSpriteFontCache.InternalLoadFont(String fontName, Single fontSize, Single& loadedSize)
   at Cocos2D.CCSpriteFontCache.TryLoadFont(String fontName, Single fontSize, Single& loadedSize)
   at Cocos2D.CCTexture2D.InitWithString(String text, CCSize dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment, String fontName, Single fontSize)
Please consider about it. Thanks!