Xpra: Ticket #1186: TypeError: 'NoneType' object is not callable upon SIGINT

I start xpra and then send a SIGINT using ^C:

xpra start :100 --exit-with-children --daemon=no --mdns=no --pulseaudio=no --webcam=no --tcp-auth=env --tcp-encryption=AES --bind-tcp= --start-child="startx"
X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System:  4.4.5-300.fc23.x86_64
Current Operating System: Linux 9a0103ea4aca 4.2.0-34-generic #39~14.04.1-Ubuntu SMP Fri Mar 11 11:38:02 UTC 2016 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.2.0-34-generic root=UUID=... ro quiet splash vt.handoff=7
Build Date: 14 April 2016  08:51:01PM
Build ID: xorg-x11-server 1.18.3-2.fc25
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/home/xpra/.xpra/Xorg.:100.log", Time: Fri Apr 22 16:45:10 2016
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2016-04-22 16:45:10,949 created unix domain socket: /home/xpra/.xpra/9a0103ea4aca-100
2016-04-22 16:45:11,870 Error importing x264 encoder (enc_x264)
2016-04-22 16:45:11,870  libx264.so.148: cannot open shared object file: No such file or directory
2016-04-22 16:45:11,871 Error importing swscale colorspace conversion (csc_swscale)
2016-04-22 16:45:11,871  libswscale.so.4: cannot open shared object file: No such file or directory
2016-04-22 16:45:11,894 PyOpenCL loaded, header version: 1.2, GL support: True
2016-04-22 16:45:11,895 OpenCL Error: failed to find a working platform and device combination... trying with pyopencl's 'create_some_context'
2016-04-22 16:45:11,895 Warning: csc_opencl failed its self test
2016-04-22 16:45:11,895  no devices found
2016-04-22 16:45:12,993 GStreamer version 1.8 for Python 2.7
2016-04-22 16:45:13,067 D-Bus notification forwarding is available
2016-04-22 16:45:13,130 started command 'startx' with pid 94
2016-04-22 16:45:13,130 xpra X11 version 0.17.0-r12466
2016-04-22 16:45:13,130  running with pid 53 on Linux Fedora 24 Rawhide
2016-04-22 16:45:13,130  on display :100
xauth:  file /home/xpra/.serverauth.94 does not exist
/usr/libexec/Xorg.wrap: Only console users are allowed to run the X server
2016-04-22 16:45:13,680 xpra is ready.
2016-04-22 16:45:13,744 Warning: lpinfo command failed and returned 1
2016-04-22 16:45:13,745  command used: '/usr/sbin/lpinfo --make-and-model Generic PostScript Printer -m'
2016-04-22 16:45:24,938 got signal SIGINT, exiting
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2
2016-04-22 16:45:24,941 closing tcp socket
2016-04-22 16:45:24,942 removing socket /home/xpra/.xpra/9a0103ea4aca-100
2016-04-22 16:45:24,942 killing xvfb with pid 56
(II) Server terminated successfully (0). Closing log file.
Unhandled exception in thread started by <bound method DBUSNotificationsForwarder.release of <xpra.dbus.notifications_forwarder.DBUSNotificationsForwarder at /org/freedesktop/Notifications at 0x7f24e00cb4d0>>
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/dbus/notifications_forwarder.py", line 71, in release
    log.error("failed to release dbus notification forwarder: %s", e)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 346, in error
    self.log(logging.ERROR, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 333, in log
    global_logging_handler(self.logger.log, level, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/xpra/log.py", line 99, in standard_logging
    log(level, msg, *args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1223, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1277, in _log
    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1251, in makeRecord
    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
  File "/usr/lib64/python2.7/logging/__init__.py", line 263, in __init__
    if (args and len(args) == 1 and isinstance(args[0], collections.Mapping)
  File "/usr/lib64/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/usr/lib64/python2.7/abc.py", line 174, in __subclasscheck__
    for rcls in cls._abc_registry:
  File "/usr/lib64/python2.7/_weakrefset.py", line 59, in __iter__
    with _IterationGuard(self):
TypeError: 'NoneType' object is not callable

Fri, 22 Apr 2016 17:00:44 GMT - urzds:

This is again using /tags/0.17.x@12466

Sat, 23 Apr 2016 02:39:18 GMT - Antoine Martin: priority, status, description, milestone changed

This happens when you control-c, in various places. (see also #18 from 4 years ago!) It should not happen if you use "xpra stop" to shutdown, which is the preferred way of terminating the server process. We may try to improve this in the future, but changing the signal handling is known to break on some platforms (win32 and osx), and cause problems with GTK3.. so don't hold your breath.

Tue, 12 Jul 2016 16:52:22 GMT - Antoine Martin: milestone changed

Milestone renamed

Tue, 02 Aug 2016 10:40:51 GMT - Antoine Martin: milestone changed

Tue, 27 Sep 2016 09:22:22 GMT - Antoine Martin: status changed; resolution set

Very difficult to avoid unfortunately, just use "xpra stop".

Sat, 23 Jan 2021 05:17:19 GMT - migration script:

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