Unity 4.6.1 UI Text causes crash on PC and web builds

Edit: I think i found the problem.
The graphics.Aseet settings didn’t include the UI font shaders. :frowning:

When i build my game with a Unity UI text it crashes when the scene loads.

Here’s a vanilla project that causes it to crash

here is the crash log

any ideas what causes it ? is there a workaround?

here is the web build for the crashing build

========= OUTPUTING STACK TRACE ==================

(0x00A84748) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xe8768
(0x00C5E7E1) (MedievalMadness_0.01): (filename not available): Behaviour::Transfer<RemapPPtrTransfer> + 0x4b01
(0x00C63565) (MedievalMadness_0.01): (filename not available): Behaviour::Transfer<RemapPPtrTransfer> + 0x9885
(0x04554BA3) (Mono JIT code): (filename not available):  UnityEngine.UI.Text:get_defaultMaterial () + 0x23 (04554B80 04554BB4) [007F4E70 - Unity Root Domain] + 0x0
(0x04554B71) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:get_material () + 0x31 (04554B40 04554B7F) [007F4E70 - Unity Root Domain] + 0x0
(0x0455489F) (Mono JIT code): (filename not available):  UnityEngine.UI.MaskableGraphic:get_material () + 0x87 (04554818 045548A9) [007F4E70 - Unity Root Domain] + 0x0
(0x04554714) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:get_materialForRendering () + 0x34 (045546E0 0455480C) [007F4E70 - Unity Root Domain] + 0x0
(0x04554697) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:UpdateMaterial () + 0x3f (04554658 045546CD) [007F4E70 - Unity Root Domain] + 0x0
(0x04552425) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:Rebuild (UnityEngine.UI.CanvasUpdate) + 0x45 (045523E0 04552432) [007F4E70 - Unity Root Domain] + 0x0
(0x04552044) (Mono JIT code): (filename not available):  UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate () + 0x2c4 (04551D80 04552122) [007F4E70 - Unity Root Domain] + 0x0
(0x044F4B60) (Mono JIT code): (filename not available):  UnityEngine.Canvas:SendWillRenderCanvases () + 0x20 (044F4B40 044F4B65) [007F4E70 - Unity Root Domain] + 0x0
(0x044A02FB) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) + 0x3b (044A02C0 044A034C) [007F4E70 - Unity Root Domain] + 0x0
(0x100F037C) (mono): (filename not available): mono_set_defaults + 0x22cb
(0x1005D7C3) (mono): (filename not available): mono_runtime_invoke + 0x51
(0x009B52A8) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0x192c8
(0x00A51C25) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xb5c45
(0x00A51DAE) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xb5dce
(0x00A51BA5) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xb5bc5
(0x00C61A8C) (MedievalMadness_0.01): (filename not available): Behaviour::Transfer<RemapPPtrTransfer> + 0x7dac
(0x00A1F2FF) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0x8331f
(0x00A9608B) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xfa0ab
(0x00A97B75) (MedievalMadness_0.01): (filename not available): Object::Transfer<StreamedBinaryWrite<0> > + 0xfbb95
(0x00D0CA78) (MedievalMadness_0.01): (filename not available): Behaviour::Transfer<RemapPPtrTransfer> + 0xb2d98
(0x00D41970) (MedievalMadness_0.01): (filename not available): Behaviour::Transfer<RemapPPtrTransfer> + 0xe7c90
(0x75CA338A) (kernel32): (filename not available): BaseThreadInitThunk + 0x12
(0x77A09F72) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x63
(0x77A09F45) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x36

========== END OF STACKTRACE ===========

As a workaround you can create a new material, set its shader to UI/Default font and change UI.Text Text/Material from none to the one you’ve created

This could have been a problem in the beta with fonts. If you try it again now it should be fixed.

Had same problem. Moved to 5 and it worked OK.