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
7 Answers, 1 is accepted
please close this issue.
there were a bug at our side.
Whe have the similar issue with a RadListView and a ListViewLoadOnDemandCollection
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:002.android.support.v7.widget.RecyclerView$LayoutManager.addViewInt()RecyclerView.java:786903.android.support.v7.widget.RecyclerView$LayoutManager.addView()RecyclerView.java:783304.android.support.v7.widget.RecyclerView$LayoutManager.addView()RecyclerView.java:782105.android.support.v7.widget.LinearLayoutManager.layoutChunk()LinearLayoutManager.java:156506.android.support.v7.widget.LinearLayoutManager.fill()LinearLayoutManager.java:151107.android.support.v7.widget.LinearLayoutManager.onLayoutChildren()LinearLayoutManager.java:59508.android.support.v7.widget.RecyclerView.dispatchLayoutStep2()RecyclerView.java:360009.android.support.v7.widget.RecyclerView.onMeasure()RecyclerView.java:303610.com.telerik.widget.list.RadListView.onMeasure()RadListView.java:57211.md5be833f22e1afd23ec19f24c6215f2a12.RadExtendedListView.n_onMeasure(Native Method)12.md5be833f22e1afd23ec19f24c6215f2a12.RadExtendedListView.onMeasure()RadExtendedListView.java:4613.android.view.View.measure()View.java:2104614.android.view.ViewGroup.measureChildWithMargins()ViewGroup.java:646015.android.widget.FrameLayout.onMeasure()FrameLayout.java:18516.android.view.View.measure()View.java:2104617.mono.java.lang.RunnableImplementor.n_run(Native Method)18.mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:3019.android.os.Handler.handleCallback()Handler.java:75120.android.os.Handler.dispatchMessage()Handler.java:9521.android.os.Looper.loop()Looper.java:15422.android.app.ActivityThread.main()ActivityThread.java:669223.java.lang.reflect.Method.invoke(Native Method)24.com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:146825.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
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 + 2281 libobjc.A.dylib 0x00000001826d85ec objc_exception_throw + 522 CoreFoundation 0x000000018351ebf8 +[NSException raise:format:arguments:] + 1003 Foundation 0x0000000183f0efa0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 1084 UIKit 0x000000018d2467c4 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 24125 UIKit 0x000000018d22b454 -[UICollectionView _updateVisibleCellsNow:] + 40286 UIKit 0x000000018d224790 -[UICollectionView layoutSubviews] + 3407 UIKit 0x000000018d0f3770 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 14168 QuartzCore 0x000000018769525c -[CALayer layoutSublayers] + 1809 QuartzCore 0x00000001876993ec CA::Layer::layout_if_needed(CA::Transaction*) + 32010 QuartzCore 0x0000000187605aa0 CA::Context::commit_transaction(CA::Transaction*) + 31611 QuartzCore 0x000000018762d5d0 CA::Transaction::commit() + 57612 QuartzCore 0x000000018757e1a8 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 29213 IOKit 0x00000001837878a0 IODispatchCalloutFromCFMessage + 48814 CoreFoundation 0x00000001834acb20 __CFMachPortPerform + 18415 CoreFoundation 0x00000001834c7ae8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 5216 CoreFoundation 0x00000001834c7230 __CFRunLoopDoSource1 + 43617 CoreFoundation 0x00000001834c4c80 __CFRunLoopRun + 245218 CoreFoundation 0x00000001833e4da8 CFRunLoopRunSpecific + 54819 GraphicsServices 0x00000001853c7020 GSEventRunModal + 9620 UIKit 0x000000018d3c578c UIApplicationMain + 23221 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 + 24426 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 + 0We 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
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
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
