The Code Kingdom

viva la programmers!

Skip to content

Disappearing Images

Get help and support for NaviLibrary

Disappearing Images

Postby bmiller » Fri Oct 09, 2009 6:24 pm

Disappearing Image Elements

I recently changed PCs to a machine running 64-bit Windows XP. When I did, I initially had trouble running a project I was working on, so I updated all my dependencies, including switching over to Navi 2.0.

With this, I was able to successfully run my project and even use the new transparency feature, but I ran into a frustrating issue. Elements of pages served in Navis would disappear, often in response to the Navi coming in to focus or elements changing images due to mouse-over. In almost all cases, they would be replaced with the background color of the page being displayed on the Navi, causing transparent Navis to lose the ability to interact with these elements.

I wasn’t sure if this was a result of my code not properly reflecting the new version or an incompatability of my new machine with the new Navi, so I went back and set up the Navi Demo, and I was able to reproduce the same behavior. However, I was only able to get this issue to occur when I used the ‘Open Google’ button to travel to external websites with a large amount of content.

After some browsing, I located the simplest website I had found that still caused this issue to occur, which was a Statistics Page for the game Team Fortress 2. I made a local copy of this website and removed portions of it seeking the offending element that brought on this issue.

Eventually, the page was stripped down to nothing except a series of large .png images in a row with extremely minimal formatting, however, the issue could still be reliably reproduced by scrolling to the bottom of the statisics page and then clicking the buttons on the “menubar” Navi.

Removing a certain number of the images or decreasing their size would make reproducing the issue either difficult or completely impossible. The sample html below was the minimal number of images to reliably reproduce the issue on my machine.

The final test html used to try to sort out the issue actually directly linked the TF2 status images so that it could be handed off to other potential debuggers without any changes to the html, and it was as follows:

<html>
<body>
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/totaltimeplayedbyclass.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgpointshour.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgkillshour.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgassistshour.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgcaptureshour.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgtimelifeminutes.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/damagedealtofalldamage.png">
<img width="1024" height="1024" src="http://steampowered.com/status/tf2/public_graphs/avgdamagehit.png">
</body>
</html>

For this test, I disabled the transparency on the menu bar, so that I could continue to use it after the background color engulfed it.

In this sample test, after scrolling to the bottom of the statistics page, I clicked each menu button once and when making a second pass, the “equip” button vanished entirely, replacing the surroundings with the background color. Clicking the “chat” button had similar results. When I pushed the “status” button, the “on” state of the button and the hp+ and hp- icons appeared, but the entire menu bar was swallowed up.

Disappearing Equip Button Screenshot

Menu Bar Mostly Vanished

Has anyone encountered an issue similar to this one before? Thus far I've only been able to speculate as to what the real cause of this is and how to find a solution. Any help in sorting it out would be greatly appreciated.

bmiller
 
Posts: 3
Joined: Fri Oct 09, 2009 4:16 pm


Re: Disappearing Images

Postby borundin » Sat Oct 10, 2009 7:59 am

Yes I have had similar problems. In my case the images were quite a bit smaller (400x300) but I had alot of them and I also used the width and height properties in the IMG tag.
Maybe it is the scaling of the images that the browser has to do that is causing a memory problem or something? Anyway I solved it myself by scaling the images down offline (it was my own content).

borundin
 
Posts: 8
Joined: Tue Mar 24, 2009 11:40 am

Re: Disappearing Images

Postby psenough » Mon Oct 12, 2009 10:49 am

i ran into similar issues before. its the width attribute on images. webkit doesnt handle it properly. reproducable in chrome, so not really an awesomium/navi issue.
User avatar
psenough
 
Posts: 56
Joined: Mon Feb 09, 2009 11:07 am
Location: gaia / coimbra (.pt)

Re: Disappearing Images

Postby bmiller » Mon Oct 12, 2009 1:05 pm

Interesting.

I removed the height/width tags from the images on that statistics page and I removed all Navis from the demo except for the menu bar, but I was still able to reproduce the issue.

Will setting height/width through CSS styles also cause this?

bmiller
 
Posts: 3
Joined: Fri Oct 09, 2009 4:16 pm

Re: Disappearing Images

Postby psenough » Mon Oct 12, 2009 1:56 pm

bmiller wrote:Will setting height/width through CSS styles also cause this?


yes.
User avatar
psenough
 
Posts: 56
Joined: Mon Feb 09, 2009 11:07 am
Location: gaia / coimbra (.pt)

Re: Disappearing Images

Postby bmiller » Tue Oct 13, 2009 2:15 pm

I've sought to purge anything that could be setting the width and height of images or other elements from all of the demo elements and the statistics page. However, my images continue to disappear.

On the other hand, using the normal demo navis does not seem to bring about the issue, even though they set widths and heights through styles all over the place.

Even stranger, if I remove just two of the large images from the Statistics page (without any height/width tags) the navis render properly. However, with the full complement of images, the other navis will begin losing images almost immediately after scrolling to the bottom of the statistics page.

bmiller
 
Posts: 3
Joined: Fri Oct 09, 2009 4:16 pm

Re: Disappearing Images

Postby nforget » Tue Oct 13, 2009 3:43 pm

Hello everyone!

I work on the same project as bmiller here, and I just wanted to chime in to say we are having this issue of disappearing images with Navi 2.0 on all platforms, not just 64-bit XP.

In the interest of finding a solution to this problem, let me add some more details. I think "Disappearing Images" is a slight misnomer. The images are not exactly disappearing, so much as the dirty area of the screen is redrawn containing only the background color. This sometimes slices an image in half, so that part of it is left on the screen, while another part disappears. Once this has happened to a part of the screen, it never comes back.

We have been using Navi 1.8 for some time without encountering this issue.

Interestingly, it seems this bug is not in fact in the Navi project — if it was, we would gladly fix it and submit it back to the community — it is in Awesomium, for which we do not have source. We have been able to confirm that this bug occurs in our project, the Navi demo, and the Awesomium demo, but not in Google Chrome.

The easiest way we have found to trigger this bug in the Awesomium demo is to visit the TF2 Stats page (http://steampowered.com/status/tf2/tf2_stats.php). Once on the stats page, scroll all the way to the bottom, then all the way to the top again, then click the tab to view achievements, then back to the original tab. You should now see that many of the images, including the banner at the top of the page, are missing.

We are happy to help find the solution to this bug and fix it, if we can get access to the necessary source code. We would also appreciate any help you can offer in reproducing the bug. We are able to reproduce it quite reliably here in our office, but we are looking for some confirmation that others are having the same issue.

Any help you can offer will be greatly appreciated. Thanks!

nforget
 
Posts: 2
Joined: Mon May 11, 2009 9:20 pm

Re: Disappearing Images

Postby psenough » Tue Oct 13, 2009 5:50 pm

i used to have them randomly resized.
but like i said, that behaviour was reproducable in chrome, so it wasnt really navi/awesomium's fault.
you might have found another connected issue though. who know :)

check awesomium log for errors, you might be exploding some jscript things that lead to memory leaks and affect the other stuff. :?

afaik awesomium source is being revamped for v1.5 (which will be released partly comercially by adam's new company called khrona: http://khrona.com/ ) so it doesnt seem much likely that you'll get much luck trying to get the old sourcecode i'm afraid. you might want to try and mail adam (ajs15822@gmail.com), maybe he's found that issue in the past and resolved it already or can help you with some etas on the new awesomium. he seems abit overly busy these days though. :( good luck
User avatar
psenough
 
Posts: 56
Joined: Mon Feb 09, 2009 11:07 am
Location: gaia / coimbra (.pt)

Re: Disappearing Images

Postby mood » Fri Feb 19, 2010 9:44 am

Hello,

I have exactly the same behavior in my application and I was wondering if any of you did manage to solve the problem one way or another?

mood
 
Posts: 2
Joined: Fri May 15, 2009 9:53 pm


Return to Get Help

Who is online

Users browsing this forum: No registered users and 1 guest