Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing Tribler window puts it in a state where it will never reappear, even after restart and reinstalls #6243

Closed
da2x opened this issue Aug 11, 2021 · 3 comments · Fixed by #6511

Comments

@da2x
Copy link
Contributor

da2x commented Aug 11, 2021

Tribler version/branch+revision:

7.20

Operating system and version:

Windows 11.22000.120. I‘ve also expired this on two different Windows 10 devices, so not Win11 specific.

How to reproduce

  1. Set Windows UI scaling to 125 % (default on pretty much all 14″ laptops.)
  2. Maximize the Tribler window using the maximize button on the title bar.
  3. Right-click on the title bar and select Restore.

At this point, the window is bigger than the screen and the window controls are no longer visible. If you hover over the task bar icon, you can see that there’s a white outline around the window. Indicating that the window server and the window disagrees on its dimensions.

    4. Grab hold of the Tribler window’s top right corner and drag to resize the window.

Actual results

The window vanishes into non existence. It won’t reappear even if you restart Tribler or your computer. When Tribler launches, you’ll get an entry on the task bar but there won’t be a Tribler window. You can’t alt–tab to it or make it active in any other way. From the user’s perspective, Tribler simply “doesn’t work anymore” and they can’t recover it.

I’ve tried uninstalling Tribler, deleting %APPDATA%/Roaming/.tribler/, rebooting, and then reinstalling Tribler. The same thing happens again. Windows The Windows Security log shows no interventions. Nothing I tried seem to affect it in any way.

No Tribler window shown on the Windows task bar.

Expected results

Not the above.

Work around for users desperately awaiting a bugfix

  1. Hover over the task bar icon and move the cursor onto the floating empty window.
  2. Right-click on the floating window, and choose Maximize.

One of two things will happen:

  1. The window server might crash and take the whole Windows shell with it. If this happens, just wait a minute, it’ll reappear on its own. Try again.
  2. The Tribler window comes flying in from the far right waaay off screen. It’s back! You can quit and restart Tribler to save the working state. It should work fine for a while.

Other notes of importance

This issue is made worse by the fact that Tribler doesn’t restart in a maximized state. Users are more likely to try to resize and maximize the window because the app doesn’t remember its previous window state.

Relevant log file output:

From tribler-gui-info.log:

[PID:14364] - INFO - tribler_core.dependencies(78) - Check for missing dependencies. Scope: both
[PID:14364] - INFO - tribler_core.check_os(226) - Check and enable code tracing. Process name: "gui". Log dir: "C:\Users\Daniel\AppData\Roaming\.Tribler"
[PID:14364] - INFO - tribler_core.check_os(208) - Enable fault handler: "C:\Users\Daniel\AppData\Roaming\.Tribler"
[PID:14364] - INFO - tribler_core.check_os(49) - Check environment
[PID:14364] - INFO - tribler_core.check_os(80) - Should kill other Tribler instances
[PID:14364] - INFO - tribler_core.check_os(88) - Old PID: -1. Current PID: 14364
[PID:14364] - INFO - tribler_core.check_os(54) - Check free space
[PID:14364] - INFO - TriblerApplication(23) - Start Tribler application. Win id: "triblerapp". Sys argv: "['C:\\Program Files\\Tribler\\tribler.exe']"
[PID:14364] - INFO - TriblerApplication(51) - No running instances (socket error: 2)
[PID:14364] - INFO - tribler_gui(454) - Available Tribler translations {'Portuguese': 'pt_BR', 'Russian': 'ru_RU', 'Chinese': 'zh_CN', 'English': 'en_US'}
[PID:14364] - INFO - tribler_gui(455) - System language: ['en-US'], Tribler language: ['en', 'en-US', 'en-Latn-US']
[PID:14364] - INFO - __main__(208) - Start Tribler Window
[PID:14364] - INFO - NetworkUtils(30) - Looking for first free port in range [52194..52294]
[PID:14364] - INFO - NetworkUtils(34) - 52194 is free
[PID:14364] - WARNING - root(412) - Unable to hook up connect() info to <built-in method emit of PyQt5.QtCore.pyqtBoundSignal object at 0x000001E6A197CAB0>. Probably a 'builtin_function_or_method'.
[PID:14364] - WARNING - root(412) - Unable to hook up connect() info to <built-in method update of QGraphicsSvgItem object at 0x000001E6A1978AF0>. Probably a 'builtin_function_or_method'.
[PID:14364] - WARNING - root(412) - Unable to hook up connect() info to <built-in method update of QGraphicsSvgItem object at 0x000001E6A1978EE0>. Probably a 'builtin_function_or_method'.
[PID:14364] - INFO - TriblerGUI(147) - Will connect to events endpoint
[PID:14364] - INFO - TriblerGUI(83) - Got Tribler core error: 1
[PID:14364] - INFO - TriblerGUI(147) - Will connect to events endpoint
[PID:14364] - INFO - TriblerGUI(147) - Will connect to events endpoint
[PID:14364] - WARNING - root(412) - Received duplicate Tribler Core started event

The other log files are empty or otherwise don’t indicate that anything is out of the ordinary.

@devos50
Copy link
Contributor

devos50 commented Oct 5, 2021

@da2x thank you for your extensive report! Maybe someone with a Windows laptop can try to reproduce this?

@qstokkink
Copy link
Contributor

I can confirm this report for non-laptops as well. After playing around with my scaling I got my Tribler window stuck at x=~16000, y=~16000 on my 1920x1080 screen. Once your window is offscreen and you close Tribler, Qt writes (among other things) the x and y coordinates to the registry and restores the same position on the next start of Tribler (getting you in the infinite loop described by OP). By removing the Qt registry values for the Tribler window I got the window back into visible space again on the next start of Tribler.

Perhaps we can add a hook for when a window is initialized, moved or resized, to check that the window is actually drawn on the visible screen.

@devos50
Copy link
Contributor

devos50 commented Oct 5, 2021

@qstokkink thanks for testing! We could probably use the QDesktopWidget class to get screen information and determine if the window is within the visible screen boundaries. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants