OttoAllmendinger / gnome-shell-screenshot

Gnome Shell extension for making and uploading screenshots
MIT License
266 stars 53 forks source link

Compatibility with GS 40 #143

Closed CharoSW closed 3 years ago

CharoSW commented 3 years ago

It doesn't work on Gnome Shell 40 beta, or at least the version that is shipped with Fedora. Trying to screenshot an area crashes the shell completely and the settings don't display, showing a "Technical Error" box instead that starts off with "No property margin on GtkBox"

OttoAllmendinger commented 3 years ago

thanks for the heads up!

didierga commented 3 years ago

Extension does not work with Fedora 34 beta 1.3 and gnome-shell 40

mars 28 18:12:00 fedora gjs[2690]: JS WARNING: [/home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js 69]: Requiring Gtk but it has 3 versions available; use imports.gi.versions to pick one
mars 28 18:12:00 fedora gjs[2690]: JS WARNING: [/home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js 41]: Too many arguments to function Gtk.init: expected 0, got 1
mars 28 18:12:00 fedora gjs[2690]: JS ERROR: TypeError: dlg.set_do_overwrite_confirmation is not a function
                                   copy@/home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js:45:13
                                   @/home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js:66:13
                                   @/home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js:69:2
mars 28 18:12:00 fedora gjs[2690]: Script /home/didier/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/saveDlg.js threw an exception
mars 28 18:12:00 fedora systemd[1422]: app-gnome-gjs-2690.scope: Deactivated successfully.
OttoAllmendinger commented 3 years ago

please try the master branch

Install instructions: https://github.com/OttoAllmendinger/gnome-shell-screenshot#via-githubcom

CharoSW commented 3 years ago

Sorry this took a little bit but I had an old arch install that I wanted to test this on alongside my fedora 34. In both cases using the current GS 40 release the settings now work but trying to take the actual screenshot crashes the shell. The default screenshot hotkeys defined by gnome-shell still have the desired effects so this is definitely a problem here rather than with gnome-shell at large.

didierga commented 3 years ago

I tried to install from git master following instructions but there is a problem with make:

$ LANG=C git clone https://github.com/OttoAllmendinger/gnome-shell-screenshot.git
Cloning into 'gnome-shell-screenshot'...
remote: Enumerating objects: 548, done.
remote: Counting objects: 100% (548/548), done.
remote: Compressing objects: 100% (289/289), done.
remote: Total 2052 (delta 299), reused 479 (delta 246), pack-reused 1504
Receiving objects: 100% (2052/2052), 1.48 MiB | 16.89 MiB/s, done.
Resolving deltas: 100% (1188/1188), done.
$ cd gnome-shell-screenshot
$ pwd
/home/user/gnome-shell-screenshot
$ LANG=C make install
make: *** No rule to make target 'install'.  Stop.
$ cat Makefile
NAME = gnome-shell-screenshot
UUID = $(NAME)@ttll.de
SCHEMA = org.gnome.shell.extensions.screenshot.gschema.xml

LANGUAGES = bg ca cs de el es eu fr id_ID it pl pt_BR ru tr uk zh_CN

all: update_dependencies
    make archive

update_dependencies:
    git submodule update --init

-include gselib/make/gnome-shell-extension.mk

SOURCE += src/empty64.png

but gselib is empty:

$ ll gselib
total 0
OttoAllmendinger commented 3 years ago

@didierga please run make update_dependencies first

OttoAllmendinger commented 3 years ago

@CharoSW please run journalctl --user /usr/bin/gnome-shell -f and capture the output when the shell crashes

CharoSW commented 3 years ago

it prints " _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed " 3 times

OttoAllmendinger commented 3 years ago

not much to go on... is there anything interesting logged for

journalctl --user /usr/bin/gjs -f

?

CharoSW commented 3 years ago

Unfortunately there is nothing relevant to this extension in that log. However, I did look over the full system log for any other clues and there was this line.

kernel: gnome-shell[3228]: segfault at 18 ip 00007fbd2a24bc64 sp 00007ffcd1e64320 error 4 in libgtk-3.so.0.2404.24[7fbd2a144000+383000]

Along with a coredump which I can post if you want. I do remember something about gtk3 and gtk4 not liking being in the same process but I also can't definitively say that's whats cause this problem

OttoAllmendinger commented 3 years ago

oh that is interesting, please share the logs about gtk3/gtk4 conflicts

hiaselhans commented 3 years ago

Just tried the master branch and it works fine on my gnome 40.0.0 (archlinux/wayland)

Thanks for the good tool!

oatmealm commented 3 years ago

I'm not sure why this issue is closed... capturing an area (region) crashes the shell (40) instantly also with a version compiled from master branch.

OttoAllmendinger commented 3 years ago

@oatmealm please open a new bug for this issue and include any logs you can find

journalctl --user /usr/bin/gjs -f

and

journalctl --user /usr/bin/gnome-shell -f