NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.45k stars 13.65k forks source link

Tribler crashes #194601

Closed Birdthatcantfly closed 4 months ago

Birdthatcantfly commented 1 year ago

Describe the bug

Tribler crashes.

Error log: Traceback (most recent call last): File "/nix/store/nb3bhv4q7l4bh1b1j114slycs9z0x9yx-tribler-7.11.0/src/tribler-gui/tribler_gui/widgets/tablecontentdelegate.py", line 248, in paint if not self.paint_exact(painter, option, index): File "/nix/store/nb3bhv4q7l4bh1b1j114slycs9z0x9yx-tribler-7.11.0/src/tribler-gui/tribler_gui/widgets/tablecontentdelegate.py", line 256, in paint_exact return drawing_action(painter, option, index, data_item) File "/nix/store/nb3bhv4q7l4bh1b1j114slycs9z0x9yx-tribler-7.11.0/src/tribler-gui/tribler_gui/widgets/tablecontentdelegate.py", line 338, in draw_subscribed_control self.subscribe_control.paint( File "/nix/store/nb3bhv4q7l4bh1b1j114slycs9z0x9yx-tribler-7.11.0/src/tribler-gui/tribler_gui/widgets/tablecontentdelegate.py", line 675, in paint font.setPixelSize(1.5 * self._thumb_radius) TypeError: setPixelSize(self, int): argument 1 has unexpected type 'float'

Steps To Reproduce

Steps to reproduce the behavior:

  1. Start Tribler
  2. See error message.

Notify maintainers

@xvapx @viric

Metadata

milahu commented 1 year ago

fixed by updating to tribler 7.12.1-unstable-2023-01-12 building from source is trivial, so there is no need to use the binary release

nixpkgs/pkgs/applications/networking/p2p/tribler/default.nix

```nix { lib , stdenv , fetchFromGitHub , python3 , makeWrapper , libtorrent-rasterbar-1_2_x , qt5 }: let libtorrent = (python3.pkgs.toPythonModule (libtorrent-rasterbar-1_2_x)).python; pyipv8 = python3.pkgs.buildPythonPackage rec { # https://pypi.org/project/pyipv8/ pname = "pyipv8"; version = "2.9"; src = fetchFromGitHub { owner = "Tribler"; repo = "py-ipv8"; rev = version; sha256 = "sha256-z2esUv/k1RWGeBDnII4yjXH848x3a+5aOIsNwsl0uYg="; }; propagatedBuildInputs = with python3.pkgs; [ cryptography libnacl netifaces aiohttp aiohttp-apispec pyopenssl pyasn1 asynctest marshmallow ]; checkPhase = '' runHook preCheck ${python3.interpreter} -m unittest runHook postCheck ''; # tests take too long (2 minutes) doCheck = false; }; in stdenv.mkDerivation rec { pname = "tribler"; version = "7.12.1-unstable-2023-01-12"; src = fetchFromGitHub { owner = "Tribler"; repo = "tribler"; rev = "acfc0d77ad797a9bef1a41be5d2c6cb632c07215"; sha256 = "sha256-tskhjtrkTryC5A1it10DvNg+JGymva9alMcUTNDg2tc="; }; nativeBuildInputs = [ python3.pkgs.wrapPython makeWrapper ]; buildInputs = with python3.pkgs; [ # https://github.com/Tribler/tribler/blob/main/requirements-build.txt python setuptools text-unidecode defusedxml markupsafe #requests ]; # TODO rename? #propagatedBuildInputs = [ pythonPath = [ libtorrent ] ++ (with python3.pkgs; [ # https://github.com/Tribler/tribler/blob/main/requirements-core.txt aiohttp aiohttp-apispec asynctest anyio chardet #cherrypy configobj cryptography decorator faker #feedparser libnacl lz4 marshmallow #m2crypto netifaces networkx pony psutil pyasn1 pydantic pyopenssl pyyaml sentry-sdk service-identity yappi yarl # keep this dependency higher than 1.6.3. See: https://github.com/aio-libs/yarl/issues/517 bitarray pyipv8 file-read-backwards # https://github.com/Tribler/tribler/blob/main/requirements.txt pillow #pycrypto pyqt5 pyqt5_sip pyqtgraph pyqtwebengine ]); /* checkInputs = with python3.pkgs; [ # https://github.com/Tribler/tribler/blob/main/requirements-test.txt pytest-asyncio pytest-timeout ]; */ installPhase = '' mkdir -pv $out # Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH. wrapPythonPrograms cp -prvd ./* $out/ makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \ --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \ --set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \ --set _TRIBLERPATH "$out/src" \ --set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \ --set NO_AT_BRIDGE 1 \ --chdir "$out/src" \ --add-flags "-O $out/src/run_tribler.py" mkdir -p $out/share/applications $out/share/icons cp $out/build/debian/tribler/usr/share/applications/org.tribler.Tribler.desktop $out/share/applications/ cp $out/build/debian/tribler/usr/share/pixmaps/tribler_big.xpm $out/share/icons/tribler.xpm ''; shellHook = '' wrapPythonPrograms || true export QT_QPA_PLATFORM_PLUGIN_PATH=$(echo ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms) export PYTHONPATH=./tribler-core:./tribler-common:./tribler-gui:$program_PYTHONPATH export QT_PLUGIN_PATH="${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" ''; meta = with lib; { description = "Decentralised P2P filesharing client based on the Bittorrent protocol"; homepage = "https://www.tribler.org/"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ xvapx viric ]; platforms = platforms.linux; }; } ```