1. #1
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default Problem with compiled GXT

    Problem with compiled GXT


    Hi all!

    I'm having a issue when I run my application as a compiled source.

    Sometimes if I open a ComboBox and then move mouse pointer over an item the following exception is throw:

    Code:
    Uncaught Exception:com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'itemSelector' of null
     stack: TypeError: Cannot read property 'itemSelector' of null
        at $getIndex (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:37148:58)
        at $onMouseOver_0 (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:44187:7)
        at Object.onComponentEvent_13 [as onComponentEvent] (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:44327:7)
        at $onBrowserEvent_0 (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:1273:15)
        at Object.onBrowserEvent_0 [as onBrowserEvent] (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:1617:3)
        at dispatchEvent_1 (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:68258:12)
        at HTMLDivElement.<anonymous> (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:68619:43)
        at entry0 (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:62623:27)
        at HTMLDivElement.<anonymous> (http://my.domain.com/project/272B96E9E3D12B0F7C6C98F8A3599D0E.cache.html:62608:14)
     type: non_object_property_load
     arguments: itemSelector,
    The javascript compiled code in line 37148 is:

    Code:
    ...
    
    _.castableTypeMap$ = {277:1, 356:1, 369:1, 377:1};
    function $getIndex(this$static){
      var el;
      if (this$static.index_0 == -1) { 
        if (this$static.event_0) {
          el = $getTarget_1(this$static, this$static.listView.itemSelector);     <-- LINE 37148
          !!el && (this$static.index_0 = $indexOf_3(this$static.listView, el.dom_0));
        }
      }
      return this$static.index_0;
    }
    
    function ListViewEvent_0(listView){
      this.component = listView;
      this.listView = listView;
    }
    
    function ListViewEvent_1(listView, event_0){
      this.event_0 = event_0;
      this.component = listView;
      this.event_0 = event_0;
      this.listView = listView;
      this.event_0 = event_0;
    }
    
    ...
    The corresponding code is in file ListViewEvent.java:

    Code:
    ...
    
      /**
       * Returns the index.
       * 
       * @return the index
       */
      public int getIndex() {
        if (index == -1) {
          if (event != null) {
            El el = getTarget(listView.getItemSelector(), 10);
            if (el != null) {
              index = listView.indexOf(el.dom);
            }
          }
        }
        return index;
      }
    
    ...
    I'm using Google Chrome 8.0.552.208 beta on MacOS X 10.6.5.

    If I refresh the page the error doesn't show-up again. I haven't tested on other browsers, but I will and let you know.

    Thanks!

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Have you tried to reproduce this in a small, standalone testcase implementing EntryPoint? Never saw the problem befor.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default


    Hi,

    I haven't. I'm trying to reproduce this error on other version of Chrome and on Safari. As soon I test I let you know.

    Thanks.

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Hello.

    I was talking about this problem in other threat and I just found it here.
    I have exactly the same problem.

    I find the next exception in my javascript code: "Cannot read property 'itemSelector' of null".
    I leave here my other post http://www.sencha.com/forum/showthre...-t-work-always

  5. #5
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default


    Hi, i couldn't have time to investigate this issue, but I'm still having...

    If I do some refresh the problem is solved temporarily, but as soon as I open the browser again it throws this exception.

    Only in chrome it happens.

    My solution was change my customers to safari, but unfortunately not all Sencha customer can do that...

    Hope to find a solution, I prefer to use chrome instead safari.

    Regards,

    Tercio

  6. #6

  7. #7
    Sencha User
    Join Date
    May 2010
    Posts
    3
    Vote Rating
    0
    5hao is on a distinguished road

      0  

    Default


    Hi,

    Unfortunately I can't post to the thread you linked above since I am not a Premium member.
    In the last post there xiss is saying that it seems the problem went away with the following combo "Chrome11, gwt2.3 and the latest gxt". Well, unfortunately it does not, I mean I encountered the problem again in both the following combos:

    1. Win7, Chrome 13.0.761.0 dev-m, GWT-2.3.0, GXT-2.2.3
    2. Ubuntu 11.07, Chrome 11.0.696.68, GWT-2.3.0, GXT-2.2.3

    The stacktrace hit me on an instance compiled with 'obfuscated'. I have recompiled with 'detailed' and went back to 'hunting' mode. This one is really elusive and I will post the stacktrace here.

    Couple of questions:
    1. How can we ( non premium members ) continue to 'fight' with the thing ( I mean, on what forum can we post ) ?
    2. I really don't understand who's fault is this, chrome, gwt, gxt, a certain combo of the above?
    3. How exactly can we go around it ( what combo of gwt-gxt should we use ).
    4. Do you think it's worth to try again with gwt-2.3.0 & gxt-2.2.4 ?

    Regards

  8. #8
    Sencha User
    Join Date
    Jul 2011
    Location
    Russia, St.Petersburg
    Posts
    3
    Vote Rating
    0
    gkislin is on a distinguished road

      0  

    Exclamation (TypeError): Cannot read property 'itemSelector' of null

    (TypeError): Cannot read property 'itemSelector' of null


    Hello.
    This problem sometimes meet in Chrome (special often in Mac OS) with ComboBox.
    It is not repeatible and treated as page refresh, but it is a headache for a lot of users and developers.
    I saw some topic about it:
    http://www.sencha.com/forum/showthread.php?122207-Combobox-doesn-t-work-always
    http://www.sencha.com/forum/showthread.php?118358-Strange-problem-I-can-t-quite-explain
    http://www.sencha.com/forum/showthread.php?116683-Problem-with-compiled-GXT&

    and enough detailed description and call stack (recovered from javascript stack):

    For GWT 2.5
    Component.onBrowserEvent(Event event): 884
    ListView.onComponentEvent(ComponentEvent ce): 375
    ListView.onMouseOver(ListViewEvent<M> ce): 733

    function $onMouseOver(this$static, ce) {
    var e;
    if ($getIndex(ce) != -1) {
    if (this$static.selectOnHover) {
    $select_2(this$static.sm, $getIndex(ce), false);
    }
    else {
    e = $getElement_1(this$static.all, $getIndex(ce));
    if (!!e && e != this$static.overElement) {
    $addStyleName_0(fly_0(e, 'component'), initValues(_3Ljava_lang_String_2_classLit, {217: 1,218: 1}, 1, ['x-view-item-over']));
    this$static.overElement = e;
    }
    }
    }
    }

    ListViewEvent.getIndex(): 57
    El el = getTarget(listView.getItemSelector(), 10);


    function $getIndex(this$static) {
    var el;
    if (this$static.index_0 == -1) {
    if (this$static.event_0) {
    el = $getTarget(this$static, this$static.listView.itemSelector);
    !!el && (this$static.index_0 = $indexOf_1(this$static.listView, el.dom_0));
    }
    }
    return this$static.index_0;
    }

    Here we has listView = null:
    • <exception>: TypeError
    • el: undefined
    • this: DOMWindow[0]
    • this$static: ListViewEvent_1
      • event_0: MouseEvent
      • type_0: EventType_1
      • __proto__: BoxComponentEvent
        • castableTypeMap$: Object
        • getClass$: function getClass_533(){
        • index_0: -1
        • listView: null
        • model: null
        • __proto__: ComponentEvent


    and respectively: (TypeError): Cannot read property 'itemSelector' of null

    Why (if the reason if hard to detect) at least do not check listView for null in ListViewEvent.getIndex()?

    I fond of GXT and kindly ask you to repare it

    Your sibserely,
    ExtGWT developer, Grigory

  9. #9
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default Solution to this problem

    Solution to this problem


    Hello.

    I tried this fix (http://www.sencha.com/forum/showthre...l=1#post634065) posted by sven and it worked perfectly. I've been testing it for several months and it didn't appear again.

    Greetings.

  10. #10
    Sencha User
    Join Date
    Jul 2011
    Location
    Russia, St.Petersburg
    Posts
    3
    Vote Rating
    0
    gkislin is on a distinguished road

      0  

    Default


    Thank you for solution!
    I patch my gxt-2.2.5.jar

Similar Threads

  1. Replies: 4
    Last Post: 24 Mar 2011, 12:32 PM
  2. BufferedGrid when compiled got StackOverflowError message
    By kishorekadiri in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 10 Jul 2009, 4:11 AM
  3. Compiled Templates not working as expected
    By pcbender in forum Ext 1.x: Bugs
    Replies: 5
    Last Post: 20 Oct 2006, 1:08 PM

Thread Participants: 6