dragging a docking window with "CanFloat = false" causes main window deadlock

Docking/MDI for Avalonia Forum

Posted 2 days ago by kucint
Version: 25.2.1
Platform: .NET 9
Environment: Windows 11 (64-bit)
Avatar

Hi,

create a docking document with "CanFloat = false" and try to drag it out -> this may lead to serious sides effects

  • it deadlocks the main-window -> the application is not responisve
  • sometimes it captures mouse globaly in the system causing one cannot click anything at all (not only the affected app, but the whole windows)
    • after killing the app (you must use keybord and execute a kill-process from command-line), the situation comes back to normal and mouse is again responsive

please note, that this issue is not observed on all computers, but only on some models, with particaular number of cores available (I guess).
we do observe the phenomen on more than one machine, but slightly differently.

  • on couple of them -> nearly always
  • on couple of other machines -> selden
  • on couple of other: never

to increase chance of the bug occurance

  • you may undoc a document and keep draging it for a longer time moving mouse around
  • run some heavy-CPU-bound process in background. My preferred one is MsTeams with camera on :)

I can provide:

  • a source code of a demo app
  • a mp4 video
  • screenshots
  • affected computers architecture

... but i dont know how to attach documents to the thread.

Comments (3)

Posted 1 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you for reaching out.  As you might expect, it appears our machines, so far, fall under the "never" category of being able to reproduce this.  Maybe we'd have better luck with your sample project?

If you ever need to send attachments, it is best to email our support address with the attachment instead of posting on the forums since.  When sending a ZIP of sample projects, it is important to remove any bin/obj folders before zipping so the attachment is not blocked.

If you could please go ahead and send your sample project and reference this forum post in your message, we can try that.  You are welcome to send any other information you think is relevant.

Implementing a docking solution on Windows with Avalonia required a lot of platform-specific Win32 API calls since Avalonia did not have platform independent wrappers around all the functionality we needed (not their fault... other platforms just don't offer everything Windows does in this scenario).  You mentioned that the application gets stuck and you have to kill it.  Do you ever see a stack trace that might help identify the location of the issue?  Since it is possible the application is in thread deadlock, you may have to try to run in a debugger where you can break into the running process and look at the individual threads to see if one is blocked.  Secondary to being able to reproduce in a sample app, a stack trace of any kind would be most helpful.


Actipro Software Support

Posted 21 hours ago by kucint
Avatar

I've created a ticket (Ticket Number: 1BC-30A9A09E-000) and attached video and source there.

  • Unfortunately on my laptop (developer) the issue happens very rarely.
    It can be observed on some of ours test computers, but obviously no call stack info available there.

  • I cannot guarantee it, but I think this issue not necesarrely has something to do with "CanFloat = false" setting.
    I can't remeber well, but it could be (rarely) observered with "CanFloat = true" as well. Setting "CanFloat = false" drastically increases the probability of the failure occurance.

  • the "minimal sample repro app" that I attached in the ticket never stucks on my laptop, but in our product app the issue can be observed much more frequently.
    I could try to grab the stack trace from our product and send it to you if it would help.

  • Note that the "minimal sample app" I posted, is exactly the same as the one published in my another ticket. Maybe these two have something in common? 

  • let me know how I could help you to locate the issue.

Good luck!

Posted 10 hours ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you for creating a ticket with the attachments.  We just sent a reply.  Please transition to using the ticket system for this issue as we work toward a resolution.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.