xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 8 years ago

Closed 8 years ago

Last modified 8 months ago

#452 closed defect (fixed)

detect and avoid creating clipboard loops

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.11
Component: core Version:
Keywords: Cc:


If I shadow a display somewhere, then shadow again back to original display, I have created a loop... which creates havoc with the nested loop clipboard code:

Maximum recursion depth exceeded
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 451, in expire_delayed_region
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 506, in may_send_delayed
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 513, in do_send_delayed_region
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 552, in send_delayed_regions
    log.error("send_delayed_regions: error processing region %s: %s", damage, e, exc_info=True)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 34, in <lambda>
    self.log(level, msg, *args, **kwargs))
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 30, in log
    self.logger.log(level, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1218, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1264, in _log
    fn, lno, func = self.findCaller()
  File "/usr/lib64/python2.7/logging/__init__.py", line 1225, in findCaller
    f = currentframe()
RuntimeError: maximum recursion depth exceeded

We should detect when the nesting level gets high, and disable the clipboard.

Preferably, we would also have a way to avoid getting in that situation in first place.

Change History (4)

comment:1 Changed 8 years ago by Antoine Martin

r4845 disables the clipboard temporarily when the level of nesting gets too high (needs backporting to v0.10.x).

r4847 does this more properly (see changelog message for details) and when the server detects the loop, the client should see:

clipboard toggled to False by the server, reason: probable clipboard loop detected

Last remaining issue: we show the clipboard icon in the tray because of pending requests... but when we disable the clipboard, this should be reset.

comment:2 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

the tray icon issue is solved by r4850 (may get backported as it turned out to be small and simple). Closing.

comment:3 Changed 6 years ago by Antoine Martin

Related change in later versions: r7751.

The real long term solution is #812

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:4 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/452

Note: See TracTickets for help on using tickets.