# PNGs not loading, appears to be random

**URL:** <https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897>\
**Category:** Ignition\
**Tags:** ignition80, ignition81, vision\
**Created:** [October 13, 2021, 2:56pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897 "2021-10-13T14:56:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![clcstay](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@clcstay](https://forum.inductiveautomation.com/u/clcstay)\
**Post date:** [October 13, 2021, 2:56pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/1 "2021-10-13T14:56:08Z")

</div>

Hello -

I’ve run into a new issue and I’m not sure how to resolve it. When I load my Vision client, at random 2 or more of my screens will not be able to load the PNG image I have placed as a background. If I open the designer and save to force a client refresh, the images will then load. I work for an integrator so I’d like to resolve this so when we pass over the project the customer does not need to worry about it. I’ve attached a picture of the issue on launch and after a force refresh. Any and all help is appreciated!

 ![nopic](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/29620da2f4edd56f4bd433817cfaa8045c8f7e8f.png)  
 ![withpic.PNG](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3f125c8ba62b0f3c12f5d41676177a3baa239abc.jpeg)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 13, 2021, 4:33pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/2 "2021-10-13T16:33:10Z")

</div>

Any errors in the logs in the client ( Ctrl + Shift + F7 to open the diagnostics if you’ve got the menubar hidden)?  
How big are these images, filesize-wise?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [October 14, 2021, 12:18am UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/3 "2021-10-14T00:18:41Z")

</div>

Did you increase the default vision memory settings from 256mb?

---

<div class="post-metadata">

**Author:** ![clcstay](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@clcstay](https://forum.inductiveautomation.com/u/clcstay)\
**Post date:** [October 14, 2021, 5:52pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/4 "2021-10-14T17:52:04Z")

</div>

Hello, thank you both for your replies.

The logs do show a error with image loader:

Message: Unable to read resized image from disk cache.  
Time: jue. oct. 14 12:48:44p. m.  
Severity: WARN  
Logger: ignition.ImageLoader  
Stack Trace: javax.imageio.IIOException: Caught exception during read:   
&nbsp;&nbsp;&nbsp;&nbsp;at java.desktop/com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.desktop/javax.imageio.ImageIO.read(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.desktop/javax.imageio.ImageIO.read(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader$ImageInfo.getScaledImageImpl(ImageLoader.java:472)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader$ImageInfo$ScaledImageCacheLoader.load(ImageLoader.java:459)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader$ImageInfo$ScaledImageCacheLoader.load(ImageLoader.java:456)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache.get(LocalCache.java:4147)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader$ImageInfo.getScaledImage(ImageLoader.java:512)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader.loadImageMemCache(ImageLoader.java:219)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.ImageLoader.loadImage(ImageLoader.java:169)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.PathIcon$LoadImageTask.doInBackground(PathIcon.java:317)  
&nbsp;&nbsp;&nbsp;&nbsp;at com.inductiveautomation.ignition.client.images.PathIcon$LoadImageTask.doInBackground(PathIcon.java:298)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.base/java.util.concurrent.FutureTask.run(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.desktop/javax.swing.SwingWorker.run(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
&nbsp;&nbsp;&nbsp;&nbsp;at java.base/java.lang.Thread.run(Unknown Source)  
Caused by: java.lang.OutOfMemoryError: Java heap space

Each image for each screen is between 2 and 3MB.

I have just tried raising the min and max memory settings from default and it does not appear to have made a difference.

EDIT: Also the “Home” screen is a screen with a scaled down copy of each full screen that the user can use to navigate to the area they want to monitor, so it includes all images and has never failed to load unlike the screens with a single image.

EDIT 2: It appears that instead of being “random”, it is always the last 2 or 3 screens that I try to open will fail to load the image.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 14, 2021, 6:06pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/5 "2021-10-14T18:06:03Z")

</div>

For a test, what if you set the 'Cache Policy' of each window displaying one of these large images to `Never`? Then, once you navigate away, the window should be totally destroyed, freeing up that memory. The tradeoff is slightly worse performance each time you have to navigate to these windows (as slow as the initial open, that is).

> [@clcstay](#):
>
> I have just tried raising the min and max memory settings from default and it does not appear to have made a difference.

They were 256mB, and you raised them to what?

---

<div class="post-metadata">

**Author:** ![clcstay](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@clcstay](https://forum.inductiveautomation.com/u/clcstay)\
**Post date:** [October 14, 2021, 6:11pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/6 "2021-10-14T18:11:12Z")

</div>

I will try this test now.

Min was 32M and Max 265M, I stepped them up through Project Properties one at a time and relaunched the clients to test.

EDIT: Setting Cache to “Never” on each screen did not resolve the issue.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 14, 2021, 6:58pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/7 "2021-10-14T18:58:56Z")

</div>

Can you give your clients more memory?  
The code that’s failing is Java Swing code, not Ignition, and it’s failing for a fairly straightforward error - it was unable to allocate sufficient memory for the operation it wanted to perform.  
Unfortunately, as a fairly old technology, Java Swing has a lot of limitations/design decisions that were made at a totally different time. For instance, basically all graphics operations in Swing happen on the CPU, with no hardware acceleration.

It is _possible_ that there’s something we could do here to make things behave better, but anything we did wouldn’t help you in the short term. In the short term, you could try increasing the max memory further, or re-encoding these images in a different format (I would recommend trying .jpg); it’s possible simply reducing the image filesize will help with the memory issue.

---

<div class="post-metadata">

**Author:** ![Jason\_Platt](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@Jason\_Platt](https://forum.inductiveautomation.com/u/Jason_Platt)\
**Post date:** [November 13, 2024, 7:08pm UTC](https://forum.inductiveautomation.com/t/pngs-not-loading-appears-to-be-random/51897/8 "2024-11-13T19:08:18Z")

</div>

this post has helped more then you know
