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

The application crashes when dragging the files. #7231

Closed
1 of 2 tasks
Karthickmani97 opened this issue Jun 13, 2022 · 13 comments
Closed
1 of 2 tasks

The application crashes when dragging the files. #7231

Karthickmani97 opened this issue Jun 13, 2022 · 13 comments
Assignees
Labels
bug Something isn't working Crash whenever user reports a crash or app freeze product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team

Comments

@Karthickmani97
Copy link

Karthickmani97 commented Jun 13, 2022

Describe the bug

Drag a file, which will crash the application on the OnDragOver event. As we are calculating the files dropping position in the e.DataView of properties. The e.DataView throws unhandled exceptions, could not catch the exception details, debugger gets stopped even if exception settings are enabled. It break in .NET 6.0, but we also faced the issue randomly in .NET 5.0 also, sometimes at the first drag-drop operation, other times after 10 drag-drop operations. But eventually, it will crash.

Steps to reproduce the bug

Perform drag-drop operations between source and target.

Expected behavior

The application should not be crashed.

Screenshots

image

SDK version

1.1.0

Target framework version

.NET 5.0 and .NET 6.0

Windows app type

  • UWP
  • Win32

Device form factor

No response

Windows version

No response

Additional context

No response

@Karthickmani97 Karthickmani97 added the bug Something isn't working label Jun 13, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jun 13, 2022
@ojhad ojhad added team-Rendering Issue for the Rendering team product-winui3 WinUI 3 issues labels Jun 13, 2022
@bpulliam bpulliam added duplicate This issue or pull request already exists and removed needs-triage Issue needs to be triaged by the area owners labels Jun 14, 2022
@bpulliam
Copy link
Contributor

Even without a crash dump, this looks like #7002.

@wbokkers
Copy link

wbokkers commented Jun 15, 2022

@bpulliam This is NOT a duplicate. Drag & Drop from outside the app crashes since 1.1.0.
Drag & Drop is improved in 1.1.1 but still contains this specific D&D case. Please remove the duplicate label and add needs-trigage back, unless you plan to fix this as part of #7002

@wbokkers
Copy link

Just tested:
1.0.3 : No crash on dragging a file
1.0.4 : No crash on dragging a file
1.1.0 : Crash!
1.1.1 : Crash!

@Jeyasri-Murugan
Copy link

Jeyasri-Murugan commented Jun 15, 2022

Hi Team,
Please find the replicated sample, sometimes the issue will not throw in that scenario clean and rebuild solution to replicate, crash on drag over the custom grid cell added.

Sample - DataViewCrash.zip

Screenshot -
DataViewCrash

@wbokkers
Copy link

wbokkers commented Jun 16, 2022

I have a crash dump. It's quite large. How can I send this?
As soon as I drag a file over an area with a DragOver handler, I get a crash.
I get the following stack trace from the crash dump:

Stowed Exception Array @ 0x0000020ef00278f0

Stowed Exception #1 @ 0x0000020eeff77740
0x8000FFFF (FACILITY_NULL - Default): E_UNEXPECTED - Unexpected failure

Stack	 : 0x20eeff75a58
	7fff6a731f88 Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x1c85d8
	7fff6a5690c2 Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xc2
	7fff6a5b6bee Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0x7e
	7fff6a5b6b36 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>,<lambda_e857fdb067b9ae81889f07225ce1ccec> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0x26
	7fff85023f98 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
	7fff8502419e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
	7fff85023d6b CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
	7fff84fff808 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
	7fff84fff6db CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
	7fff84fdc470 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1b0
	7fff84fa9b54 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
	7fff84fa9406 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x182
	7fff84f9ed7b CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
	7fff84fa1010 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x138
	7fff84fa14e6 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0xaa
	7fff84fa140a CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x7e
	7fff84ff466f CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x4f
	7fff84ff460f CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0xdf
	7ff81be51c4c user32!UserCallWinProcCheckWow+0x33c
	7ff81be5179c user32!DispatchClientMessage+0x9c
	7ff81be64b4d user32!_fnDWORD+0x3d
	7ff81d7a7e04 ntdll!KiUserCallbackDispatcherContinue+0x0
	7ff81ac613b4 win32u!NtUserPeekMessage+0x14
	7ff81be59f0f user32!_PeekMessage+0x3f
	7ff81be59e7a user32!PeekMessageW+0x13a
	7ff81b5c1f7f combase!CCliModalLoop::MyPeekMessage+0x53
	7ff81b5c1ee9 combase!CCliModalLoop::PeekRPCAndDDEMessage+0x49
	7ff81b5c20c6 combase!CCliModalLoop::FindMessage+0x46
	7ff81b5becb5 combase!CCliModalLoop::HandleWakeForMsg+0x65
	7ff81b5c18c8 combase!CCliModalLoop::BlockFn+0x298
	7ff81b5c15f2 combase!ModalLoop+0xc2
	7ff81b5c719b combase!CSyncClientCall::SendReceive2+0x93b
	7ff81b5c1192 combase!ClassicSTAThreadSendReceive+0xa2
	7ff81b5cc4f5 combase!CSyncClientCall::SendReceive+0x195
	7ff81b5bffa8 combase!CClientChannel::SendReceive+0x98
	7ff81b639858 combase!NdrExtpProxySendReceive+0x58
	7ff81d49ba73 rpcrt4!NdrpClientCall3+0x403
	7ff81b63718c combase!ObjectStublessClient+0x14c
	7ff81b6d85d2 combase!ObjectStubless+0x42

@wbokkers
Copy link

I get this exception in a DragOver handler at the following location:
image

@wbokkers
Copy link

wbokkers commented Jun 16, 2022

@bpulliam I don't understand why on the Community Call you said there are d&d issues left and you need more crash dumps, but at the same time without looking any further mark this issue as duplicate? This does not make sense to me.

@bpulliam bpulliam removed the duplicate This issue or pull request already exists label Jun 16, 2022
@bpulliam
Copy link
Contributor

The reason I ask for crash dumps is that they are the gold standard, the most important item in quickly getting to the root cause of the issue. Samples are helpful, printouts of call stacks will also help, but the most efficient way to investigate a problem is the crash dump. It eliminates all other factors such as OS version, patch level, architecture, etc and saves us the time of duplicating the exact issue. Sometimes the issue you see is masked by another one and we spend time investigating a different issue that repros with the same sample. On this issue, we now have internal repros and crash dumps and are giving this a high priority. Thanks to all of you for your dumps, your samples, your observations, and your assistance in making the product better.

@Scottj1s Scottj1s self-assigned this Jun 17, 2022
@Scottj1s
Copy link
Member

We have root caused the issue and are evaluating a fix. Also fixes #7007, #7192, #7002.

@terrycox
Copy link

More drag and drop weirdness:
#7266

@sudongg
Copy link

sudongg commented Jun 28, 2022

The same problem. In Version 1.1.1, the DataView It is easy to crash when trying to get Properties after set Properties.

@wbokkers
Copy link

Still happening in v 1.1.2

@Scottj1s
Copy link
Member

Scottj1s commented Sep 6, 2022

fix is now available in Windows App SDK 1.2 Preview 1

@bpulliam bpulliam added the Crash whenever user reports a crash or app freeze label Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Crash whenever user reports a crash or app freeze product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

8 participants