# Image tag crashed

**URL:** <https://forums.fusetools.com/t/image-tag-crashed/4589>\
**Category:** Bug Reports\
**Created:** [May 13, 2016, 9:59am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589 "2016-05-13T09:59:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ablipan](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ablipan](https://forums.fusetools.com/u/ablipan)\
**Post date:** [May 13, 2016, 9:59am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/1 "2016-05-13T09:59:41Z")

</div>

I’ve just add a simple Image tag, the preview crashed on the Local and the iOS simulator.

MainView.ux

```xml
<App Theme="Basic">
    <DockPanel>
        <Image File="Masks/Flower.png"></Image>
    </DockPanel>
</App>

```

project file:

[Attached ZIP file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/DS6TblshrXcu-legacy-files-KxMCLk5jkjrPxEes-EWkJ5qfousXdfPngjJ8tBJWM.zip)

Version: 0.12.4

logs:

```auto
Unexpected fatal error! Please report this to us.
Build started: FullCompile
Configuring (2.64s)
Compiling syntax tree (1.74s)
Generating code and data (1.88s)

Build completed in 6.28 seconds.
    0 Warning(s)
    0 Error(s)
Build ended
GL_VERSION: 2.1 INTEL-10.14.58
GL_VENDOR: Intel Inc.
GL_RENDERER: Intel Iris Pro OpenGL Engine
libc++abi.dylib: terminating with uncaught exception of type Xli::Exception: Xli::Exception
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.wrapper_native_0x29e52b0 (intptr,string,intptr,int,Uno.Native.Textures.TextureInfo&) <IL 0x0003c, 0xffffffff>
  at Uno.Native.Textures.Texture..ctor (string,byte[]) <IL 0x00032, 0x000b3>
  at Uno.Native.Textures.Texture..ctor (string,System.IO.Stream) <IL 0x00008, 0x0002b>
  at Experimental.TextureLoader.CilTextureLoader.LoadTexture (Uno.Buffer,System.Action`1<Uno.Graphics.Texture2D>,string) <IL 0x00026, 0x00163>
  at Experimental.TextureLoader.TextureLoaderImpl.PngByteArrayToTexture2D (Uno.Buffer,Experimental.TextureLoader.Callback) <IL 0x0000c, 0x00027>
  at Experimental.TextureLoader.TextureLoader.PngByteArrayToTexture2D (Uno.Buffer,System.Action`1<Uno.Graphics.Texture2D>) <IL 0x00002, 0x0006b>
  at Experimental.TextureLoader.TextureLoader.ByteArrayToTexture2DFilename (Uno.Buffer,string,System.Action`1<Uno.Graphics.Texture2D>) <IL 0x0001a, 0x0003f>
  at Fuse.Resources.FileImageSourceImpl.SyncLoad () <IL 0x0003c, 0x000e3>
  at Fuse.Resources.FileImageSource.set_File (Uno.UX.FileSource) <IL 0x00030, 0x0004f>
  at Fuse.Internal.ImageContainer.OnFileAdded (Uno.UX.FileSource) <IL 0x00028, 0x0008b>
  at Uno.Collections.ObservableList`1.Add (T) <IL 0x0002f, 0x000c9>
  at Fuse.Internal.ImageContainer.set_File (Uno.UX.FileSource) <IL 0x00064, 0x00087>
  at Fuse.Controls.Image.set_File (Uno.UX.FileSource) <IL 0x00007, 0x0001f>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void __this___ object (object,intptr,intptr,intptr) <IL 0x00062, 0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <IL 0x00038, 0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <IL 0x0005a, 0x000b7>
  at System.Reflection.MethodBase.Invoke (object,object[]) <IL 0x00006, 0x00039>
  at Outracks.Simulator.Runtime.TryInvokeExtension/<TryInvoke>c __AnonStorey0.<>m__ 0 () [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Simulator.Runtime/Reflection/CompiledTypeReflection.cs:275
  at Outracks.Simulator.Runtime.TryInvokeExtension.Try (System.Func`1<object>) [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Simulator.Runtime/Reflection/CompiledTypeReflection.cs:282
  at Outracks.Simulator.Runtime.TryInvokeExtension.TryInvoke (System.Reflection.MethodInfo,object,object[]) [0x0001b] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Simulator.Runtime/Reflection/CompiledTypeReflection.cs:275
  at Outracks.Simulator.Runtime.CompiledTypeReflection.SetPropertyValue (object,Outracks.Simulator.Bytecode.TypeMemberName,object) [0x00032] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Simulator.Runtime/Reflection/CompiledTypeReflection.cs:57
  at Outracks.Fuse.Preview.RuntimeObjectPoker.<HookUpReflectionInterface>m__2 (object,string,object) [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Fuse.Preview/RuntimeObjectPoker.cs:29
  at Outracks.Simulator.Reflection.DelegateReflection.Outracks.Simulator.Runtime.IReflection.SetPropertyValue (object,Outracks.Simulator.Bytecode.TypeMemberName,object) <IL 0x0000e, 0x0002c>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.WriteProperty) <IL 0x00024, 0x00065>
  at Outracks.Simulator.Bytecode.Expression.Match<T> (System.Func`2<Outracks.Simulator.Bytecode.ReadVariable, T>,System.Func`2<Outracks.Simulator.Bytecode.Literal, T>,System.Func`2<Outracks.Simulator.Bytecode.Lambda, T>,System.Func`2<Outracks.Simulator.Bytecode.MethodGroup, T>,System.Func`2<Outracks.Simulator.Bytecode.IsType, T>,System.Func`2<Outracks.Simulator.Bytecode.LogicalOr, T>,System.Func`2<Outracks.Simulator.Bytecode.Instantiate, T>,System.Func`2<Outracks.Simulator.Bytecode.CallLambda, T>,System.Func`2<Outracks.Simulator.Bytecode.CallStaticMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadStaticField, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.WriteProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.AddEventHandler, T>,System.Func`2<Outracks.Simulator.Bytecode.RemoveEventHandler, T>) <IL 0x0019d, 0x003d8>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.Expression) <IL 0x000c4, 0x00453>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (System.Collections.Generic.IEnumerable`1<Outracks.Simulator.Bytecode.Statement>) <IL 0x0002a, 0x00077>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (Outracks.Simulator.Bytecode.Lambda,object[]) <IL 0x00077, 0x00157>
  at Outracks.Simulator.Runtime.LambdaClosure.Func (object) <IL 0x00016, 0x00064>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (object,object[]) <IL 0x0003b, 0x000e2>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.CallLambda) <IL 0x00019, 0x0004f>
  at Outracks.Simulator.Bytecode.Expression.Match<T> (System.Func`2<Outracks.Simulator.Bytecode.ReadVariable, T>,System.Func`2<Outracks.Simulator.Bytecode.Literal, T>,System.Func`2<Outracks.Simulator.Bytecode.Lambda, T>,System.Func`2<Outracks.Simulator.Bytecode.MethodGroup, T>,System.Func`2<Outracks.Simulator.Bytecode.IsType, T>,System.Func`2<Outracks.Simulator.Bytecode.LogicalOr, T>,System.Func`2<Outracks.Simulator.Bytecode.Instantiate, T>,System.Func`2<Outracks.Simulator.Bytecode.CallLambda, T>,System.Func`2<Outracks.Simulator.Bytecode.CallStaticMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadStaticField, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.WriteProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.AddEventHandler, T>,System.Func`2<Outracks.Simulator.Bytecode.RemoveEventHandler, T>) <IL 0x000f8, 0x00261>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.Expression) <IL 0x000c4, 0x00453>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (System.Collections.Generic.IEnumerable`1<Outracks.Simulator.Bytecode.Statement>) <IL 0x0002a, 0x00077>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (Outracks.Simulator.Bytecode.Lambda,object[]) <IL 0x00077, 0x00157>
  at Outracks.Simulator.Runtime.LambdaClosure.Func (object) <IL 0x00016, 0x00064>
  at Outracks.Simulator.Runtime.LambdaClosure.Action (object) <IL 0x00002, 0x0001b>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (object,object[]) <IL 0x000ce, 0x002e5>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.CallLambda) <IL 0x00019, 0x0004f>
  at Outracks.Simulator.Bytecode.Expression.Match<T> (System.Func`2<Outracks.Simulator.Bytecode.ReadVariable, T>,System.Func`2<Outracks.Simulator.Bytecode.Literal, T>,System.Func`2<Outracks.Simulator.Bytecode.Lambda, T>,System.Func`2<Outracks.Simulator.Bytecode.MethodGroup, T>,System.Func`2<Outracks.Simulator.Bytecode.IsType, T>,System.Func`2<Outracks.Simulator.Bytecode.LogicalOr, T>,System.Func`2<Outracks.Simulator.Bytecode.Instantiate, T>,System.Func`2<Outracks.Simulator.Bytecode.CallLambda, T>,System.Func`2<Outracks.Simulator.Bytecode.CallStaticMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadStaticField, T>,System.Func`2<Outracks.Simulator.Bytecode.ReadProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.WriteProperty, T>,System.Func`2<Outracks.Simulator.Bytecode.AddEventHandler, T>,System.Func`2<Outracks.Simulator.Bytecode.RemoveEventHandler, T>) <IL 0x000f8, 0x00261>
  at Outracks.Simulator.Runtime.ScopeClosure.Evaluate (Outracks.Simulator.Bytecode.Expression) <IL 0x000c4, 0x00453>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (System.Collections.Generic.IEnumerable`1<Outracks.Simulator.Bytecode.Statement>) <IL 0x0002a, 0x00077>
  at Outracks.Simulator.Runtime.ScopeClosure.Execute (Outracks.Simulator.Bytecode.Lambda,object[]) <IL 0x00077, 0x00157>
  at Outracks.Simulator.Runtime.VirtualMachine.Execute (Outracks.Simulator.Runtime.IReflection,Outracks.Simulator.Bytecode.Lambda,object[]) <IL 0x00017, 0x000af>
  at Outracks.Simulator.Runtime.VirtualMachine.Execute (Outracks.Simulator.Bytecode.Lambda,object[]) <IL 0x00007, 0x00023>
  at Outracks.Simulator.Reifying.OnEnterState () <IL 0x00037, 0x000b7>
  at Outracks.Simulator.Application.SetState (Outracks.Simulator.State) <IL 0x0002c, 0x00052>
  at Outracks.Simulator.Application.OnUpdate () <IL 0x00037, 0x00073>
  at Fuse.App.Update () <IL 0x0002a, 0x0004e>
  at Uno.Runtime.Implementation.Internal.Bootstrapper.OnUpdate () [0x00016] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Runtime/Uno.Runtime.Core/Uno/Runtime/Implementation/Internal/Bootstrapper.cs:40
  at Outracks.Fusion.Native.UnoCoreInterop.UnoBootstrapper.OnUpdate () [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Fusion.Native.UnoCoreInterop/UnoBootstrapper.cs:93
  a

```

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [May 13, 2016, 10:11am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/2 "2016-05-13T10:11:52Z")

</div>

Hi, there seems to be an issue in our image loading code. I’ll file an issue internally to get it looked at, and try to find a workaround for you in the mean time.

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [May 13, 2016, 10:14am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/3 "2016-05-13T10:14:42Z")

</div>

It looks like there was something in `Flower.png` that our texture loader was unable to read. I opened and saved the image in Gimp, and now it works. You can use this file until I’ve investigated the issue more thorougly:

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/5KQsxXD58rGc-legacy-files-VOVR0YbWC9fj6XhX-Y2RcJfAgpwEUCYDixbI5twPu.png)

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [May 13, 2016, 11:16am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/4 "2016-05-13T11:16:05Z")

</div>

Found it, that image was actually a jpeg, but with a `png` extension. Still, Fuse shouldn’t have crashed, we’ll make sure to improve this.

---

<div class="post-metadata">

**Author:** ![ablipan](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ablipan](https://forums.fusetools.com/u/ablipan)\
**Post date:** [May 13, 2016, 1:22pm UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/5 "2016-05-13T13:22:59Z")

</div>

Got it,thank you.

---

<div class="post-metadata">

**Author:** ![kusma](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/kusma/32/595_2.png) [@kusma](https://forums.fusetools.com/u/kusma)\
**Post date:** [May 25, 2016, 8:19pm UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/6 "2016-05-25T20:19:25Z")

</div>

Thanks a lot for the reproduction case. We have come up with a fix, and will try to get that included in the upcoming 0.20-release.

---

<div class="post-metadata">

**Author:** ![Gonzalo\_Vega](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/gonzalo_vega/32/180_2.png) [@Gonzalo\_Vega](https://forums.fusetools.com/u/Gonzalo_Vega)\
**Post date:** [August 16, 2016, 8:46pm UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/7 "2016-08-16T20:46:19Z")

</div>

Hi, i’m having this same issue but it fails only on the iOS device (preview and build), local preview works ok. Thing is, my app is full of images and i don’t know which one is the one with the problem. Is there a way to debug on xcode to check what image is causing the exception?

Xcode stops in TextureLoader class, method `PngByteArrayToTexture2D`, and before that in the stack call is method `ByteArrayToTexture2DFilename`, where a `filename` variable is, but i can’t inspect its value.

I’m using Fuse 0.24

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Anders\_Bondehagen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_bondehagen/32/98_2.png) [@Anders\_Bondehagen](https://forums.fusetools.com/u/Anders_Bondehagen)\
**Post date:** [August 17, 2016, 11:02am UTC](https://forums.fusetools.com/t/image-tag-crashed/4589/8 "2016-08-17T11:02:13Z")

</div>

You should be able to debug just like a normal xcode project. I would make a small test project that cycle through the pictures and prints out the Uri.
