Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    drawImage fails wilth self.drawPane msg

    Hello,
    1. I am using SmartClient Version: v9.1p_2014-07-20/Pro Deployment (built 2014-07-20)

    2. This issue is predominantly seen on FF 31.0. But our QA team is also intermittently seeing it on latest chrome and IE11

    3. Following is the full-stack trace -

    14:29:20.658:XRP5[E]:WARN:Log:Error: http://<IP-ADDRESS>/thirdparty/smartclient/9.1_20_7/system/modules-debug/ISC_Drawing.js

    Value: TypeError: self.drawPane is undefined

    14:29:20.692:XRP5[E]:INFO:draws:isc_IButton_0:draw(): drawing IButton with parent: [Toolbar ID:isc_globalWarn_toolbar]

    Canvas.draw(showing=>undef, undef, undef)

    StatefulCanvas.draw(a=>undef, b=>undef, c=>undef)

    Layout.layoutChildren(reason=>undef, deltaX=>undef, deltaY=>undef)

    [a]Dialog.showMessage(newMessage=>"Page Error:http://<IP-ADDRESS>/thirdpa..."[137], properties=>Obj{title:Warning})

    anonymous(message=>"Page Error:http://138.120.140.41/thirdpa..."[137], messageType=>"warn", callback=>undef, properties=>Obj{title:Warning})

    anonymous(message=>"Page Error:http://138.120.140.41/thirdpa..."[137], callback=>undef, properties=>undef)

    [c]alu_nms_NMSCommon.notifyUser(aInMessage_s=>"Page Error:http://<IP-ADDRESSS>/thirdpa..."[137])

    anonymous(aInValue=>"TypeError: self.drawPane is undefined", aInMessage=>"http://<IP-ADDRESS>/thirdparty/smartcl..."[89], 8824, 20, TypeError: self.drawPane is undefined)

    4. Here is the sample code -

    isc.DrawImage.create({
    src: "[SKINIMG]/nms/web/vision/AllGroups.png",
    left: left+ 2,
    top: 4,
    width: 16,
    height: 16,
    autoDraw: true,
    drawPane: aInDrawPane
    });

    where aInDrawPane is drawPane (which is not null or undefined).

    But in ISC_Drawing.js - initImage(src) - ISC_Drawing.jsTypeError: self.drawPane is undefined


    Do you have any thoughts on what we could be doing wrong. Would greatly appreciate any help.

    Thanks

    #2
    This would be expected if the variable "aInDrawPane" did not contain a valid DrawPane for the DrawImage to draw in, for example, if the variable were actually null, was not actually a DrawPane, was a DrawPane that had been destroy()d, or if the DrawPane were not yet drawn.

    If you think this might be a framework bug and not just a bug in your application, try to put together a standalone test case that we can run to see the problem.

    Comment


      #3
      Originally posted by Isomorphic View Post
      This would be expected if the variable "aInDrawPane" did not contain a valid DrawPane for the DrawImage to draw in, for example, if the variable were actually null, was not actually a DrawPane, was a DrawPane that had been destroy()d, or if the DrawPane were not yet drawn.
      After considering above statement of yours I put the following checks
      Code:
      !((typeof aInDrawPane === "undefined") || aInDrawPane === null) && 
                  !aInDrawPane.destroyed && aInDrawPane.isDrawn() && 
                  isc.isA.DrawPane(aInDrawPane)
      I am still stuck with same result. Any thoughts?

      Meanwhile, I am working on producing a standalone test case.

      Thanks

      Comment


        #4
        No, sorry, no additional thoughts. We've already verified there's no general problem with just adding a DrawImage to a DrawPane, so we look forward to a test case that shows what's special about your usage.

        Comment


          #5
          Still struggling...

          I am still struggling with this issue. If you please have a look at the following log -

          Code:
          11:12:13.041:XRP1:INFO:Log:Destroying drawItems for DrawPane alu_nms_SvcSupSummaryPane_IES_group_998
          11:12:13.046:XRP1:INFO:Log:Destroying drawItems for DrawPane alu_nms_SvcSupSummaryPane_All_Groups
          11:12:13.060:XRP1[E]:INFO:draws:alu_nms_SvcSupSummaryPane_All_Groups:draw(): drawing DrawPane with parent: [VLayout ID:isc_VLayout_4]
              Canvas.draw(showing=>undef)
              Layout.layoutChildren(reason=>"membersRemoved", deltaX=>undef, deltaY=>undef)
              Layout.reflowNow(reason=>"membersRemoved", reflowCount=>22)
              anonymous()
              [c]EventHandler.runTeas()
              [c]EventHandler._clearThread()
              [c]Comm._fireXMLCallback(request=>[object XMLHttpRequest], callback=>"isc.Comm.performXmlTransactionReply(232,..."[56], delayedCall=>undef)
              anonymous([object Event])
          
          11:12:13.064:XRP1[E]:INFO:draws:alu_nms_SvcSupSummaryPane_IES_group_998:draw(): drawing DrawPane with parent: [VLayout ID:isc_VLayout_4]
              Canvas.draw(showing=>undef)
              Layout.layoutChildren(reason=>"membersRemoved", deltaX=>undef, deltaY=>undef)
              Layout.reflowNow(reason=>"membersRemoved", reflowCount=>22)
              anonymous()
              [c]EventHandler.runTeas()
              [c]EventHandler._clearThread()
              [c]Comm._fireXMLCallback(request=>[object XMLHttpRequest], callback=>"isc.Comm.performXmlTransactionReply(232,..."[56], delayedCall=>undef)
              anonymous([object Event])
          The above log indicate successful creation of the drawPanes, but -
          Code:
          11:12:13.396:XRP8:INFO:Log:Destroying drawItems for DrawPane alu_nms_SvcSupSummaryPane_IES_group_998
          11:12:13.402:XRP8:INFO:Log:Destroying drawItems for DrawPane alu_nms_SvcSupSummaryPane_All_Groups
          11:12:13.417:XRP8[E]:INFO:draws:alu_nms_SvcSupSummaryPane_All_Groups:draw(): drawing DrawPane with parent: [VLayout ID:isc_VLayout_4]
              Canvas.draw(showing=>undef)
              Layout.layoutChildren(reason=>"membersRemoved", deltaX=>undef, deltaY=>undef)
              Layout.reflowNow(reason=>"membersRemoved", reflowCount=>23)
              anonymous()
              [c]EventHandler.runTeas()
              [c]EventHandler._clearThread()
              [c]Comm._fireXMLCallback(request=>[object XMLHttpRequest], callback=>"isc.Comm.performXmlTransactionReply(242,..."[56], delayedCall=>undef)
              anonymous([object Event])
          
          11:12:13.422:XRP8[E]:INFO:draws:alu_nms_SvcSupSummaryPane_IES_group_998:draw(): drawing DrawPane with parent: [VLayout ID:isc_VLayout_4]
              Canvas.draw(showing=>undef)
              Layout.layoutChildren(reason=>"membersRemoved", deltaX=>undef, deltaY=>undef)
              Layout.reflowNow(reason=>"membersRemoved", reflowCount=>23)
              anonymous()
              [c]EventHandler.runTeas()
              [c]EventHandler._clearThread()
              [c]Comm._fireXMLCallback(request=>[object XMLHttpRequest], callback=>"isc.Comm.performXmlTransactionReply(242,..."[56], delayedCall=>undef)
              anonymous([object Event])
          
          11:12:15.511:WARN:Log:Error: http://shresth/thirdparty/smartclient/9.1_19_9/system/modules-debug/ISC_Drawing.js
          Value: TypeError: self.drawPane is undefined
          the above log clearly shows that the trying to create the same drawPane is throwing the issue. This happens when the initImage function of ISC_Drawing calls the callback function - "image.onload".
          To me it looks like a timing issue where the onload function has the wrong reference to the (destroyed) drawPane. This was achieved when there were many draw()s and destroy()s in quick succession.

          Help much appreciated

          Thanks
          Last edited by shresthg_des; 7th Oct 2014, 09:34.

          Comment


            #6
            This still doesn't provide anything that suggests a framework bug, but there's a few comment we can make that might help you narrow things down and provide better diagnostics:

            1. thread markers appear in log messages after the timestamp. "XRP#" means an xmlHttpRequest response reply thread. If the trailing number differs, it's a different thread. The "[E]" suffix means "end of thread actions" and is from the same thread, but after all event handling code has exited

            2. you should be getting more information that just "TypeError", in fact, you should be getting a full stack trace. You may get better information if you reproduce the error in a different browser, or if you use built-in Developer Tools (hit F12) to stop on all errors

            Comment

            Working...
            X