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

Studio.Windows.exe crash at close #19158

Open
MagicAndre1981 opened this issue Jan 6, 2025 · 2 comments
Open

Studio.Windows.exe crash at close #19158

MagicAndre1981 opened this issue Jan 6, 2025 · 2 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@MagicAndre1981
Copy link

Current behavior

When the Studio.Windows.exe is closed it crashes

Expected behavior

closes without any issue

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

Open Studio.Windows.exe or create a new Project and close the wizzard

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

Visual Studio 2022

IDE version

17.12

Relevant plugins

No response

Anything else we need to know?

Looking in the dump I see a NULLReferenceException inside the Stowed Exception

Stowed Exception Array @ 0x0000026e8b6d0670

Stowed Exception #1 @ 0x0000026e8b490b78
	0x80004003 (FACILITY_NULL - Default): E_POINTER - Pointer that is not valid

	Stack	 : 0x26e8b6d0b10
		7ffcb80f9d54 combase!RoOriginateLanguageException+0x54
		7ffbf79563fd

>>> Associated CLR Exception <<<

Exception object: 0000026ed55e2f08
Exception type:   System.NullReferenceException
Message:          Object reference not set to an instance of an object.
InnerException:   <none>
StackTrace (generated):
    SP               IP               Function
    0000009E58F7D210 00007FFBF79560BE SkiaSharp_Views_Windows!SkiaSharp.Views.Windows.SKXamlCanvas.OnUnloaded(System.Object, Microsoft.UI.Xaml.RoutedEventArgs)+0x7e
    0000009E58F7D250 00007FFBF6ABE63C Microsoft_WinUI!WinRT._EventSource_global__Microsoft_UI_Xaml_RoutedEventHandler+EventState.<GetEventInvoke>b__1_0(System.Object, Microsoft.UI.Xaml.RoutedEventArgs)+0x5c
    0000009E58F7D290 00007FFBF6ABE347 Microsoft_WinUI!ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr, IntPtr, IntPtr)+0x67

StackTraceString: <none>
HResult: 80004003

Stowed Exception #2 @ 0x0000026e8a24f090
	0x80004003 (FACILITY_NULL - Default): E_POINTER - Pointer that is not valid

	Stack	 : 0x26e8a24e070
		7ffc5257323f Microsoft_ui_xaml!DirectUI::CRoutedEventSourceBase<DirectUI::IUntypedEventSource,ABI::Microsoft::UI::Xaml::IRoutedEventHandler,IInspectable,ABI::Microsoft::UI::Xaml::IRoutedEventArgs>::Raise+0x282c97
		7ffc522f0992 Microsoft_ui_xaml!DirectUI::CRoutedEventSourceBase<DirectUI::IUntypedEventSource,ABI::Microsoft::UI::Xaml::IRoutedEventHandler,IInspectable,ABI::Microsoft::UI::Xaml::IRoutedEventArgs>::UntypedRaise+0x92
		7ffc52367044 Microsoft_ui_xaml!CCoreServices::CLR_FireEvent+0x3c4
		7ffc52366c6d Microsoft_ui_xaml!CommonBrowserHost::CLR_FireEvent+0x1d
		7ffc52407df1 Microsoft_ui_xaml!CControlBase::ScriptCallback+0x151
		7ffc523ae3e5 Microsoft_ui_xaml!CXcpDispatcher::OnWindowMessage+0x1c5
		7ffc523ae158 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0xc8
		7ffc523ae039 Microsoft_ui_xaml!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,IInspectable *>::*)(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,IInspectable *>,Microsoft::WRL::FtmBase>,`CXcpDispatcher::Init'::`46'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0x79
		7ffc58b371f7 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0x87
		7ffc58b3254f CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x83
		7ffc58b37693 CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xf3
		7ffc58ae09fd CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_a81ff790741c2a62f2197c2561f5fe49> >+0x21
		7ffc58ae4a56 CoreMessagingXP!Microsoft::CoreUI::ActionCallback::ImportAdapter$+0x66
		7ffc58ad0d99 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a9
		7ffc58abc880 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1bc
		7ffc58abc5ed CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b9
		7ffc58aafd7c CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x164
		7ffc58ab2c66 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffc58ab2fdc CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x98
		7ffc58af36a3 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0xa7
		7ffc58af3836 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x132
		7ffc58af3dae CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x5e
		7ffcb7b383f1 user32!UserCallWinProcCheckWow+0x2d1
		7ffcb7b380ac user32!DispatchClientMessage+0x9c
		7ffcb7b431dd user32!_fnDWORD+0x3d
		7ffcb8f143e4 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffcb63b14d4 win32u!NtUserPeekMessage+0x14
		7ffcb7b41cff user32!_PeekMessage+0x3f
		7ffcb7b41bcc user32!PeekMessageW+0x9c
		7ffc58af3501 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DispatchNextUserQueueItemNative+0xbd
		7ffc58ab32d8 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::RunIntegratedLoop+0xe4
		7ffc58ab24ab CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::Callback_HostModeRun+0xdb
		7ffc58abe8a8 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Win32EventLoopBridge::Callback_Run+0x228
		7ffc58aafb7c CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_Run+0x108
		7ffc58ab9235 CoreMessagingXP!Microsoft::CoreUI::IExportMessageLoopExtensions::ExportAdapter$::RunUntilExitFlag+0xa5
		7ffc58b35901 CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueue::Run+0x51
		7ffc58b317c1 CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueController::ShutdownQueue+0x131
		7ffc5247d14a Microsoft_ui_xaml!DirectUI::FrameworkApplication::StartDesktop+0x20e
		7ffc523a2250 Microsoft_ui_xaml!DirectUI::FrameworkApplicationFactory::Start+0x70
		7ffbf589ae95

Looks like it comes from SkiaSharp and the exception should be handled.

@MagicAndre1981 MagicAndre1981 added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Jan 6, 2025
@jeromelaban
Copy link
Member

Thanks for the report.

This was supposed to be fixed by mono/SkiaSharp#2854, but maybe there's an update missing.

@MagicAndre1981
Copy link
Author

This was supposed to be fixed by mono/SkiaSharp#2854, but maybe there's an update missing.

according to this comment, the fix is part of at least 2.88.9-preview.1.1.

So make sure you use at least 2.88.9

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

No branches or pull requests

2 participants