Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Nov 2010
    Posts
    89
    Vote Rating
    0
    atrubka is on a distinguished road

      0  

    Default Infinite loop in LiveGridView (gxt 2.2.5 / gwt 2.3)

    Infinite loop in LiveGridView (gxt 2.2.5 / gwt 2.3)


    Hi, guys.

    Every version of your library has an infinite loop in LiveGridView!!!
    I was told before to switch to the latest (at that point 2.2.4 or 2.2.5 version to get rid of it).
    I did that eventually. And guess what? There's LiveGridView infinite update loop again. What are your plans on fixing it?!
    Are you even supporting gxt 2.2.5?! We've paid money for this library and keep paying for its support!!!

    We're not moving to gxt 3, period. This is like porting our application to C#.

    If you want details, they are this. LiveGridView's StoreListener.storeDataChanged() method invokes loadLiveStore(), which in turn invokes storeDataChanged again after delay.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,713
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    Thanks for the report. Do you have a working testcase or more information on when this is happening?
    It does not seem to happen here: http://www.sencha.com/examples-2/#livegrid

    It might be good to open a real support ticket in your ticket system to schedule a remote desktop session.

  3. #3
    Ext GWT Premium Member
    Join Date
    Nov 2010
    Posts
    89
    Vote Rating
    0
    atrubka is on a distinguished road

      0  

    Default


    You don't have to look far for a test case with infinite loop. Look at my older post:
    http://www.sencha.com/forum/showthre...-a-small-cache

    I retested it with the new version and it still has the same infinite loop. It depends on the scroller position, but the test is done the way to start looping right away. Just do this to add the component from my first thread:

    Code:
    public class TestModule implements EntryPoint {
        public void onModuleLoad() {
            RootPanel rootPanel = RootPanel.get();
            Viewport viewport = new Viewport();
            viewport.setLayout(new FitLayout());
            viewport.add(new TestComponent());
            
            rootPanel.add(viewport);
        }
    }

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,713
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    I moved this thread to the bugs forum for further investigation.

    If this is a high priority issue for you, please open a real support ticket in your ticketsystem.

    EDIT:
    What happens if you increase your cachesize? If you cache less records than that are visible, it will have unforseen side effects.

  5. #5
    Ext GWT Premium Member
    Join Date
    Nov 2010
    Posts
    89
    Vote Rating
    0
    atrubka is on a distinguished road

      0  

    Default


    This example is created to illustrate the problem and to show you that LiveGridView is prone to infinite loop problem. In real application settings are different. Namely, cache size is set to 60 rows, but the problem is harder to reproduce as it happens during scrolling.

    Still it's a showstopper as we can't even demo our application to users.

    P. S. Support link doesn't work currently: https://support.sencha.com/

  6. #6
    Ext GWT Premium Member
    Join Date
    Nov 2010
    Posts
    89
    Vote Rating
    0
    atrubka is on a distinguished road

      0  

    Default


    I can create a LiveGridView copy in my project if workaround requires so, but at this moment I'm not sure how to fix it myself without breaking other LiveGridView features. So I need your assistance.

  7. #7
    Ext GWT Premium Member
    Join Date
    Nov 2010
    Posts
    89
    Vote Rating
    0
    atrubka is on a distinguished road

      0  

    Default


    Synchronized LiveGridView would be easy to fix.
    All I have to do is to ignore timer task altogether and just call doLoad in the same thread with an in-progress indicator thread.
    Asynchronous solution is beyond my expertise.

  8. #8
    Ext GWT Premium Member
    Join Date
    Nov 2007
    Posts
    13
    Vote Rating
    0
    randygo is on a distinguished road

      0  

    Default


    This sounds like an issue I just discovered today with 2.2.5. When we have a total count of items in the LiveGrid that is close to the cache size we have a problem if we scroll to the end of the grid and then click the column header to sort - it loops forever.

    I believe I have worked around the issue with the following code in our custom LiveGridView implementation. I looked at the 3.0.1 code and it looks like it may have the same issue if this is the problem.

    Hope this is helpful.

    Randy Gordon



    protected boolean shouldCache(int index) {
    int cz = getCacheSize();
    int i = (int) (cz * prefetchFactor);

    // RGG - Workaround for infinite loop when total count is less than or equal
    // to the cache size plus the prefetch factor.
    if (totalCount <= cz + i) return false;

    double low = liveStoreOffset + i;
    double high = liveStoreOffset + cz - getVisibleRowCount() - i;
    if ((index < low && liveStoreOffset > 0) || (index > high && liveStoreOffset != totalCount - cz)) {
    return true;
    }
    return false;
    }