normcap icon indicating copy to clipboard operation
normcap copied to clipboard

ValueError- screenshot is missing on screen

Open vladimiregorov74 opened this issue 1 year ago • 1 comments

(.venv) vladimir@vladimiregorov74:~/PycharmProjects/Normcap$ python3 -m normcap 21:16:40 - CRITICAL - normcap:148 - Uncaught exception! Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/main.py", line 6, in run() File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/app.py", line 101, in run app, tray = _prepare() File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/app.py", line 94, in _prepare tray = SystemTray(app, vars(args)) File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/gui/tray.py", line 145, in init self._show_windows(delay_screenshot=delay_screenshot) File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/gui/tray.py", line 208, in _show_windows self._create_window(index) File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/gui/tray.py", line 547, in create_window new_window.set_fullscreen() File "/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/gui/window.py", line 131, in set_fullscreen raise ValueError("Screenshot is missing on screen %s", self.screen) ValueError: ('Screenshot is missing on screen %s', Screen(left=0, top=0, right=1919, bottom=1079, device_pixel_ratio=1.0, index=0, screenshot=<PySide6.QtGui.QImage(null) at 0x7c910f00d0c0>)) 21:16:40 - CRITICAL - normcap:151 - System info: {'normcap_version': '0.5.4', 'python_version': '3.10.12', 'cli_args': '/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/main.py', 'is_briefcase_package': False, 'is_flatpak_package': False, 'is_appimage_package': False, 'platform': 'linux', 'desktop_environment': <DesktopEnvironment.GNOME: 1>, 'display_manager_is_wayland': True, 'pyside6_version': '6.6.1', 'qt_version': '6.6.1', 'qt_library_path': '/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/PySide6/Qt/plugins, /usr/bin', 'locale': 'ru_RU', 'config_directory': PosixPath('/home/vladimir/.config/normcap'), 'resources_path': PosixPath('/home/vladimir/PycharmProjects/Normcap/.venv/lib/python3.10/site-packages/normcap/resources'), 'tesseract_path': PosixPath('/usr/bin/tesseract'), 'tessdata_path': None, 'envs': {'TESSDATA_PREFIX': None, 'LD_LIBRARY_PATH': None}, 'screens': [Screen(left=0, top=0, right=1919, bottom=1079, device_pixel_ratio=1.0, index=0, screenshot=None)]} 21:16:40 - CRITICAL - normcap:152 - Unfortunately, NormCap has to be terminated due to an unknown problem.

vladimiregorov74 avatar Apr 22 '24 18:04 vladimiregorov74

Is version 5.34 ready now? What's the progress so far?

fenginsc avatar Aug 30 '23 13:08 fenginsc

No progress yet. I'm busy the next few weeks so the next chance I'll have is late September.

shawnlaffan avatar Aug 30 '23 22:08 shawnlaffan

Just for notes, I did have a go at building 5.34 using the same gcc as for 5.36 but hit all the same patching problems.

If we do build a 5.34 then it will likely be with the same stack used for 5.32.

I'm not sure how much it is needed, though.

shawnlaffan avatar Jun 14 '24 06:06 shawnlaffan

I get the desire for major version completeness, but I'm also "meh" on this one. We're currently at 5.40, so I don't see much need in a 5.34 realistically.

genio avatar Jun 14 '24 12:06 genio

Some projects have a valid need to support older Perl versions, even if that is not the best, or perhaps even recommended decision for many other projects.

One model to follow was to be in sync with the Lancaster Consensus, which was later obsoleted and modernized by the Lyon Amendment. TL;DR is "support about 10 years old Perl", which is at 5.16/5.18 at the moment.

Wearing my maintainer hat for such a volunteer-driven project, it would be nice to have 5.34 available too. It is currently a blind spot in our automated testing with Strawberry Perl on Windows via GitHub Actions, while other releases proved to be useful to fix missed bugs we missed otherwise, and it also helps prevent introducing further ones.

I'm a long-term Linux user since 15+ years, who currently lacks access to a Windows box, and also experience to build software like Perl on Windows, though I'd be happy to see if there's something I could contribute towards making 5.34 available.

ferki avatar Jun 14 '24 17:06 ferki

Once 5.40 is out I'll see if I can do a UCRT for 5.38. Then I'll have a look at 5.34.

I'm again at that stage of the year where things get busier so we'll see how optimistic that plan is.

shawnlaffan avatar Jun 14 '24 23:06 shawnlaffan

I've had a go at building 5.34 with the same stack as used for SP 5.32.

The build completes but then many tests fail. Some are flagged as timeouts but others are Dubious, test returned 255 (wstat 65280, 0xff00).

Setting OPTIMIZE=-Os gets things to pass again, which is interesting given this is gcc-8.3. (Edit - see #232 for some context)

Next is to get the CPAN modules to build.

shawnlaffan avatar Feb 04 '25 10:02 shawnlaffan

Setting OPTIMIZE=-Os gets things to pass again, which is interesting given this is gcc-8.3.

Indeed. In my mind, I've always put the need for "-Os" down to some change in gcc - but this suggests that it was triggered by a change in perl source. (I wasn't building devel releases on a regular basis back then.)

I'll identify the first 5.33.x release for which "-O2" fails to work. ( Please let me know if you've already made progress on that - as that might save some duplication of effort.)

sisyphus avatar Feb 05 '25 01:02 sisyphus

Thanks Rob.

I'm not trying to work out which version caused the issue so you have carte blanche on that front.

This comment from @xenu is relevant: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/85#issuecomment-1471474664

shawnlaffan avatar Feb 05 '25 02:02 shawnlaffan

Another data point for the choice between -O2/-Os:

BerkeleyDB fails (crashes) test t/strict.pl with -O2 but passes with -Os when built with 5.34. There are no failures for either optimisation level when built with 5.36 or 5.40.

shawnlaffan avatar Feb 05 '25 05:02 shawnlaffan

A beta release of 5.34.3.1 is now available.

https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/dev_5.34.3.1_20250205_gcc8

shawnlaffan avatar Feb 05 '25 09:02 shawnlaffan