unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.87k stars 716 forks source link

androidx.recyclerview.widget.RecyclerView$Recycler.recycleViewHolderInternal RecyclerView.java, line 6439 #10265

Closed NerijusN closed 1 year ago

NerijusN commented 1 year ago

Current behavior

Found in user logs

image

ava.lang.IllegalArgumentException: Tmp detached view should be removed from RecyclerView before it can be recycled: UnoViewHolder{b369866 position=2 id=-1, oldPos=-1, pLpos:-1 tmpDetached no parent} crc64a5a37c43dff01024.NativeListViewBase{93e8120 VFED.V... ........ 0,0-1080,1692}, adapter:crc64a5a37c43dff01024.NativeListViewBaseAdapter@3a8f37f, layout:Windows.UI.Xaml.Controls.ItemsStackPanelLayout, context:TradeZeroApp.MainActivity
androidx.recyclerview.widget.RecyclerView$Recycler.recycleViewHolderInternal RecyclerView.java:6439
androidx.recyclerview.widget.RecyclerView.removeAnimatingView RecyclerView.java:1456
androidx.recyclerview.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished RecyclerView.java:12699
androidx.recyclerview.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished RecyclerView.java:13199
androidx.recyclerview.widget.SimpleItemAnimator.dispatchAddFinished SimpleItemAnimator.java:302
androidx.recyclerview.widget.DefaultItemAnimator$5.onAnimationEnd DefaultItemAnimator.java:247
android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd ViewPropertyAnimator.java:1122
android.animation.Animator$AnimatorListener.onAnimationEnd Animator.java:552
android.animation.ValueAnimator.endAnimation ValueAnimator.java:1209
android.animation.ValueAnimator.doAnimationFrame ValueAnimator.java:1449
android.animation.AnimationHandler.doAnimationFrame AnimationHandler.java:146
android.animation.AnimationHandler.-wrap2
android.animation.AnimationHandler$1.doFrame AnimationHandler.java:54
android.view.Choreographer$CallbackRecord.run Choreographer.java:909
android.view.Choreographer.doCallbacks Choreographer.java:723
android.view.Choreographer.doFrame Choreographer.java:655
android.view.Choreographer$FrameDisplayEventReceiver.run Choreographer.java:897
android.os.Handler.handleCallback Handler.java:789
android.os.Handler.dispatchMessage Handler.java:98
android.os.Looper.loop Looper.java:164
android.app.ActivityThread.main ActivityThread.java:6944
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.Zygote$MethodAndArgsCaller.run Zygote.java:327
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1374

Expected behavior

prefer not t have 15 user crashes

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

No response

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

  <ItemGroup>
    <PackageReference Include="Analytics" Version="3.8.0" />
    <PackageReference Include="BiometryService" Version="0.2.0-feature.uno-ui-4.84" />
    <PackageReference Include="Chinook.BackButtonManager" Version="0.3.0-dev.22" />
    <PackageReference Include="Chinook.BackButtonManager.Uno" Version="0.3.0-dev.22" />
    <PackageReference Include="Chinook.DynamicMvvm" Version="0.8.0-dev.80" />
    <PackageReference Include="Chinook.DynamicMvvm.Uno" Version="0.8.0-dev.80" />
    <PackageReference Include="Chinook.DynamicMvvm.Reactive" Version="0.8.0-dev.80" />
    <PackageReference Include="Chinook.DynamicMvvm.FluentValidation" Version="0.8.0-dev.80" />
    <PackageReference Include="Chinook.SectionsNavigation.Uno" Version="0.5.0-feature.uno-ui-4.77" />
    <PackageReference Include="Chinook.SectionsNavigation.Reactive" Version="0.5.0-feature.uno-ui-4.77" />
    <PackageReference Include="Chinook.DataLoader.Uno" Version="0.4.0-feature.uno-ui-4.70" />
    <PackageReference Include="Chinook.DataLoader.DynamicMvvm" Version="0.4.0-feature.uno-ui-4.70" />
    <PackageReference Include="DynamicData" Version="7.1.1" />
    <PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="8.6.2" />
    <PackageReference Include="GeneratedSerializers.Json" Version="0.2.0-dev.10" />
    <PackageReference Include="MallardMessageHandlers" Version="0.2.0-dev.16" />
    <PackageReference Include="MessageDialogService.Uno" Version="0.3.0-feature.uno-ui-4.9" />
    <PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.3.0" />
    <PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.3.0" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.0" />
    <PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
    <PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="3.1.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.2" />
    <PackageReference Include="Nventive.AsyncWebView.Uno" Version="0.2.0-feature.uno-ui-4.15" />
    <PackageReference Include="Nventive.ExtendedSplashScreen.Uno" Version="0.2.0-dev.24" />
    <PackageReference Include="nventive.Nimue.Application.Building.Light" Version="0.1.0-alpha.73">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="nventive.Nimue.Application.Packaging" Version="0.1.0-alpha.73">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="nventive.Nimue.Application.Versioning" Version="0.1.0-alpha.73">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Nventive.Persistence.Reactive" Version="0.2.0-dev.14" />
    <PackageReference Include="Nventive.Persistence.Uno" Version="0.2.0-dev.14" />
    <PackageReference Include="Nventive.View.Uno" Version="0.2.0-feature.uno-ui-4.19" />
    <PackageReference Include="Reactive.Annex.Uno" Version="0.3.0-feature.uno-ui-4.24" />
    <PackageReference Include="Refit" Version="6.1.15" />
    <PackageReference Include="Refit.Newtonsoft.Json" Version="6.1.15" />
    <PackageReference Include="Scrutor" Version="4.1.0" />
    <PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
    <PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
    <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
    <PackageReference Include="Uno.CodeGen" Version="2.0.0-dev.10" />
    <PackageReference Include="Uno.Injectable" Version="2.0.0-dev.10" />
    <PackageReference Include="Uno.Material" Version="1.4.0-dev.34" />
    <PackageReference Include="Uno.SourceGenerationTasks" Version="4.1.0" />
    <PackageReference Include="Uno.Toolkit.UI" Version="1.3.0-dev.11" />
    <PackageReference Include="Uno.Toolkit.UI.Material" Version="1.3.0-dev.11" />
    <PackageReference Include="Uno.UI" Version="4.4.24" />
    <PackageReference Include="Xamarin.Essentials.Interfaces" Version="1.7.3.1" />
  </ItemGroup>

Affected platforms

Android

IDE

Visual Studio 2022

IDE version

17.3.5

Relevant plugins

No response

Anything else we need to know?

No response

NerijusN commented 1 year ago

Crash repots may help report-2517355813553379999-71dad72a-f576-478a-8274-6eae18c17ccc.txt report-2517360186103099999-63d43d7b-34c3-4f86-be71-f57da1b1c878.txt report-2517359887990239999-3e81950d-4575-4146-8490-48e5ee35ea83.txt report-2517359299724379999-7cc39c0d-069b-4041-8390-8b23716819ac.txt report-2517356728883509999-98e60986-1b68-464e-8a9f-df9616b9e011.txt report-2517361144747489999-337f5955-df65-4c23-82a7-0b1986c8bb2e.txt

Xiaoy312 commented 1 year ago

@NerijusN can we have more information about this? it would greatly help to have a repro sample, or re-post it under nventive-private if anything "secret". at least minimally include a branch/commit that is associated with release v3.0.8, and some info about how to reproduce: which pages and the steps? or even just words of angry users

jeromelaban commented 1 year ago

@NerijusN if this issue is occurring less with newer updates of uno/android, feel free to close this issue.

MartinZikmund commented 1 year ago

@NerijusN can this be closed?

jeromelaban commented 1 year ago

Not observed anymore.