CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.41k stars 65 forks source link

[Bug]: Crashes after launch (in ui.xaml) #211

Closed Ocrosoft closed 1 year ago

Ocrosoft commented 1 year ago

Affected Version

1.70.12

Bug Behavior

After the main window appears(It's a black window without any content rendered), the application crashes. This crash just appear in the first use guide view. Some times(randomly), without crash, and I can see "Select your language". Everything is ok when the first use guide is done. And no crash after reboot. If I delete the config files, the crash appears again.

Maybe it is a Xaml's bug.

Debug version (main branch), crash too, and the debugger detach automatically, and a crash dump was generated at "C:\Users\%username%\AppData\Local\CrashDumps". The minimal xaml I can reproduce the crash is:

    <Grid x:Name="MainPageGrid" Margin="16,32,16,16">
        <Image Source="ms-appx:///Assets/BG/StartUpBG.png" />
        <ComboBox />
    </Grid>

I have no idea of this crash, any help?

Expected Behavior

Don't crash.

Steps to reproduce

I am not sure if this crash can be reproduce on the same system version.

版本 Windows 11 专业版 版本 22H2 安装日期 ‎2023/‎7/‎20 操作系统版本 22621.1992 体验 Windows Feature Experience Pack 1000.22644.1000.0

Related Issues

No response

Screenshot(s)

No response

Additional Information

CollapseLauncher.exe.33260.dmp.zip log-2023-07-22-sta1.70.12-id0.log

Crash stack:

*** Stack trace for last set context - .thread/.cxr resets it
 # RetAddr               : Args to Child                                                           : Call Site
00 00007fff`b670cdb9     : 00000000`00000485 00000000`8000ffff 00000000`00000000 00000000`000081ec : KERNELBASE!RaiseFailFastException+0x152
01 00007ffe`75ca0fd5     : 00000000`0000041a 00000000`00000000 00000000`00000000 00000168`836593d0 : combase!RoFailFastWithErrorContextInternal2+0x4d9 [onecore\com\combase\winrt\error\error.cpp @ 1468] 
02 00007ffe`75ca0502     : 00000000`0000041a 00000000`0000041a 00000000`00aa0148 00000005`0b000000 : Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0xb5
03 00007ffe`75d5efa5     : 000001a9`2381c970 00000000`00000000 00000168`83659408 0000002a`3ef72a18 : Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xa2
04 00007ffe`75d5ee7c     : 00000168`8349d5a0 00000168`835c9160 000001a9`2384c5e0 00000168`836593d0 : Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0xd5
05 00007ffe`7cc587e8     : ffffffff`fffffffe 00000000`00000000 00000000`00000514 00007ffe`7cbd7b47 : 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'::`55'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0x7c
06 00007ffe`7cc589ee     : 00000000`0000000b 00000168`835c9010 00000168`80fa3de8 00000168`835c9600 : 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+0xa8
07 00007ffe`7cc585bb     : 00000168`835c9010 00000000`00000000 00000168`835b9c50 00000168`835c9010 : CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
08 00007ffe`7cc31b68     : 00000168`835b9c50 00000000`00000000 0000002a`3ef72a60 00000000`00000001 : CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
09 00007ffe`7cc31a3b     : 00000168`82ffa900 00007ffe`7cc584e0 00000168`00000000 00000000`00000030 : CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
0a 00007ffe`7cc0a247     : 00000168`835c8e90 00000168`835ba590 00000168`835b9b50 00007ffe`7cbd8d83 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
0b 00007ffe`7cbd6ec4     : 000001a9`2384c5e0 00000168`835b9b50 00000168`835c5a70 00000168`835c5170 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
0c 00007ffe`7cbd6725     : 00000168`82ffa900 00000168`8349d180 00000000`00000000 00000168`83659d90 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
0d 00007ffe`7cbced33     : 00007fff`b67a2c7f ffffffff`fffffffe 00000168`835b9650 000001a9`28edc1e0 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x165
0e 00007ffe`7cbd13a8     : 00000168`835b9650 00000168`83659d90 00000168`00000003 00000168`8349da80 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
0f 00007ffe`7cbd186b     : 000001a9`28ea0000 00000168`8349da80 00000168`82ffa900 0000002a`3ef72e80 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x138
10 00007ffe`7cbd1774     : 00000168`82ffa900 00007fff`b68b1126 000001a9`28edc1e0 00000000`00000000 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
11 00007ffe`7cc18b8d     : 00000168`82ffa900 00000000`00000003 0000002a`00000000 00000168`8349da80 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
12 00007ffe`7cc18b12     : 00000168`80fa36c0 00000000`028d0cc2 00000000`80000022 00000168`82ffa900 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
13 00007ffe`7cc189c3     : 00000000`00000000 0000002a`3ef72f70 0000a3c0`c57a3013 000001a9`28edc200 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
14 00007fff`b7688211     : 000001a9`28edc1e0 00000000`00000000 00000000`00000000 00000000`80000022 : CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
15 00007fff`b7687ecc     : 00000000`c0008388 00007ffe`7cc18950 00000000`028d0cc2 00000000`80000000 : user32!UserCallWinProcCheckWow+0x2d1
16 00007fff`b7692ffd     : 00000000`00000000 00000000`00000000 00000000`00000005 0000002a`3ef73108 : user32!DispatchClientMessage+0x9c
17 00007fff`b8472d94     : 00000000`00000000 00000000`00000000 00000000`00000000 0000078f`7ff772d9 : user32!_fnDWORD+0x3d
18 00007fff`b5b814d4     : 00007fff`b7691b1f 00000000`2700fe01 000001a9`28ed0801 00000000`02000000 : ntdll!KiUserCallbackDispatcherContinue
19 00007fff`b7691b1f     : 00000000`2700fe01 000001a9`28ed0801 00000000`02000000 00000000`00000289 : win32u!NtUserPeekMessage+0x14
1a 00007fff`b76919ec     : 00000000`00000003 0000002a`3ec99800 00000000`00007fff 0000002a`3ef733c0 : user32!_PeekMessage+0x3f
1b 00007fff`b6502323     : 0000002a`3ef73340 00000000`00000002 00000000`00071646 00007fff`b65277f1 : user32!PeekMessageW+0x9c
1c 00007fff`b650228d     : 0000002a`3ef737f0 0000002a`3ef73340 00000000`00071646 00000000`00000400 : combase!CCliModalLoop::MyPeekMessage+0x53 [onecore\com\combase\dcomrem\callctrl.cxx @ 2895] 
1d 00007fff`b6501b08     : 0000002a`3ef737f0 0000002a`3ef73844 0000002a`3ef737f0 0000002a`3ef73844 : combase!CCliModalLoop::PeekRPCAndDDEMessage+0x49 [onecore\com\combase\dcomrem\callctrl.cxx @ 2559] 
1e 00007fff`b65018dd     : 0000002a`3ef74628 000001a9`238c8ab0 0000002a`3ef737f0 00000000`00000002 : combase!CCliModalLoop::BlockFn+0x1ec [onecore\com\combase\dcomrem\callctrl.cxx @ 2055] 
1f 00007fff`b6528586     : 000001a9`ffffffff 00000168`8a3bc690 0000002a`3ef734e0 000001a9`238c8df4 : combase!ModalLoop+0xd1 [onecore\com\combase\dcomrem\chancont.cxx @ 169] 
20 (Inline Function)     : --------`-------- --------`-------- --------`-------- --------`-------- : combase!ThreadSendReceive+0x797 [onecore\com\combase\dcomrem\channelb.cxx @ 7255] 
21 (Inline Function)     : --------`-------- --------`-------- --------`-------- --------`-------- : combase!CSyncClientCall::SwitchAptAndDispatchCall+0x838 [onecore\com\combase\dcomrem\channelb.cxx @ 5735] 
22 00007fff`b6501cc9     : 00000000`00000000 00007fff`b65e7036 0000002a`3ef737f0 0000002a`3ef737c0 : combase!CSyncClientCall::SendReceive2+0x956 [onecore\com\combase\dcomrem\channelb.cxx @ 5297] 
23 00007fff`b6501c30     : 000001a9`23830b50 0000002a`3ef737f0 0000002a`3ef73b78 0000002a`3ef73de0 : combase!SyncClientCallRetryContext::SendReceiveWithRetry+0x51 [onecore\com\combase\dcomrem\callctrl.cxx @ 1502] 
24 00007fff`b650153d     : 0000002a`3ef73d00 0000002a`3ef73de0 0000002a`3ef739d0 000001a9`23830b50 : combase!CSyncClientCall::SendReceiveInRetryContext+0x44 [onecore\com\combase\dcomrem\callctrl.cxx @ 582] 
25 00007fff`b657faec     : 00000168`8a1c02ac 00000000`00000030 00000168`8a1c0d20 0000002a`3ef745f0 : combase!ClassicSTAThreadSendReceive+0x5d [onecore\com\combase\dcomrem\callctrl.cxx @ 564] 
26 00007fff`b654bd98     : 0000002a`3ef74828 00007fff`b67b69d2 0000002a`3ef73c50 00000000`00000000 : combase!CSyncClientCall::SendReceive+0x1bc [onecore\com\combase\dcomrem\ctxchnl.cxx @ 787] 
27 00007fff`b65a5cb8     : 0000002a`3ef73c50 000001a9`236b3ac8 00007fff`b6770c18 00000000`00000000 : combase!CClientChannel::SendReceive+0x98 [onecore\com\combase\dcomrem\ctxchnl.cxx @ 659] 
28 00007fff`b694241e     : 0000002a`3ef73ed0 000001a9`00000000 00007fff`b6770c18 000001a9`236b3ac8 : combase!NdrExtpProxySendReceive+0x58 [onecore\com\combase\ndr\ndrole\proxy.cxx @ 1989] 
29 00007fff`b65a1b4c     : 00007fff`b6770c18 0000002a`3ef74270 00000000`00000400 00007fff`b840f2c8 : rpcrt4!NdrpClientCall3+0x3de
2a 00007fff`b661a242     : 00000000`00000005 00000000`00000000 00000000`00000000 0000002a`3ef74370 : combase!ObjectStublessClient+0x14c [onecore\com\combase\ndr\ndrole\amd64\stblsclt.cxx @ 366] 
2b 00007fff`b6540cfb     : 000001a9`236b3ac8 00000000`00000000 0000002a`3ef74828 0000002a`3ef742c0 : combase!ObjectStubless+0x42 [onecore\com\combase\ndr\ndrole\amd64\stubless.asm @ 176] 
2c 00007fff`b65c6fd2     : 0000002a`3ef744a0 0000002a`3ef750e0 00000000`00000000 0000002a`3ef74828 : combase!CRpcResolver::DelegateActivationToSCM+0x5d7 [onecore\com\combase\dcomrem\resolver.cxx @ 2211] 
2d 00007fff`b652b9f8     : 0000002a`3ef744a0 0000002a`3ef744c0 0000002a`3ef744a0 00000000`00000000 : combase!CRpcResolver::CreateInstance+0x1a [onecore\com\combase\dcomrem\resolver.cxx @ 2414] 
2e 00007fff`b655fe5c     : 0000002a`3ef74828 00000000`00000000 ffffffd5`c108ba10 00000000`00000000 : combase!CClientContextActivator::CreateInstance+0x138 [onecore\com\combase\objact\actvator.cxx @ 604] 
2f 00007fff`b65371e1     : 00000000`00000000 0000002a`3ef75060 00000000`00000001 00000000`00000000 : combase!ActivationPropertiesIn::DelegateCreateInstance+0x8c [onecore\com\combase\actprops\actprops.cxx @ 1920] 
30 00007fff`b65367ce     : 00000000`00000000 00000000`00000002 00000168`8a1c02ac 00000000`00000030 : combase!ICoCreateInstanceEx+0x891 [onecore\com\combase\objact\objact.cxx @ 1921] 
31 00007fff`b65365dc     : 00000000`00000001 00007fff`00000000 000001a9`23633180 00000168`8a3bc690 : combase!CComActivator::DoCreateInstance+0x15e [onecore\com\combase\objact\immact.hxx @ 380] 
32 (Inline Function)     : --------`-------- --------`-------- --------`-------- --------`-------- : combase!CoCreateInstanceEx+0x10d [onecore\com\combase\objact\actapi.cxx @ 292] 
33 00007fff`77423ae0     : 00000000`0000001a 00000000`0000001a 00000000`0000001a 000001a9`28ec13c8 : combase!CoCreateInstance+0x14c [onecore\com\combase\objact\actapi.cxx @ 245] 
34 00007fff`b69fcbd4     : 00000000`00000000 000001a9`2364ef90 00000000`00000000 00000168`830c7598 : SogouTSF!DllRegisterServer+0x3a40
35 00007fff`b6a009d7     : 000001a9`28ea59e0 000001a9`28ea59e0 00000000`80004005 00000000`80004005 : msctf!CTip::Activate+0x170
36 00007fff`b69e1df4     : 00000000`00000000 00007fff`b6a82900 00000000`00000000 00000000`11d76900 : msctf!CThreadInputMgr::_ActivateTip+0xe3
37 00007fff`b69a7528     : 000001a9`2364efc8 000001a9`28ea59e0 00000000`00000002 000001a9`28ea59e0 : msctf!CThreadInputMgr::ActivateInputProfile+0x38424
38 00007fff`b69c984b     : 00008cf2`ce57e155 00000000`00000000 000001a9`00000000 000001a9`2364ef70 : msctf!CThreadInputMgr::OnActiveProfileChange+0x1c8
39 00007fff`b69ab9c4     : 00000000`00000001 0000002a`3ef76670 0000002a`3ef76670 000001a9`23634950 : msctf!CThreadInputMgr::EnsureTIPsActivated+0x77
3a 00007fff`b69cc2d1     : 0053004d`00000000 00000000`00000001 000001a9`23657398 0000002a`3ef76670 : msctf!CThreadInputMgr::ActivateEx_P+0x634
3b 00007ffe`77c0ba56     : 0000002a`3ef76670 00000000`00000000 000001a9`23657398 00000000`00000000 : msctf!CThreadInputMgr::Activate+0x21
3c 00007ffe`77c08b54     : 00000000`00000000 0000002a`3ef76670 0000002a`3ef764f1 0000006c`006c0064 : WinUIEdit!CTextMsgFilter::StartUIM+0x62
3d 00007ffe`77d83f2a     : 00000000`00000001 00000000`00000000 00000168`83736920 00000000`00000000 : WinUIEdit!CTextMsgFilter::HandleMessage+0x1264
3e 00007ffe`77cb342f     : 00000000`00000000 0000002a`3ef766e0 00000000`00000000 000001a9`23836cd0 : WinUIEdit!CTxtEdit::FilterMessageIfPossible+0x162
3f 00007ffe`76071a07     : 00007ffe`77cba630 00000000`00000000 00007ffe`77bb0000 00007ffe`77bb0000 : WinUIEdit!CTxtEdit::TxSendMessage+0xcf
40 00007ffe`7607143d     : 000001a9`23836cd0 00000000`00000000 000001a9`23836cd0 000001a9`23836cd0 : Microsoft_ui_xaml!CTextBoxBase::InitializeTextServices+0x1bb
41 00007ffe`765504e2     : 000001a9`23836cd0 000001a9`23836cd0 0000002a`3ef76aa8 00007ffe`7634c7b8 : Microsoft_ui_xaml!CTextBoxBase::Initialize+0x7d
42 00007ffe`76550096     : 000001a9`23836cd0 00000000`00000000 00007ffe`768dda20 00000168`8a1c2ac0 : Microsoft_ui_xaml!CRichEditBox::Initialize+0x12
43 00007ffe`75cc3713     : 00000000`00000000 00000000`00000050 00000000`00000000 0000002a`3ef76b40 : Microsoft_ui_xaml!CTextBox::Create+0x52
44 00007ffe`75d21472     : 00000168`8a340000 00007fff`b840c7aa 00000168`8a1c0000 000001a9`23752690 : Microsoft_ui_xaml!DirectUI::ActivationAPI::ActivateInstance+0x8f
45 00007ffe`75ddde7e     : 000001a9`23752690 00007ffe`75cb3ea3 000001a9`23752690 00000168`8a1c42c0 : Microsoft_ui_xaml!DirectUI::XamlParserCallbacks::XamlManagedRuntimeRPInvokes_CreateInstance+0x6e
46 00007ffe`75cba72b     : 00000168`835f2120 00000168`835f2120 00000000`00000000 00000000`00000290 : Microsoft_ui_xaml!XamlManagedRuntime::CreateInstance+0x3e
47 00007ffe`75cb9d97     : 00000168`8a1c0cc0 00000000`00000030 0000002a`3ef76e10 00000168`830c74e0 : Microsoft_ui_xaml!XamlType::CreateInstance+0xbb
48 00007ffe`75cb9871     : 00000000`0000000a 00000000`00000008 00000000`00000008 000001a9`23934e98 : Microsoft_ui_xaml!ObjectWriterRuntime::CreateTypeImpl+0x47
49 00007ffe`75cb7dbd     : 0000002a`3ef77050 0000002a`3ef770a0 0000002a`3ef76fa0 0000002a`3ef76f21 : Microsoft_ui_xaml!ObjectWriterCommonRuntime::CreateType+0x71
4a 00007ffe`75cb6737     : 000001a9`28eaa280 0000002a`3ef77040 000001a9`236570d0 000001a9`237525d0 : Microsoft_ui_xaml!BinaryFormatObjectWriter::CreateInstanceFromType+0x21d
4b 00007ffe`75cb4c32     : 000001a9`28ebb870 00007ffe`75cb2f32 00000000`00000000 000001a9`28eaa280 : Microsoft_ui_xaml!BinaryFormatObjectWriter::WriteNode+0xab7
4c 00007ffe`75cb37cd     : 00000168`00000000 00000000`00000000 0000002a`3ef77220 0000b65d`4b4c99eb : Microsoft_ui_xaml!CustomWriterRuntimeObjectCreator::RunObjectWriter+0xd2
4d 00007ffe`75e060c5     : 000001a9`2381a920 0000002a`3ef772e8 000001a9`2381676c 00007ffe`75d5c3f9 : Microsoft_ui_xaml!CustomWriterRuntimeObjectCreator::CreateInstance+0x5d
4e 00007ffe`75e05b8b     : 000001a9`238330a0 000001a9`238330a0 00000000`00000000 000001a9`23832f20 : Microsoft_ui_xaml!CDeferredElement::LoadContent+0x79
4f 00007ffe`75c49fac     : 00000000`00000000 00007ffe`75c127cb 000001a9`238330a0 0000002a`3ef775f8 : Microsoft_ui_xaml!CDeferredElement::Realize+0x5f
50 00007ffe`75c67999     : 000001a9`236b7a50 0000002a`3ef773f0 0000002a`0000000c 0000002a`3ef77400 : Microsoft_ui_xaml!CCoreServices::GetNamedObject+0xac
51 00007ffe`75c67919     : 00000000`00000000 000001a9`2384a858 000001a9`22c97200 000001a9`22c97200 : Microsoft_ui_xaml!CControl::GetTemplateChild+0x21
52 00007ffe`75c67a2b     : 000001a9`2384a880 0000002a`3ef77550 000001a9`2384a858 00000000`00000000 : Microsoft_ui_xaml!DirectUI::Control::GetTemplateChildImpl+0x4d
53 00007ffe`761394c9     : 000001a9`2384a880 0000002a`3ef77550 000001a9`2384a858 00007ffe`75c679c0 : Microsoft_ui_xaml!DirectUI::ControlGenerated::GetTemplateChild+0x6b
54 00007ffe`761d3d94     : 000001a9`2384a740 00000000`00000000 000001a9`2384a740 000001a9`2384a740 : Microsoft_ui_xaml!DirectUI::ComboBoxGenerated::OnApplyTemplate+0x219
55 00007ffe`75dce6fb     : 00000000`00000001 000001a9`2384a740 00000000`00000000 00000000`00000000 : Microsoft_ui_xaml!DirectUI::ComboBox::OnApplyTemplate+0xe4
56 00007ffe`75dce678     : 000001a9`22c97200 000001a9`22c97200 0000002a`3ef77959 00000000`00000000 : Microsoft_ui_xaml!DirectUI::FrameworkElementGenerated::OnApplyTemplateProtected+0x3f
57 00007ffe`75cde2e7     : 00000000`00000000 000001a9`22c97200 000001a9`22c97200 0000002a`3ef77959 : Microsoft_ui_xaml!DirectUI::FrameworkElement::OnApplyTemplateFromCore+0xc0
58 00007ffe`75bedc77     : 00000168`835c9a00 0000002a`3ef77a18 00000168`835c9a00 000001a9`22c97200 : Microsoft_ui_xaml!CFrameworkElement::InvokeApplyTemplate+0x177
59 00007ffe`75ce979d     : 00000000`00000000 0000002a`3ef77a79 0000b65d`4b4c919b 000001a9`22c97200 : Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0xf7
5a 00007ffe`75beae45     : 000001a9`28cf2590 000001a9`22c97200 00000000`00000000 00000168`835c9a00 : Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2ad
5b 00007ffe`75c0cac1     : 00000168`80dc1d40 000001a9`2368559c 000001a9`22c97200 0000002a`3ef782d8 : Microsoft_ui_xaml!CUIElement::Measure+0x455
5c 00007ffe`75bedd9c     : 00000168`835c9a00 00000000`00000020 00000000`00000000 00000168`835c9a00 : Microsoft_ui_xaml!CStackPanel::MeasureOverride+0x151
5d 00007ffe`75ce979d     : 0000002a`3ef78100 00007ffe`75c3e9dc 00000000`00000000 000001a9`28cf2590 : Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x21c
5e 00007ffe`75beae45     : 000001a9`28cf40b0 000001a9`28cf2590 00000000`00000004 00000168`835c9a00 : Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2ad
5f 00007ffe`75c0cac1     : 0000002a`3ef78068 0000002a`00000002 000001a9`28cf2590 00000000`00000be4 : Microsoft_ui_xaml!CUIElement::Measure+0x455
60 00007ffe`75bedd9c     : 00000168`835c9a00 00000000`00000000 00000000`00000000 00000168`835c9a00 : Microsoft_ui_xaml!CStackPanel::MeasureOverride+0x151
61 00007ffe`75ce979d     : 000001a9`238da620 000001a9`28c1ed94 0000b65d`4b4c6adb 000001a9`28cf40b0 : Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x21c
62 00007ffe`75beae45     : 000001a9`28cf23a0 000001a9`28cf40b0 00000000`00000004 00000168`835c9a00 : Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2ad
63 00007ffe`75c0cac1     : 00000000`00000000 00007ffe`75e23431 000001a9`28cf40b0 00007ffe`75dff0b0 : Microsoft_ui_xaml!CUIElement::Measure+0x455
64 00007ffe`75bedd9c     : 00000168`835c9a00 00000168`837d5a00 00000168`835c9a00 00000168`835c9a00 : Microsoft_ui_xaml!CStackPanel::MeasureOverride+0x151
65 00007ffe`75ce979d     : 00000000`00000002 00007ffe`75c3e9dc 00000000`00000000 000001a9`28cf23a0 : Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x21c
66 00007ffe`75beae45     : 000001a9`236a8270 000001a9`28cf23a0 00000000`00000004 00000000`00000020 : Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2ad
67 00007ffe`75c07ed0     : 000001a9`238f8dc0 00007ffe`75c4d2fe 000001a9`23685cf0 000001a9`236a8450 : Microsoft_ui_xaml!CUIElement::Measure+0x455
68 00007ffe`75c08b1f     : 0000002a`3ef78a20 00000000`00000002 00000000`00000001 00000000`00000002 : Microsoft_ui_xaml!CGrid::MeasureCell+0x70
69 00007ffe`75c0a835     : 000001a9`236a8270 0000002a`3ef78bf0 0000002a`3ef78ed8 00000000`00000000 : Microsoft_ui_xaml!CGrid::MeasureCellsGroup+0x10f
6a 00007ffe`75bedd9c     : 00000168`835c9a00 00007ffe`75c3e9dc 00000000`00000000 000001a9`236a8270 : Microsoft_ui_xaml!CGrid::MeasureOverride+0x3c5
6b 00007ffe`75ce979d     : 00000000`00000000 0000002a`3ef78fa9 00007ffe`765edb18 000001a9`236a8270 : Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x21c
6c 00007ffe`75beae45     : 00000168`804795f0 000001a9`236a8270 00000000`00000004 00000000`00000000 : Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2ad
6d 00007ffe`75be9b9f     : 40867000`00000000 44338000`44938000 000001a9`23625170 0000b65d`4b4c78db : Microsoft_ui_xaml!CUIElement::Measure+0x455
6e 00007ffe`75cf0d0f     : 00000168`80fdb1f8 00007ffe`75cf0c50 000001a9`22a92848 000001a9`22a92848 : Microsoft_ui_xaml!DirectUI::UIElementGenerated::Measure+0xcf
6f 00007ff6`d59a8f5f     : 0000a3c0`c57a8f03 00000000`00000000 00000168`804795f0 00000168`8a3a4b00 : Microsoft_ui_xaml!DirectUI::Page::MeasureOverride+0xbf
70 0000a3c0`c57a8f03     : 00000000`00000000 00000168`804795f0 00000168`8a3a4b00 00000000`00000000 : 0x00007ff6`d59a8f5f
71 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : 0x0000a3c0`c57a8f03
Scighost commented 1 year ago

Hi, sorry to bother you. There is the same issue in my project. Could you help me analyze it? https://github.com/Scighost/Starward/issues/8

bagusnl commented 1 year ago

I can't reproduce said issue, tried on my system and current branch that I'm working on https://github.com/bagusnl/Collapse/tree/settings-improvement

I tried running the debug build 10 times and 10/10 tries it success to launch to OOBE dialog.

This shouldn't do much but I thought might as well sending my debug build as well https://www.mediafire.com/file/bdfqfgufor6169l/CL-settings-improvement-bfa2e85-net7.0-windows10.0.22000.0.7z/file

Ocrosoft commented 1 year ago

I have no futher progress about this crash. The issue also can be closed. But we can provide one way to skip the crash, for example, place a pre-generated config file in the appdata path. If someone encounters the similar problem, you can try... I hope Microsoft can solve this problem hhh.

Ocrosoft commented 1 year ago

Hi, sorry to bother you. There is the same issue in my project. Could you help me analyze it? Scighost/Starward#8

只能说 winui 现在 bug 还是太多了,边骂边用 w

bagusnl commented 1 year ago

I wonder if this exception is related to these stuff

WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef0[105](https://github.com/neon-nyan/Collapse/actions/runs/5679125268/job/15390705923#step:6:106)1 - No default or neutral resource given for 'Files/Assets/AiHappy.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/AponiaFly.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/default.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/PaimonSleep.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/PaimonWhat.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/StartUpBG.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]
WINAPPSDKGENERATEPROJECTPRIFILE : warning : PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/StartUpBG2.png'. The application may throw an exception for certain user configurations when retrieving the resources. [D:\a\Collapse\Collapse\CollapseLauncher\CollapseLauncher.csproj::TargetFramework=net7.0-windows10.0.22000.0]

Digging into it comes a few issues listing:

bagusnl commented 1 year ago

Hi @Ocrosoft Can you try this debug build? https://www.mediafire.com/file/m4y35m7p38645pb/net7.0-windows10.0.22000.0.zip/file

Let me know how it goes

Ocrosoft commented 1 year ago

Hi @Ocrosoft Can you try this debug build? https://www.mediafire.com/file/m4y35m7p38645pb/net7.0-windows10.0.22000.0.zip/file

Let me know how it goes

I run this build 10 times, the first time, it works(the startup is slow). But the remaining 9 times, I got a black window, and then crash.

Cryotechnic commented 1 year ago

@bagusnl I have had this issue come quite often when compiling the app. Reading through the stuff you linked, do you think it could be something related to how we load local media assets for the launcher?

Such that maybe this could be due to assets not yet being loaded, or being loaded out of order? I'd need to check for specifics and don't have any PoC for a fix but something to look into for sure.

bagusnl commented 1 year ago

it could be, also I didn't remember the last build that I sent here contains more fixes for that issue or not so if you don't mind to test new build over at https://github.com/neon-nyan/Collapse/actions/runs/5726828350 Its quite hard to test too as it only happens in certain configuration

muscularcandy67 commented 1 year ago

I am looking at this now. Let me understand one thing. When you found the bug, did you finish the setup or you closed Collapse before finishing?

bagusnl commented 1 year ago

I tested locally on latest main debug build and latest stable release using script to help me automate it

@echo off
setlocal enableextensions enabledelayedexpansion
set /a count = 1
set /a crashcount = 0
set collapsepath="E:\GameData\HoYoverse\Collapse\app-1.70.12"
set collapsedatapath="C:\Users\bagusnl_reg\AppData\LocalLow\CollapseLauncher"
cd /d %collapsepath%
:loop
echo cleaning collapse data
rmdir /S /Q %collapsedatapath% >nul
echo running collapse #!count!
echo crash counter !crashcount!
start "" /b %collapsepath%\CollapseLauncher.exe
timeout 3 >nul
taskkill /IM CollapseLauncher.exe
if NOT %ERRORLEVEL% == 0 echo CRASH DETECTED! && echo ErrorLevel %ERRORLEVEL% && set /a crashcount += 1
set /a count += 1
timeout 1 >nul
echo.
GOTO loop

I let it ran for about 50x on each build and saw all 100 instances shown the background image startup. You can try using it (edit it first for the paths and the timeout, depending on how fast is your system you might want to increase the first timeout value) then run it as admin this will clean the entire collapse config in appdata and do a clean state run of collapse for 3s and see what's the errorlevel code after its been killed. While the error level is not a reliable way to detect this problem, we can observe the actual collapse window opening and closing, if it loads to the main screen then its good, if not then something is still up with this issue

bagusnl commented 1 year ago

MainPage Randomly Crashing on Startup

bagusnl commented 1 year ago

We will close this issue for now as there were no new update about this issue and also commit that, as far as we know, should fix it already in place. Feel free to reopen this issue if the issue keep reappearing and/or another fix or clue is known.

Thank you for supporting Collapse project <3

Ocrosoft commented 9 months ago

Update: @bagusnl I found that maybe the SougouInput causes this problem... After switch to us keyboard or Microsoft Pinyin, Collapse works fine.

Ocrosoft commented 9 months ago

Update: @bagusnl I found that maybe the SougouInput causes this problem... After switch to us keyboard or Microsoft Pinyin, Collapse works fine.

My SougouInput version is 13.10.0.8469.

Ocrosoft commented 9 months ago

And this issue should be related with xaml and sougou only, just keep it closed.