Announcement

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

    Unexpected error from readyToDraw (while it tries to log a warning)

    I have some code that calls the draw method on a widget whose DrawnState is complete.
    Hence I'd expect a warning message to be logged. Instead debug.js issues a call to JSOHelper.getClassName(JavaScriptObject javaScriptObject) passing no params.
    This lead to an error complaining "Cannot read property 'getClassName' of undefined"


    Reproduced on Chrome 37.0.2062.120 with SmartGWT 4.1p_2014-09-20 (SmartClient Version: v9.1p_2014-09-20/LGPL Development Only (built 2014-09-20))
    Follows an excerpt from the call stack
    getClassName (JSOHelper.java:54)
    isc.addProperties._getLastErrorCallSitesParsedStack (debug.js:214)
    isc.addProperties.getStackTrace (debug.js:177)
    isc.Canvas.addMethods.readyToDraw (Canvas.js:3618)
    isc.Canvas.addMethods.draw (Canvas.js:3803)
    $draw (BaseWidget.java:258)
    onDraw_0 (MyWidget.java:146)
    $dispatch_39 (DrawEvent.java:70)
    dispatch_40 (DrawEvent.java:69)
    dispatch_0 (GwtEvent.java:76)
    dispatchEvent_1 (EventBus.java:40)
    $doFire (SimpleEventBus.java:193)
    $fireEvent_1 (SimpleEventBus.java:88)
    $fireEvent_0 (HandlerManager.java:127)
    $fireEvent (Widget.java:129)
    rendered (BaseWidget.java:314)
    self_0.onDraw (BaseWidget.java:207)
    isc.Canvas.addMethods.draw (Canvas.js:4059)
    isc.Layout.addMethods.layoutChildren (Layout.js:2034)
    isc.Layout.addMethods.drawChildren (Layout.js:1003)
    isc.Canvas.addMethods.draw (Canvas.js:3947)
    isc.Layout.addMethods.layoutChildren (Layout.js:2073)
    isc.Layout.addMethods.drawChildren (Layout.js:1003)
    isc.Canvas.addMethods.draw (Canvas.js:3947)
    isc.Layout.addMethods.layoutChildren (Layout.js:2073)
    isc.Layout.addMethods.drawChildren (Layout.js:1003)
    isc.Canvas.addMethods.draw (Canvas.js:3947)
    isc.Layout.addMethods.layoutChildren (Layout.js:2034)
    isc.Layout.addMethods.drawChildren (Layout.js:1003)
    isc.Canvas.addMethods.draw (Canvas.js:3947)
    isc.Layout.addMethods.layoutChildren (Layout.js:2034)
    isc.Layout.addMethods.reflowNow (Layout.js:2309)
    (anonymous function) (Layout.js:2292)
    isc.EventHandler.addClassMethods.runTeas (EventHandler.js:6159)
    isc.EventHandler.addClassMethods._clearThread (EventHandler.js:6127)
    isc.EventHandler.addClassMethods.dispatch (EventHandler.js:6216)
    (anonymous function) (VM3138:3)

    #2
    If you try to draw() an already-drawn Canvas we log a warning with a stack trace to help you troubleshoot how you ended up doing this.

    What you seem to be showing is that in the midst of gathering this stack trace there's some kind of problem with the JSOHelper class, but this is pretty strange on it's own, and your stack also has a bunch of other irregularities like misnamed methods.

    Can you explain how you obtained this stack and what mode you are in - SuperDevMode? Compiled mode with -PRETTY? Something else?

    Comment


      #3
      Actually I did a full compile using the -style PRETTY -draftCompile switches, then ran the SuperDevMode and obtained the stacktrace.
      Since I previously switched to a newer smartgwt version and cleared the browser cache BUT I didn't remember if I had removed the gwt-unitCache folder, now I removed it and relaunched the entire compilation and superdevmode, obtaining almost the same stacktrace. Later I've reproduced the issue even with superdevmode disabled, obtaining the following stacktrace
      getClassName (project.manage-0.js:6178)
      isc.addProperties._getLastErrorCallSitesParsedStack (debug.js:214)
      isc.addProperties.getStackTrace (debug.js:177)
      isc.Canvas.addMethods.readyToDraw (Canvas.js:3618)
      isc.Canvas.addMethods.draw (Canvas.js:3803)
      $draw (project.manage-0.js:106)
      onDraw_0 (project.manage-0.js:2925)
      $dispatch_39 (project.manage-0.js:6749)
      dispatch_40 (project.manage-0.js:6752)
      dispatch_0 (project.manage-0.js:380)
      dispatchEvent_1 (project.manage-0.js:4216)
      $doFire (project.manage-0.js:4233)
      $fireEvent_1 (project.manage-0.js:4239)
      $fireEvent_0 (project.manage-0.js:4223)
      $fireEvent (project.manage-0.js:87)
      rendered (project.manage-0.js:148)
      self_0.onDraw (project.manage-0.js:148)
      isc.Canvas.addMethods.draw (Canvas.js:4059)
      isc.Layout.addMethods.layoutChildren (Layout.js:2034)
      isc.Layout.addMethods.drawChildren (Layout.js:1003)
      isc.Canvas.addMethods.draw (Canvas.js:3947)
      isc.Layout.addMethods.layoutChildren (Layout.js:2073)
      isc.Layout.addMethods.drawChildren (Layout.js:1003)
      isc.Canvas.addMethods.draw (Canvas.js:3947)
      isc.Layout.addMethods.layoutChildren (Layout.js:2073)
      isc.Layout.addMethods.drawChildren (Layout.js:1003)
      isc.Canvas.addMethods.draw (Canvas.js:3947)
      isc.Layout.addMethods.layoutChildren (Layout.js:2034)
      isc.Layout.addMethods.drawChildren (Layout.js:1003)
      isc.Canvas.addMethods.draw (Canvas.js:3947)
      isc.Layout.addMethods.layoutChildren (Layout.js:2034)
      isc.Layout.addMethods.reflowNow (Layout.js:2309)
      (anonymous function) (Layout.js:2292)
      isc.EventHandler.addClassMethods.runTeas (EventHandler.js:6159)
      isc.EventHandler.addClassMethods._clearThread (EventHandler.js:6127)
      isc.EventHandler.addClassMethods.dispatch (EventHandler.js:6216)
      (anonymous function) (VM4295:3)
      Do you think there is still something strange in my deployment or it could be some sort of bug only reproducible when using the debug features?

      Originally posted by Isomorphic View Post
      If you try to draw() an already-drawn Canvas we log a warning with a stack trace to help you troubleshoot how you ended up doing this.

      What you seem to be showing is that in the midst of gathering this stack trace there's some kind of problem with the JSOHelper class, but this is pretty strange on it's own, and your stack also has a bunch of other irregularities like misnamed methods.

      Can you explain how you obtained this stack and what mode you are in - SuperDevMode? Compiled mode with -PRETTY? Something else?

      Comment


        #4
        We've made a change which should mean that with -PRETTY mode, where JSOHelper might actually end up with a JavaScript method called "getClassName", we won't call this method. This should prevent the specific crash you're seeing, even though we still can't explain how a JSOHelper method would be in this particular call stack.

        After trying out tomorrow's nightly builds, please let us know if you see better diagnostics, and what they look like. The fact that you have ".addMethods." in your stack frames is still unexplained.

        Comment

        Working...
        X