Error on fast re-layout

8 posts, 0 answers
  1. Elad
    Elad avatar
    14 posts
    Member since:
    Jun 2012

    Posted 02 Mar 2016 Link to this post

    Hi,

    I have a listview with filters, filter click is changing the listview items. (similar to ebay app)
    if the user filter and wait until layout is completing there is no problem.

    when the user filter twice fast (without waiting for the previous filter to apply) this exception is thrown:

    Java.Lang.IllegalStateException has been thrown
    Added View has RecyclerView as parent but view is not a real child. Unfiltered index:0

    this came from RadListView.java:538 at com.telerik.widget.list.RadListView.onLayout(RadListView.java:538)

    I'm using forms, but this is occur only in android (ios is working)

    any chance to fix this in the next release?

    Thank You

     

  2. Elad
    Elad avatar
    14 posts
    Member since:
    Jun 2012

    Posted 02 Mar 2016 in reply to Elad Link to this post

    please close this issue.

    there were a bug at our side.

     

  3. Manuel
    Manuel avatar
    1 posts
    Member since:
    Sep 2015

    Posted 26 Mar 2018 in reply to Elad Link to this post

    What was the bug?
    Whe have the similar issue with a RadListView and a ListViewLoadOnDemandCollection
  4. Marek
    Marek avatar
    10 posts
    Member since:
    Nov 2017

    Posted 04 Jun 2018 Link to this post

    I'm experiencing very similar issue on Android and iOS. From time to time the app just crashes on native part.

     

    Here is the Android stack:

    01.java.lang.IllegalStateException: Added View has RecyclerView as parent but view is not a real child. Unfiltered index:0
    02.android.support.v7.widget.RecyclerView$LayoutManager.addViewInt()RecyclerView.java:7869
    03.android.support.v7.widget.RecyclerView$LayoutManager.addView()RecyclerView.java:7833
    04.android.support.v7.widget.RecyclerView$LayoutManager.addView()RecyclerView.java:7821
    05.android.support.v7.widget.LinearLayoutManager.layoutChunk()LinearLayoutManager.java:1565
    06.android.support.v7.widget.LinearLayoutManager.fill()LinearLayoutManager.java:1511
    07.android.support.v7.widget.LinearLayoutManager.onLayoutChildren()LinearLayoutManager.java:595
    08.android.support.v7.widget.RecyclerView.dispatchLayoutStep2()RecyclerView.java:3600
    09.android.support.v7.widget.RecyclerView.onMeasure()RecyclerView.java:3036
    10.com.telerik.widget.list.RadListView.onMeasure()RadListView.java:572
    11.md5be833f22e1afd23ec19f24c6215f2a12.RadExtendedListView.n_onMeasure(Native Method)
    12.md5be833f22e1afd23ec19f24c6215f2a12.RadExtendedListView.onMeasure()RadExtendedListView.java:46
    13.android.view.View.measure()View.java:21046
    14.android.view.ViewGroup.measureChildWithMargins()ViewGroup.java:6460
    15.android.widget.FrameLayout.onMeasure()FrameLayout.java:185
    16.android.view.View.measure()View.java:21046
    17.mono.java.lang.RunnableImplementor.n_run(Native Method)
    18.mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
    19.android.os.Handler.handleCallback()Handler.java:751
    20.android.os.Handler.dispatchMessage()Handler.java:95
    21.android.os.Looper.loop()Looper.java:154
    22.android.app.ActivityThread.main()ActivityThread.java:6692
    23.java.lang.reflect.Method.invoke(Native Method)
    24.com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1468
    25.com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1358

     

    and here is:

     

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the collection view's data source did not return a valid cell from -collectionView:cellForItemAtIndexPath: for index path <NSIndexPath: 0xc000000000c00016> {length = 2, path = 0 - 6}'

     

    Crashes are much more likely to happen on iOS

  5. Marek
    Marek avatar
    10 posts
    Member since:
    Nov 2017

    Posted 05 Jun 2018 in reply to Marek Link to this post

    I managed to get some more detailed info for iOS:

     

    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the collection view's data source did not return a valid cell from -collectionView:cellForItemAtIndexPath: for index path <NSIndexPath: 0xc000000001000016> {length = 2, path = 0 - 8}'
     
    Last Exception Backtrace:
    0   CoreFoundation                       0x000000018351ed8c __exceptionPreprocess + 228
    1   libobjc.A.dylib                      0x00000001826d85ec objc_exception_throw + 52
    2   CoreFoundation                       0x000000018351ebf8 +[NSException raise:format:arguments:] + 100
    3   Foundation                           0x0000000183f0efa0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 108
    4   UIKit                                0x000000018d2467c4 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 2412
    5   UIKit                                0x000000018d22b454 -[UICollectionView _updateVisibleCellsNow:] + 4028
    6   UIKit                                0x000000018d224790 -[UICollectionView layoutSubviews] + 340
    7   UIKit                                0x000000018d0f3770 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1416
    8   QuartzCore                           0x000000018769525c -[CALayer layoutSublayers] + 180
    9   QuartzCore                           0x00000001876993ec CA::Layer::layout_if_needed(CA::Transaction*) + 320
    10  QuartzCore                           0x0000000187605aa0 CA::Context::commit_transaction(CA::Transaction*) + 316
    11  QuartzCore                           0x000000018762d5d0 CA::Transaction::commit() + 576
    12  QuartzCore                           0x000000018757e1a8 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 292
    13  IOKit                                0x00000001837878a0 IODispatchCalloutFromCFMessage + 488
    14  CoreFoundation                       0x00000001834acb20 __CFMachPortPerform + 184
    15  CoreFoundation                       0x00000001834c7ae8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    16  CoreFoundation                       0x00000001834c7230 __CFRunLoopDoSource1 + 436
    17  CoreFoundation                       0x00000001834c4c80 __CFRunLoopRun + 2452
    18  CoreFoundation                       0x00000001833e4da8 CFRunLoopRunSpecific + 548
    19  GraphicsServices                     0x00000001853c7020 GSEventRunModal + 96
    20  UIKit                                0x000000018d3c578c UIApplicationMain + 232
    21  MyApp.iOS                            0x0000000102f99950 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (<unknown>:1)
    22  MyApp.iOS                            0x0000000102ee993c UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:79)
    23  MyApp.iOS                            0x0000000102ee98fc UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
    24  MyApp.iOS                            0x0000000102417044 MyMd_Mobile_iOS_Application_Main_string__ (Main.cs:12)
    25  MyApp.iOS                            0x00000001026cfae8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
    26  MyApp.iOS                            0x00000001049f4228 mono_jit_runtime_invoke (mini-runtime.c:2776)
    27  MyApp.iOS                            0x0000000104a71210 do_runtime_invoke (object.c:2849)
    28  MyApp.iOS                            0x0000000104a74614 do_exec_main_checked (object.c:3002)
    29  MyApp.iOS                            0x00000001049d704c mono_jit_exec (driver.g.c:1040)
    30  MyApp.iOS                            0x0000000104b312a8 xamarin_main (monotouch-main.m:483)
    31  MyApp.iOS                            0x00000001024169b8 main (main.m:183)
    32  libdyld.dylib                        0x0000000182e75fc0 start + 0
  6. Yana
    Admin
    Yana avatar
    4890 posts

    Posted 06 Jun 2018 Link to this post

    Hi Marek,

    We are not aware of such an issue with RadListView, that's why I'd ask you to provide more details on the exact setup you have.  If you could send us the definition of the ListView as well as steps to reproduce the exception, that would be of great help.

    I'm looking forward to your reply.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Dinesh
    Dinesh avatar
    1 posts
    Member since:
    Mar 2018

    Posted 27 Sep 2018 Link to this post

    Is this resolved beacause i am also getting same error

     

    Java.Lang.IllegalStateException: Added View has RecyclerView as parent but view is not a real child. Unfiltered index:3

  8. Didi
    Admin
    Didi avatar
    230 posts

    Posted 01 Oct 2018 Link to this post

    Hi Dinesh,

    I would like to ask you to provide details on the exact setup you have. Could you please send us the definition of the RadListView and the steps to reproduce the exception. In this case we could research it further.

    Looking forward to your reply.

    Regards,
    Didi
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top