Skip to content

Nullref on backpack double click to equipΒ #6511

@davidejensen

Description

@davidejensen

πŸ› οΈ Build version:

dev and main, not yet released

πŸ“” Issue Description:

In the backpack, when I load a new page, the first time I double click on a wearable to equip it, it doesn't get equipped and I get a nullref, the second time I double click it works fine, also pressing on the equip button equips the wearable correctly.

stacktrace:


NullReferenceException: Object reference not set to an instance of an object
DCL.AvatarRendering.Wearables.Components.ITrimmedWearable.GetUrn () (at Assets/DCL/AvatarRendering/Wearables/Components/ITrimmedWearable.cs:27)
DCL.Backpack.BackpackBus.BackpackBusController.EquipWearable (DCL.AvatarRendering.Wearables.Components.IWearable wearable, DCL.Backpack.BackpackBus.BackpackEquipWearableCommand command) (at Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs:124)
DCL.Backpack.BackpackBus.BackpackBusController+<>c__DisplayClass18_0.<HandleEquipWearableCommand>b__0 (DCL.AvatarRendering.Wearables.Components.IWearable item) (at Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs:107)
DCL.AvatarRendering.Wearables.Helpers.WearableProviderHelper.FetchWearableByPointerAndExecuteAsync (System.String pointer, DCL.AvatarRendering.Wearables.IWearablesProvider wearablesProvider, DCL.AvatarRendering.Wearables.Helpers.IWearableStorage wearableStorage, DCL.AvatarRendering.Wearables.Equipped.IReadOnlyEquippedWearables equippedWearables, System.Action`1[T] onWearableFetched, System.Threading.CancellationToken ct) (at Assets/DCL/AvatarRendering/Wearables/Helpers/WearableProviderHelper.cs:27)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
DCL.Diagnostics.DebugLogReportHandler:LogExceptionInternal(Exception, ReportData, Object)
DCL.Diagnostics.ReportHandlerBase:LogException(Exception, ReportData, Object)
DCL.Diagnostics.ReportHubLogger:UnityEngine.ILogHandler.LogException(Exception, Object) (at Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportHubLogger.cs:43)
UnityEngine.Debug:LogException(Exception)
Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) (at ./Library/PackageCache/com.cysharp.unitask@f026e068eaed/Runtime/UniTaskScheduler.cs:90)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder:SetException(Exception) (at ./Library/PackageCache/com.cysharp.unitask@f026e068eaed/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs:53)
DCL.AvatarRendering.Wearables.Helpers.<FetchWearableByPointerAndExecuteAsync>d__0:MoveNext() (at Assets/DCL/AvatarRendering/Wearables/Helpers/WearableProviderHelper.cs:52)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder:Start(<FetchWearableByPointerAndExecuteAsync>d__0&) (at ./Library/PackageCache/com.cysharp.unitask@f026e068eaed/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs:110)
DCL.AvatarRendering.Wearables.Helpers.WearableProviderHelper:FetchWearableByPointerAndExecuteAsync(String, IWearablesProvider, IWearableStorage, IReadOnlyEquippedWearables, Action`1, CancellationToken)
DCL.Backpack.BackpackBus.BackpackBusController:HandleEquipWearableCommand(BackpackEquipWearableCommand) (at Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs:107)
DCL.Backpack.BackpackBus.BackpackCommandBus:SendCommand(BackpackEquipWearableCommand) (at Assets/DCL/Backpack/BackpackBus/BackpackCommandBus.cs:25)
DCL.Backpack.<TryEquippingItemAsync>d__37:MoveNext() (at Assets/DCL/Backpack/BackpackGridController.cs:252)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder:Start(<TryEquippingItemAsync>d__37&) (at ./Library/PackageCache/com.cysharp.unitask@f026e068eaed/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs:111)
DCL.Backpack.BackpackGridController:TryEquippingItemAsync(IWearable, String, CancellationToken)
DCL.Backpack.<>c__DisplayClass36_0:<EquipItem>b__0(IWearable) (at Assets/DCL/Backpack/BackpackGridController.cs:232)
DCL.AvatarRendering.Wearables.Helpers.<FetchWearableByPointerAndExecuteAsync>d__0:MoveNext() (at Assets/DCL/AvatarRendering/Wearables/Helpers/WearableProviderHelper.cs:27)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder:Start(<FetchWearableByPointerAndExecuteAsync>d__0&) (at ./Library/PackageCache/com.cysharp.unitask@f026e068eaed/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs:110)
DCL.AvatarRendering.Wearables.Helpers.WearableProviderHelper:FetchWearableByPointerAndExecuteAsync(String, IWearablesProvider, IWearableStorage, IReadOnlyEquippedWearables, Action`1, CancellationToken)
DCL.Backpack.BackpackGridController:EquipItem(Int32, String) (at Assets/DCL/Backpack/BackpackGridController.cs:231)
DCL.Backpack.BackpackItemView:OnPointerClick(PointerEventData) (at Assets/DCL/Backpack/BackpackItemView.cs:163)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@dda977a1d52f/Runtime/UGUI/EventSystem/EventSystem.cs:514)
Screen.Recording.2025-12-19.at.09.07.39.mov

πŸ‘£ STR:

  1. Open the backpack
  2. Load a non cached page
  3. Double click on a wearable to equip it
  4. Check the null-reference that is generated

βœ”οΈ Expected Result:

Double clicking should equip the wearable on the first try

❌ Actual Result with evidence:

βž— Reproduction:

πŸ” Always - 100%

πŸ–₯️ Operative system and additional Notes:

Mac M1

Metadata

Metadata

Labels

3-lowMinor cosmetic issues, low impact, can be scheduled later.bugSomething isn't working

Type

Projects

Status

With QA / Awaiting Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions