Open The-Compiler opened 3 years ago
After taking a quick look into misc/ipc.py
it seems to me that the client is maybe getting prematurely disconnected from the socket before handling all of their (broken) data:
12:12:33 ERROR ipc ipc:_handle_invalid_data:305 Ignoring invalid IPC data from socket 0x7f3b04179790.
12:12:33 DEBUG ipc ipc:on_disconnected:292 Client disconnected from socket 0x7f3b04179790.
12:12:33 DEBUG ipc ipc:handle_connection:267 No new connection to handle.
12:12:33 DEBUG ipc ipc:_get_socket:372 In _get_socket with None socket!
12:12:33 DEBUG ipc ipc:on_ready_read:392 Read from socket 0x7f3b04179790: b'"], "target_arg": null, "version": "2.4.0", "protocol_version": 1, "cwd": "/tmp/qb_temp"}\n'
12:12:33 DEBUG ipc ipc:_handle_data:320 Processing: "], "target_arg": null, "version": "2.4.0", "protocol_version": 1, "cwd": "/tmp/qb_temp"}
12:12:33 ERROR ipc ipc:_handle_data:324 invalid json: "], "target_arg": null, "version": "2.4.0", "protocol_version": 1, "cwd": "/tmp/qb_temp"}
12:12:33 ERROR misc crashsignal:_handle_early_exits:240 Uncaught exception
The json.decoder.JSONDecodeError
is misleading here as the original exception initiator was the assertion in _handle_invalid_data()
.
During the first _handle_invalid_data()
the client will get disconnected and that sets self._socket
to None
.
Now there is still data in the ipc socket ready to be read but no client connected anymore, causing the assertion error.
Not sure how you want to handle this, I would suggest checking for any leftover data in _handle_invalid_data()
or on_disconnected()
and purge that with a warning/error to prevent reading it later.
(Just for clarification: json.decoder.JSONDecodeError
actually inherits from ValueError
and that is already being caught.)
As reported by @foxxx0:
on qutebrowser v2.4.0 with Qt 5.15.2 on Archlinux.
Report (private): https://crashes.qutebrowser.org/view/b1d0d28e