You found a bug! We've classified it as EXTGWT-3145 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    90
    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,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


    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
    Sencha User
    Join Date
    Nov 2010
    Posts
    90
    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,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


    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
    Sencha User
    Join Date
    Nov 2010
    Posts
    90
    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
    Sencha User
    Join Date
    Nov 2010
    Posts
    90
    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
    Sencha User
    Join Date
    Nov 2010
    Posts
    90
    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;
    }

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

      0  

    Default


    I had the same problem with GXT 3.0.1 and found a scenario to reproduce it consistently.

    Pre-requisite:
    • Configure the grid with filter(s) or enable remote sorting in the loader
    • Enable load mask (this is simply to detect when the problem will start occurring)
    To reproduce it, scroll in the grid until we trigger the load mask. At this point, all the states of the LiveGridView are at the point where a loadLiveStore method is being invoked to present the next set of entries in the grid. Then, either click on a header column to trigger a sort or trigger a filter on one of the header where it has been configured. This should trigger infinite invocation of the doLoad through delayed task in the loadLiveStore.

    The problem are about the following:
    • updateRows method
    • isLoading member
    • onDataChange handler of the cacheStore
    When the onDataChange handler is triggered from a doLoad originating from a header event (sort-filter), the updateRows is invoked with the reload parameter set to true. All the conditions are enabled in the updateRows to trigger another loadLiveStore which will set the isLoading member to true after preparing a delayed task that will invoke the doLoad. However on return, the isLoading flag is reset to false which will cause looping when next delayed task will be invoked since we should expect invocation of the onDataChange again once server result is back.

    My workaround consists in the following (I may miss other scenarios where the workaround may not work):
    • Add one parameter to updateRows such as:
    protected void updateRows(int newIndex, boolean reload, boolean skipPreCaching)
    • Create another version of the updateRows method using the previous signature and the following implementation to support existing methods using it:
    protected void updateRows(int newIndex, boolean reload) {

    updateRows(newIndex, reload, false);
    }

    • Update the new updateRows as the following. Trigger the pre caching only if skipPreCaching is set to true. Note that the previous signature set this to false leaving the behavior unchanged for previous invocation:
    // do pre caching
    if (shouldCache(viewIndex) && !isLoading && !skipPreCaching) {
    loadLiveStore(getLiveStoreCalculatedIndex(viewIndex));
    }

    • In the onDataChange handler, change to the following:
    ignoreScroll = false;
    updateRows(viewIndex, true, true);
    isLoading = false;

    That should do it.

    Christian

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi