FS#62864 - [catfish] Catfish fails to open main window

Attached to Project: Community Packages
Opened by (IrvineHimself) (IrvineHimself) - Monday, 10 June 2019, 15:04 GMT
Last edited by Alexander F. Rødseth (xyproto) - Tuesday, 11 June 2019, 08:25 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This applies to catfish 1.4.7-1, and seems to be the same problem reported at https://bugzilla.redhat.com/show_bug.cgi?id=1702891

When trying to launch from a terminal, the output is:

[me ~]$ /usr/bin/catfish

(catfish:1850): Gtk-WARNING **: 15:47:34.986: ../gtk/gtk/gtkwidget.c:8629: widget not within a GtkWindow
Traceback (most recent call last):
File "/usr/bin/catfish", line 42, in <module>
catfish.main()
File "/usr/lib/python3.7/site-packages/catfish/__init__.py", line 76, in main
window = CatfishWindow.CatfishWindow()
File "/usr/lib/python3.7/site-packages/catfish_lib/Window.py", line 169, in __new__
new_object.finish_initializing(builder)
File "/usr/lib/python3.7/site-packages/catfish/CatfishWindow.py", line 274, in finish_initializing
(display_width, display_height) = self.get_display_size()
File "/usr/lib/python3.7/site-packages/catfish/CatfishWindow.py", line 321, in get_display_size
m = s.get_monitor_at_window(s.get_active_window())
TypeError: Argument 1 does not allow None as a value
[me ~]$


Steps to reproduce:
Install latest Catfish and try to launch

This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Tuesday, 11 June 2019, 08:25 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Monday, 10 June 2019, 15:07 GMT
Thanks for reporting. I'm unable to reproduce the issue.

Which DE/WM do you use?
Comment by (IrvineHimself) (IrvineHimself) - Monday, 10 June 2019, 15:51 GMT
A minimal gnome-shell with wayland, xwayland and qt5-wayland. I just moved back to Arch this weekend from Fedora. So it is a completely fresh install.

Interestingly, despite the Fedora bug report, I'm fairly sure that on my old installation, Catfish was launching okay. I'm sorry, but because I wiped my hard drive before installing Arch, I cant actually check this . Although, if you like, I could install Catfish to the Fedora installation media?
Comment by Alexander F. Rødseth (xyproto) - Monday, 10 June 2019, 16:05 GMT
I see. If you install either mlocate or zeitgeist, does it launch okay?

If this is the problem I think it is, it's that catfish crashes if none of the search engine backends are installed. They are all optional dependencies.

The dilemma is if the optional dependencies should be kept optional, or if one of them should be installed by default when installing catfish.
Comment by loqs (loqs) - Monday, 10 June 2019, 16:46 GMT
Possibly https://developer.gnome.org/gtkmm/stable/classGdk_1_1Screen.html#a17229eacb4d31243f41ba18ef1d2e510 under Wayland returning null instead of a Window object.
Comment by (IrvineHimself) (IrvineHimself) - Monday, 10 June 2019, 18:14 GMT
Okay, I installed mlocate, started the timer and also ran 'sudo updatedb' just to be sure, without any result.

I then installed zeitgeist. Although the wiki describes it as a daemon, there doesn't appear to be any service associated with 'systemctl enable zeitgeist' or 'systemctl enable zeitgeistd'. Again, just to be sure, I rebooted.

The end result is that neither of them make any difference. Finally, I checked my Gnome privacy settings, they were set to retain history forever.

Comment by loqs (loqs) - Monday, 10 June 2019, 19:40 GMT
test.patch switches from get_active_window to get_root_window. Only tested on X11 appears to be functionally equivalent.
test2.patch simplifies the above and avoids using the monitor class only added in 3.22
Comment by (IrvineHimself) (IrvineHimself) - Tuesday, 11 June 2019, 03:52 GMT
Thanks @loqs, that first patch, ('test.patch',) seems to have fixed the problem. Since it appears to be working, I didn't bother checking the second patch, but if you think its important, I will.


As an aside, previously, I was unaware of how versatile makepkg is as a development tool:)

Irvine

Edit:
just in case it's important, here is the output from running a patched catfish search in the terminal:

[me Catfish-Test1patch]$ catfish

(catfish:12412): Gtk-WARNING **: 04:52:58.465: ../gtk/gtk/gtkwidget.c:8629: widget not within a GtkWindow
[me Catfish-Test1patch]$

As you can see, only the expected Gtk warnings
Comment by (IrvineHimself) (IrvineHimself) - Tuesday, 11 June 2019, 04:15 GMT
Okay, I re-read @loqs post, and realised the second patch, (test2.patch,) simplifies the code. So, I tested it and it also works fine.

Finally, I uninstalled mlocate, zeitgeist and rebooted without any problems. So both mlocate and zeitgeist can remain optional.

Thanks for your help
Irvine
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 11 June 2019, 08:24 GMT
Applied the fix from loq. The updated package will appear in [community] shortly. Please re-open if there should be further issues with this. Thanks!

(Please also report upstream to the catfish developers, if possible).

Loading...