mirror of
https://github.com/quasar/Quasar.git
synced 2026-04-25 15:25:59 +03:00
[GH-ISSUE #55] Remote Desktop Crashes - Multi-Monitors #19
Labels
No labels
bug
bug
cant-reproduce
discussion
duplicate
easy
enhancement
help wanted
improvement
invalid
need more info
pull-request
question
wont-add
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Quasar#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yankejustin on GitHub (Apr 13, 2015).
Original GitHub issue: https://github.com/quasar/Quasar/issues/55
Problem:
In a Multi-Monitor setup, suppose you have two monitors. Open up a Remote Desktop Form and Start, then Stop the Remote Desktop for one of the monitors. Select the other monitor, then attempt to Start Remote Desktop once again. For some reason, this will cause the Client to stop functioning (a window from Windows will pop up stating such, and the Client will crash entirely).
Edit Note 1:
I have two monitors with differing resolutions (1920x1080) and (1080x760).
Edit Note 2:
This problem will not only crash the Client out, but the Server will also crash entirely. Implementing a try-catch for each form disposal here (
github.com/MaxXor/xRAT@f9b52c804d/Server/Core/UserState.cs (L46-59)) should fix a situation where one issue with any of the many Forms to be disposed will break the entire Server.@ghost commented on GitHub (Apr 13, 2015):
I noticed this happening as well. I believe it has to do with resolution. Is one of your monitors a different resolution than the other? At 1920x1080 on both of my monitors switching between the two is fine for me, and doesn't crash. When I change the resolution while the Remote Desktop is running the client crashes
@yankejustin commented on GitHub (Apr 13, 2015):
I do have monitors with different resolutions. (1920x1080) and (1080x760). Perhaps that means that https://github.com/MaxXor/xRAT/blob/master/Client/Core/Commands/CommandHandler.cs#L226 could have something to do with this issue.
@yankejustin commented on GitHub (Apr 13, 2015):
Accidentally closed! Sorry!
@ghost commented on GitHub (Apr 13, 2015):
https://github.com/MaxXor/xRAT/blob/master/Client/Core/Commands/CommandHandler.cs#L236-L239
The UnsafeStreamCodec class is throwing an exception "Bitmap width/height are not equal to previous bitmap"
Perhaps a try/catch/finally scenario could be of use? I'm not too sure how to handle it properly
@MaxXor commented on GitHub (Apr 13, 2015):
Can you check if the fix from this branch is working for you?
https://github.com/MaxXor/xRAT/tree/remote-desktop-fix
@ghost commented on GitHub (Apr 13, 2015):
No it does not.
https://github.com/MaxXor/xRAT/blob/master/Client/Core/Commands/CommandHandler.cs#L236-L239
The CodeImage method throws an exception. I think adding a try/catch around this method call and setting the StreamCodec to null in the catch block, then sending a packet with a flag to tell the server to reset the stream and create a new Codec class might do the trick.
@MaxXor commented on GitHub (Apr 13, 2015):
I just changed the monitor resolution of my second monitor to 1080x760 and no exception occured. I followed the steps from yankejustin to reproduce this issue.
@ghost commented on GitHub (Apr 13, 2015):
My apologies, this DID fix the issue when switching between monitors with two different resolutions.
The issue I was having was changing my resolution on the other monitor while the Remote Desktop was running, which was causing the Codec class to throw the exception.
@MaxXor commented on GitHub (Apr 13, 2015):
Alright! :) Do you think the client should also handle the situation when someone changes the resolution?
@ghost commented on GitHub (Apr 13, 2015):
I think it should since its possible and bound to happen. Just another little thing to fix to have a bug-free application xD
@MaxXor commented on GitHub (Apr 13, 2015):
Yes, hehe. :D