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

Samples\Windowing\cpp\cpp-winui custom title bar crash #329

Closed
JamasChuang94 opened this issue Mar 14, 2024 · 0 comments
Closed

Samples\Windowing\cpp\cpp-winui custom title bar crash #329

JamasChuang94 opened this issue Mar 14, 2024 · 0 comments

Comments

@JamasChuang94
Copy link

JamasChuang94 commented Mar 14, 2024

Select the titlebar twice and use the minimize and maximize buttons in the custom status bar to crash. The void* value{} in TitleBar() is empty.

In

void TitlebarPage::SetCustomTitleBarDragRegion()
   {
      int titleBarHeight = m_appWindow.TitleBar().Height(); 
    }

  template <typename D> auto consume_Microsoft_UI_Windowing_IAppWindow<D>::TitleBar() const
  {
      void* value{};//Empty
      check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Windowing::IAppWindow)->get_TitleBar(&value));// &value 0xFFFFFFFFFFFFFFFF 
      return winrt::Microsoft::UI::Windowing::AppWindowTitleBar{ value, take_ownership_from_abi };
  }

'SampleApp.exe' (Win32): 'C:\Windows\System32\ninput.dll' has been loaded.
'SampleApp.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.70.1338.0_x64__8wekyb3d8bbwe\Microsoft.UI.Xaml.Phone.dll'.
Natvis C++/WinRT: Exception in
...
cppwinrt_visualizer::EvaluateVisualizedExpression
Exception thrown at 0x00007FF6CFFF7645 (in SampleApp.exe): 0xC0000005: An access violation occurred while reading location 0xFFFFFFFFFFFFFFFF.

@JamasChuang94 JamasChuang94 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant