Gauge image missing seemingly randomly

Not Answered This post has 0 verified answers | 48 Replies | 8 Followers Thread's RSS feed.

iamdudley
Points 195
Replied On: Tue, Nov 11 2008 6:50 PM Reply

 Hi,

 I am using a number of gauges in a dashboard set up (asp.net 2.0, IGv8.1) and occasionally a gauge will not show up when the page loads.  If I refresh the page the gauge then shows.   My deployment scenario is as follows:

        UltraGauge1.DeploymentScenario.ImageType = GaugeImageType.Png;
        UltraGauge1.DeploymentScenario.DeleteOldImages = true;
        UltraGauge1.DeploymentScenario.Mode = ImageDeploymentMode.FileSystem;
        UltraGauge1.DeploymentScenario.ImageURL = "~/images/SalesForce/Gauges/TargetKpi/Gauge_#CLIENT_#SESSION.#EXT";
        UltraGauge1.DeploymentScenario.FilePath = "~/images/SalesForce/Gauges/TargetKpi";

 The image url on the initial page load is:

 http://localhost:4004/BlueCow/images/SalesForce/Gauges/TargetPax/Gauge_ctl00_cphMaster_tpgNational_UltraGauge1_nfctuj45qfghidy0xik0ds55.png?t=128709199775304415

And then when I refresh the page it is:

 http://localhost:4004/BlueCow/images/SalesForce/Gauges/TargetPax/Gauge_ctl00_cphMaster_tpgNational_UltraGauge1_nfctuj45qfghidy0xik0ds55.png?t=128709201323972827

You can see how the timestamp (I'm guessing that's what "t" is) has changed slightly.  This behaviour happens both locally, and when my site is deployed on a server.  I'd say about 95% of the time the gauge image appears correctly, and the other 5% I need to refresh the page.  I don't think an image has ever failed to load for me on refreshing.

Any help on this would be greatly appreciated.

Cheers,

 James.

 

 

  • Post Points: 65

All Replies

Replied On: Tue, Nov 18 2008 10:50 AM Reply

The timestamp is just to prevent the browser from using a cached version of the image file, so I don't think it's relevant to this issue.

Try testing this with the latest available hotfix from our website, as it's possible some related fixes were made since the initial release of 8.1.  If that doesn't help, try checking if the image file exists on your server once the page loads with the missing image - that will at least hint at the nature of this problem, whether it's a timing issue or if the image simply isn't generated the first time.

  • Post Points: 20
iamdudley
Points 195
Replied On: Tue, Nov 18 2008 5:24 PM Reply

David,

when the image is missing from the page, the image is not created on the server.  Once I refresh the page the image file appears on the server (and the web page).  I thought I mentioned this in my first post but I must have just thought it and not written it.  :-)

I will try  the latest hotfix and see how that goes.

 James

  • Post Points: 20
jonnydock
Points 1,035
Replied On: Mon, Mar 2 2009 7:29 PM Reply

I am having this problem also.  I have NetAdvantage Vol.2 CLR 2.0

I have HotFix #2022 which I think is the latest Hotfix.  Is this still a problem?

  • Post Points: 35
iamdudley
Points 195
Replied On: Mon, Mar 2 2009 7:36 PM Reply

I still have this problem.  But I have not applied any hotfixes.  It is intermittent and not a show stopper and there was other work for me to do so I left it as is.

  • Post Points: 5
Replied On: Wed, Mar 4 2009 5:17 PM Reply

we haven't been able to reproduce this issue in-house, so any information you can provide about your application and your server would help us.

as a workaround, you could try using javascript to evaluate if the gauge image is valid, and call the gauge's CSOM method refresh() if it isn't.

  • Post Points: 20
jonnydock
Points 1,035
Replied On: Wed, Mar 11 2009 3:50 PM Reply

We loaded the latest version and hot fix and still have the problem.

Could you give me an example of how to evaluate if the gauge image is valid and then call refresh?

I will try that and see if it helps.

  • Post Points: 20
Replied On: Thu, Mar 12 2009 2:26 PM Reply

attach the javascript img.onerror event in the control markup, or in C#:

<igGauge:UltraGauge ID="UltraGauge1" runat="server" onerror="imageError();">

or

this.UltraGauge1.Attributes["onError"] = "imageError();";

here's the javascript imageError function:

        function imageError() {
            ig_getWebControlById("UltraGauge1").refresh()
        }

  • Post Points: 20
jonnydock
Points 1,035
Replied On: Mon, Mar 23 2009 5:23 PM Reply

Still seems to happen randomly.  Calling refresh from Javascript will fix it sometimes, but not all of the time.

We have 4 gauges and a ultrawebgrid, all in an UpdatePanel. I also have an UltraChart on the page.  When the grid is clicked, an async postback causes the gauge values to be updated.  Two of the gauges are using the same preset and those are the ones that it happens with.  I am loading them like this:

oGauge.LoadPreset(System.IO.Path.Combine(Request.PhysicalApplicationPath, "GaugePresets\\GlacierRadialRectangle.xml"), true);

Most of the time it seems to happen when it has been a while since the last click in the grid.  Not sure why the other 2 gauges seem to handle that case and this one does not.

One of my other gauges is loading the preset "GaugePresets\\GlacierLinearVerticalThreeBars.xml".  The other gauge is built all by code.

  • Post Points: 20
Replied On: Tue, Mar 24 2009 3:07 PM Reply

perhaps an exception is occurring in the async postback and you're not able to see it in the debugger.  do you see anything in the output window of visual studio when this happens with a debugger attached?

i'm not sure if this will help, but it's worth a try - in the Debug > Exceptions menu in Visual Studio, try setting it to break on all CLR exceptions (even handled ones):

 

  • Post Points: 20
jonnydock
Points 1,035
Replied On: Wed, Apr 1 2009 4:11 PM Reply

I tried turning on the thrown exceptions as you suggested, but it did not catch anything.  So, I am not sure who is throwing the error yet.  I will keep trying to figure out how to reproduce it.

  • Post Points: 5
jonnydock
Points 1,035
Replied On: Tue, Apr 14 2009 3:58 PM Reply

I just noticed that when the error happens the function ig_getWebControlById(oGauge.id) returns back as "undefined".  My variable oGauge is valid. Here are the other properties on oGauge if that helps.  Notice that "fileSize" is -1.

 

-        oGauge    {object}    DispHTMLImg
+        [Methods]       
+        [Events]       
        accessKey    ""    String
        align    ""    String
+        all    {Count = 0}    DispHTMLElementCollection
        alt    ""    String
+        attributes    {Count = 100}    DispHTMLAttributeCollection
+        behaviorUrns    {...}    IHTMLUrnCollection
        border    ""    String
        canHaveChildren    false    Boolean
        canHaveHTML    false    Boolean
+        childNodes    {Count = 0}    DispDOMChildrenCollection
+        children    {Count = 0}    DispHTMLElementCollection
        className    ""    String
        clientHeight    0    Long
        clientLeft    0    Long
        clientTop    0    Long
        clientWidth    0    Long
        complete    false    Boolean
        contentEditable    "inherit"    String
+        currentStyle    {...}    DispHTMLCurrentStyle
        dataFld    ""    String
        dataFormatAs    ""    String
        dataSrc    ""    String
        dir    ""    String
        disabled    false    Boolean
+        document    {object}    DispHTMLDocument
        dynsrc    ""    String
        fileCreatedDate    ""    String
        fileModifiedDate    ""    String
        fileSize    "-1"    String
        fileUpdatedDate    ""    String
+        filters    {...}    IHTMLFiltersCollection
        firstChild    null    IHTMLDOMNode
        height    0    Long
        hideFocus    false    Boolean
        href   

"http://localhost/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_vi3q5mmfgy0snq45qjgro145.png?t=128842120573364863"   

String
        hspace    0    Long
        id    "ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3"    String
        innerHTML    ""    String
        innerText    ""    String
        isContentEditable    false    Boolean
        isDisabled    false    Boolean
        isMap    false    Boolean
        isMultiLine    true    Boolean
        isTextEdit    false    Boolean
        lang    ""    String
        language    ""    String
        lastChild    null    IHTMLDOMNode
        longDesc    ""    String
        loop    1    Long
        lowsrc    ""    String
        mimeType    ""    String
        name    ""    String
        nameProp    "ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_vi3q5mmfgy0snq45qjgro145.png?t=128842120573364863"    String
+        nextSibling    { }    DispHTMLDOMTextNode
        nodeName    "IMG"    String
        nodeType    1    Long
        nodeValue    null    Variant
        offsetHeight    0    Long
        offsetLeft    0    Long
+        offsetParent    {object}    DispHTMLTableCell
        offsetTop    0    Long
        offsetWidth    0    Long
        outerHTML    "<IMG id=ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3 title="Variance = -27.370" style="BACKGROUND-COLOR:

transparent" alt="" onerror=imageError(this);

src="/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_vi3q5mmfgy0snq45qjgro145.png?t=128842120573364863">"   

String
        outerText    ""    String
+        ownerDocument    {object}    DispHTMLDocument
+        parentElement    {object}    DispHTMLTableCell
+        parentNode    {object}    DispHTMLTableCell
+        parentTextEdit    {object}    DispHTMLBody
        previousSibling    null    IHTMLDOMNode
        protocol    "HyperText Transfer Protocol"    String
        readyState    "uninitialized"    String
        recordNumber    null    Variant
+        runtimeStyle    {object}    DispHTMLStyle
        scopeName    "HTML"    String
        scrollHeight    0    Long
        scrollLeft    0    Long
        scrollTop    0    Long
        scrollWidth    0    Long
        sourceIndex    186    Long
        src   

"http://localhost/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_vi3q5mmfgy0snq45qjgro145.png?t=128842120573364863"   

String
        Start    "fileopen"    String
+        style    {object}    DispHTMLStyle
        tabIndex    0    Integer
        tagName    "IMG"    String
        tagUrn    ""    String
        title    "Variance = -27.370"    String
        uniqueID    "ms__id2"    String
        uniqueNumber    2    Long
        useMap    ""    String
        vrml    ""    String
        vspace    0    Long
        width    0    Long

  • Post Points: 20
Replied On: Wed, Apr 15 2009 4:42 PM Reply

interesting, but still hard to understand what's really going on.  does document.getElementById(oGauge.id) return undefined as well?

it might help to test this out using Firebug, the firefox extension.  it contains a tab for monitoring network activity on a given page, so you could use it to inspect what is coming back when a new gauge image is requested via an ajax request.

  • Post Points: 20
jonnydock
Points 1,035
Replied On: Thu, Apr 16 2009 9:36 AM Reply

Getting the element works.  Here are the element properties:

-        document.getElementById(oGauge.id)    {object}    DispHTMLImg
+        [Methods]       
+        [Events]       
        accessKey    ""    String
        align    ""    String
+        all    {Count = 0}    DispHTMLElementCollection
        alt    ""    String
+        attributes    {Count = 100}    DispHTMLAttributeCollection
+        behaviorUrns    {...}    IHTMLUrnCollection
        border    ""    String
        canHaveChildren    false    Boolean
        canHaveHTML    false    Boolean
+        childNodes    {Count = 0}    DispDOMChildrenCollection
+        children    {Count = 0}    DispHTMLElementCollection
        className    ""    String
        clientHeight    0    Long
        clientLeft    0    Long
        clientTop    0    Long
        clientWidth    0    Long
        complete    false    Boolean
        contentEditable    "inherit"    String
+        currentStyle    {...}    DispHTMLCurrentStyle
        dataFld    ""    String
        dataFormatAs    ""    String
        dataSrc    ""    String
        dir    ""    String
        disabled    false    Boolean
+        document    {object}    DispHTMLDocument
        dynsrc    ""    String
        fileCreatedDate    ""    String
        fileModifiedDate    ""    String
        fileSize    "-1"    String
        fileUpdatedDate    ""    String
+        filters    {...}    IHTMLFiltersCollection
        firstChild    null    IHTMLDOMNode
        height    0    Long
        hideFocus    false    Boolean
        href    "http://localhost/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_e2b4x1umsfc0saejealcch55.png?t=128843623079367695"    String
        hspace    0    Long
        id    "ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3"    String
        innerHTML    ""    String
        innerText    ""    String
        isContentEditable    false    Boolean
        isDisabled    false    Boolean
        isMap    false    Boolean
        isMultiLine    true    Boolean
        isTextEdit    false    Boolean
        lang    ""    String
        language    ""    String
        lastChild    null    IHTMLDOMNode
        longDesc    ""    String
        loop    1    Long
        lowsrc    ""    String
        mimeType    ""    String
        name    ""    String
        nameProp    "ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_e2b4x1umsfc0saejealcch55.png?t=128843623079367695"    String
+        nextSibling    { }    DispHTMLDOMTextNode
        nodeName    "IMG"    String
        nodeType    1    Long
        nodeValue    null    Variant
        offsetHeight    0    Long
        offsetLeft    0    Long
+        offsetParent    {object}    DispHTMLTableCell
        offsetTop    0    Long
        offsetWidth    0    Long
        outerHTML    "<IMG id=ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3 title="Variance = -27.370" style="BACKGROUND-COLOR: transparent" alt="" onerror=imageError(this); src="/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_e2b4x1umsfc0saejealcch55.png?t=128843623079367695">"    String
        outerText    ""    String
+        ownerDocument    {object}    DispHTMLDocument
+        parentElement    {object}    DispHTMLTableCell
+        parentNode    {object}    DispHTMLTableCell
+        parentTextEdit    {object}    DispHTMLBody
        previousSibling    null    IHTMLDOMNode
        protocol    "HyperText Transfer Protocol"    String
        readyState    "uninitialized"    String
        recordNumber    null    Variant
+        runtimeStyle    {object}    DispHTMLStyle
        scopeName    "HTML"    String
        scrollHeight    0    Long
        scrollLeft    0    Long
        scrollTop    0    Long
        scrollWidth    0    Long
        sourceIndex    186    Long
        src    "http://localhost/ProjectManagerBranch/GaugeImages/ProjectList1_wgb_ProjectList_wgb_Dashboard_UltraGauge3_e2b4x1umsfc0saejealcch55.png?t=128843623079367695"    String
        Start    "fileopen"    String
+        style    {object}    DispHTMLStyle
        tabIndex    0    Integer
        tagName    "IMG"    String
        tagUrn    ""    String
        title    "Variance = -27.370"    String
        uniqueID    "ms__id1"    String
        uniqueNumber    1    Long
        useMap    ""    String
        vrml    ""    String
        vspace    0    Long
        width    0    Long

  • Post Points: 5
jonnydock
Points 1,035
Replied On: Thu, Apr 16 2009 10:21 AM Reply

Not sure if I am looking in the correct place, but here is what Firebug has on the Net tab for the gauge when it errors.  This is on the Headers tab:

Response Headers
Connection
close
Content-Length
4040
Content-Type
text/html
Server
Microsoft-IIS/5.1
Date
Thu, 16 Apr 2009 14:11:53 GMT
Request Headers
Host
localhost
User-Agent
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR
3.5.30729)
Accept
image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language
en-us,en;q=0.5
Accept-Encoding
gzip,deflate
Accept-Charset
ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive
300
Connection
keep-alive
Referer
http://localhost/ProjectManagerBranch/GeoCuePDB.aspx
Cookie
ASP.NET_SessionId=nvskdp45y00yqq3rs0rvnk45; .ASPXAUTH=88AA2BA589EA1EAE36ADC67C94141E74A632EA1BBCC442
7D7317C5971342577BFBCCFAE052557C2909A9787474A49B7FCB79C90EA9A10B579BAEDFC793DC60E86B9085073857AF13A0
97CCF593B8A29B
  • Post Points: 5
Page 1 of 4 (49 items) 1 2 3 4 Next > | RSS