Help - When i hover over a button it crashes the server.
-
wrote on 4 Feb 2023, 20:50 last edited by
I am trying to make a multiplayer game which uses python sockets and PYQT5. Once the clients connect to the server and the gameboard is presented, the serverside crashes when I hover over a button. Is this due to a signal being sent when i hover my mouse over the button or what?
-
I am trying to make a multiplayer game which uses python sockets and PYQT5. Once the clients connect to the server and the gameboard is presented, the serverside crashes when I hover over a button. Is this due to a signal being sent when i hover my mouse over the button or what?
-
@DZK11
Clients don't send anything to server unless you tell them to, especially not on a "hover" event. -
wrote on 5 Feb 2023, 10:29 last edited by JonB 2 May 2023, 10:30
@DZK11
No. Produce a minimal example (that means, you have to take the time narrow the code down to just what is needed to reproduce the issue) and post it here.Obviously the very first thing to look at is whether you are doing anything in your client-side code when you "hover a button". If not then how could the server react to anything like that happening at the client? If the server "crashes" have you run it under a debugger?
-
@DZK11
No. Produce a minimal example (that means, you have to take the time narrow the code down to just what is needed to reproduce the issue) and post it here.Obviously the very first thing to look at is whether you are doing anything in your client-side code when you "hover a button". If not then how could the server react to anything like that happening at the client? If the server "crashes" have you run it under a debugger?
-
@JonB When i hover over the button, i get an unhandled exception where i recieve data saying the connection was forcibly closed but i dont understand why it does that if hovering over a button doesn't send any signals
wrote on 5 Feb 2023, 12:07 last edited by@DZK11
Hovering over aQPushButton
(or anyQWidget
) generates a number of QEventHover.../QHoverEvents. These are Qt events, not signals. You would know if you have subclassed to handle/generate such events or emit signals for them. Have you done so??If not, it would seem unlikely that anything about "hovering" would cause a problem. Maybe your diagnosis is coincidence?
The most important question is: does anything in your code try to communicate between client and server when you perform any such action in the client? If not, what do you imagine could possibly be going on? Qt is not going to do anything between client and server just because you move a mouse.... Indeed, it's not going to send/receive anything unless your code does so. So where/under what circumstances do you do any communication between these apps?
If the server gets an unhandled exception what have you done about:
@JonB said in Help - When i hover over a button it crashes the server.:If the server "crashes" have you run it under a debugger?
1/8