# Error when running game on iOS - Assertion failed: InTexture != NULL in CanvasItem.h

**URL:** <https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420>\
**Category:** Mobile\
**Tags:** unreal-engine, iOS\
**Created:** [August 15, 2014, 2:59am UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420 "2014-08-15T02:59:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [August 15, 2014, 2:59am UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420/1 "2014-08-15T02:59:44Z")

</div>

I am using version 4.3 on OS X, and deploying to an running iOS 7. When I deploy my game on iOS, it will open to the main menu and run just fine. But whenever I press a button, which is supposed to flip a boolean in a custom HUD Blueprint to display another menu, I get the following error message in the Output Log:

_LogPlayLevel:Display: env: 2014-08-14 18:28:56.312 MattieMathBot[10213:3a07] /Users/build/BuildFarm/build\_++depot+UE4-Releases+4.3/Engine/Source/Runtime/Engine/Public/CanvasItem.h(183): Assertion failed: InTexture != NULL_

I tracked down the FCanvasTileItem method that is throwing the error, in the latest build it is between lines 157 and 180 in the following file: latest-preview/Engine/Source/Runtime/Engine/Public/CanvasItem.h (you can find it on GitHub).

I am getting this error only on iOS. When I run the game in the Editor on OS X, and in the Editor on Windows, everything runs fine and I don’t receive any warnings or errors. When I run the app after deploying it to the iPad (after shutting down the editor and just running the app off of the iPad; the game crashes.

Here’s what the crash log on iOS says:

![12786-screen+shot+2014-08-14+at+6.47.49+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/3/23fd019f6002d0847041ea626b1324fab50100b2.png)

 ![12787-screen+shot+2014-08-14+at+6.47.55+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/8/f8f92c296676743ab8e6999d421ff4adcb9d4c11.png)

Any ideas?

---

<div class="post-metadata">

**Author:** ![joeGraf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joeGraf](https://forums.unrealengine.com/u/joeGraf)\
**Post date:** [August 15, 2014, 1:43pm UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420/2 "2014-08-15T13:43:45Z")

</div>

Things to check:

- An error saying that the texture wasn’t able to be packaged for that platform
- Make sure the texture is a power of 2 size (if it’s not, post back as that’s good info)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [August 15, 2014, 1:52pm UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420/3 "2014-08-15T13:52:46Z")

</div>

I think I had a texture for the UI that wasn’t a power of two. I’ll check when I get to work and update when I find out for sure. Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [August 17, 2014, 5:27am UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420/4 "2014-08-17T05:27:32Z")

</div>

> [@joeGraf;118867](#):
>
> Things to check:
> 
> - An error saying that the texture wasn’t able to be packaged for that platform
> - Make sure the texture is a power of 2 size (if it’s not, post back as that’s good info)

I found several textures that weren’t power of 2. After resizing them so that they were all power of 2, I was able to run the game on iOS 7 without any issues. Thank you for the help!

---

<div class="post-metadata">

**Author:** ![PRESSURE2000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PRESSURE2000](https://forums.unrealengine.com/u/PRESSURE2000)\
**Post date:** [November 15, 2022, 10:37pm UTC](https://forums.unrealengine.com/t/error-when-running-game-on-ios-assertion-failed-intexture-null-in-canvasitem-h/9420/5 "2022-11-15T22:37:15Z")

</div>

how on gods green earth can we check how to change the power of 2???
