Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gallery][Windows][ShadowContainer] Crash on selection of Tabbar Neumorphic Style dropdown toolkit sample page. #1106

Closed
1 task
avikeid2007 opened this issue May 3, 2024 · 6 comments · Fixed by #1116
Assignees
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@avikeid2007
Copy link

Current behavior

Crash on the selection of Tabbar Neumorphic Style dropdown toolkit sample page in Gallery for Windows. This same crash happened in an Uno app developed by me for my organization. It is working fine in Other Heads i.e. [Wasm], [Desktop], & [Andi]

Msg:
System.Runtime.InteropServices.COMException

StackTrace:
at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IUIElementMethods.Measure(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize)
at Uno.Toolkit.UI.TabBarListPanel.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IUIElementMethods.Measure(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize)
at CommunityToolkit.WinUI.UI.Controls.WrapPanel.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)

Expected behavior

No crashes and unhandled exceptions.

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

  1. Build and run the Uno.Gallery for Windows on the latest master.
  2. Go to Toolkit=>ShadowContainer
  3. Scroll down to Neumorphic Style dropdown
  4. Select Tabbar in Dropdown.

Environment

Nuget Package:
Latest Master nugets
Package Version(s):
Latest Master nugets/ tried on 5.1 and 5.0 too
Affected platform(s):

Windows

Visual Studio:

2022 (version: Preview)

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@avikeid2007 avikeid2007 added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels May 3, 2024
@agneszitte
Copy link
Contributor

agneszitte commented May 6, 2024

fyi @MartinZikmund & @kazo0
Maybe @morning4coffe-dev can help take a look

@eriklimakc, @vatsashah45 does this happen with your test with the new single project structure?

@morning4coffe-dev
Copy link
Member

@agneszitte Jup, I can investigate more

@morning4coffe-dev morning4coffe-dev self-assigned this May 8, 2024
@morning4coffe-dev
Copy link
Member

morning4coffe-dev commented May 14, 2024

I was able to repro on a newly created app with the latest packages. After a bit of investigation the issue is in the NeumorphicBaseContentTabBarItemStyle specifically in the BADGE section here:

<!-- This part can be replaced when InfoBadge will be available in WinUI3 -->
The Visibility of the Ellipse and Border causes an exception on Windows. Before trying to fix, my question @agneszitte can we already replace it with InfoBadge from WinUI or are we still blocked?

@agneszitte
Copy link
Contributor

The Visibility of the Ellipse and Border causes an exception on Windows. Before trying to fix, my question @agneszitte can we already replace it with InfoBadge from WinUI or are we still blocked?

FYI @MartinZikmund, @kazo0

@MartinZikmund
Copy link
Member

As InfoBadge is now available everywhere, I think it would make sense to replace the Uno-specific code with InfoBadge directly

@kazo0
Copy link
Contributor

kazo0 commented May 14, 2024

Created an issue for this here: unoplatform/uno.toolkit.ui#1134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants