Bug 1187849 - Taskcoach fails to launch on Rawhide if pygtk2 is installed
Summary: Taskcoach fails to launch on Rawhide if pygtk2 is installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: taskcoach
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1233164 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-31 03:24 UTC by Scott Talbert
Modified: 2015-11-17 18:22 UTC (History)
12 users (show)

Fixed In Version: taskcoach-1.4.2-3.fc23 taskcoach-1.4.2-3.fc22
Clone Of:
Environment:
Last Closed: 2015-11-17 15:51:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix for notifications on GTK3 (1.76 KB, patch)
2015-06-01 04:31 UTC, Scott Talbert
no flags Details | Diff
Fix for GTK3 v2 (3.65 KB, patch)
2015-06-19 00:48 UTC, Scott Talbert
no flags Details | Diff
GTK3 patch v3 (3.76 KB, patch)
2015-07-28 01:49 UTC, Scott Talbert
no flags Details | Diff

Description Scott Talbert 2015-01-31 03:24:33 UTC
If pygtk2 is installed, taskcoach fails to launch:

[talbert@localhost ~]$ taskcoach
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_set_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type 'GtkWidget'
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type 'GtkBuildable'
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_once_init_leave: assertion 'result != 0' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_register_static: assertion 'parent_type > 0' failed
  from gtk import _gtk

If you remove pygtk2, it will launch.  I believe this is due to the fact that wxPython is now using a GTK+3 backend, so when pygtk tries to load GTK+2 libraries, there is a conflict.

Comment 1 Jaroslav Reznik 2015-03-03 16:48:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 crius 2015-05-31 09:39:22 UTC
I have just upgraded from Fedora 21 to 22. Trying to launch TaskCoach generates the same error as reported by Scott Talbert.

I can't remove pygtk2, as there are other packages that are dependent on it.
Are there any other workarounds? I've been using TaskCoach on a daily basis and now I can't launch it at all.

Comment 3 Scott Talbert 2015-05-31 23:18:46 UTC
As another workaround, you might be able to downgrade wxPython to 2.8.

I'll try to work on a patch for this.

Comment 4 Scott Talbert 2015-06-01 04:31:59 UTC
Created attachment 1033115 [details]
Fix for notifications on GTK3

OK, I've got a patch.  Can you give this a try?  It should resolve the launch problem but can you make sure notifications work as that was the area of code that was changed.  Also, please make sure the app is functional otherwise.

Comment 5 Scott Talbert 2015-06-07 00:24:00 UTC
@crius, are you able to try my patch?

Comment 6 Stefan Hoelldampf 2015-06-18 18:49:10 UTC
(In reply to Scott Talbert from comment #4)
> Created attachment 1033115 [details]
> Fix for notifications on GTK3
> 
> OK, I've got a patch.  Can you give this a try?  It should resolve the
> launch problem but can you make sure notifications work as that was the area
> of code that was changed.  Also, please make sure the app is functional
> otherwise.

I have applied your patch to the following file:

# rpm -qf /usr/lib/python2.7/site-packages/taskcoachlib/notify/notifier_libnotify.py
taskcoach-1.4.2-1.fc22.noarch

pygtk2-2.24.0-11.fc22.x86_64 is also installed as a dependency of other packages.

/usr/bin/taskcoach does not start:

$ /usr/bin/taskcoach 
Traceback (most recent call last):
  File "/usr/bin/taskcoach", line 72, in <module>
    start()
  File "/usr/bin/taskcoach", line 63, in start
    app = application.Application(options, args)
  File "/usr/lib/python2.7/site-packages/taskcoachlib/patterns/singleton.py", line 29, in __call__
    class_.instance = super(Singleton, class_).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/taskcoachlib/application/application.py", line 117, in __init__
    self.init(**kwargs)
  File "/usr/lib/python2.7/site-packages/taskcoachlib/application/application.py", line 214, in init
    from taskcoachlib import gui, persistence
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/__init__.py", line 20, in <module>
    from mainwindow import MainWindow
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/mainwindow.py", line 23, in <module>
    from taskcoachlib.gui import viewer, toolbar, uicommand, remindercontroller, \
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/viewer/__init__.py", line 19, in <module>
    from task import TaskViewer, TaskStatsViewer, CheckableTaskViewer, \
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/viewer/task.py", line 27, in <module>
    from taskcoachlib.gui import uicommand, menu, dialog
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/uicommand/__init__.py", line 21, in <module>
    from uicommand import *
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/uicommand/uicommand.py", line 26, in <module>
    from taskcoachlib.gui import dialog, printer
  File "/usr/lib/python2.7/site-packages/taskcoachlib/gui/printer.py", line 29, in <module>
    gtk.remove_log_handlers()
  File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 62, in __getattr__
    raise AttributeError(_static_binding_error)
AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
$

Comment 7 Scott Talbert 2015-06-19 00:48:40 UTC
Created attachment 1040695 [details]
Fix for GTK3 v2

OK, so I forgot I had modified a few other files which had GTK2 references.  Please try patch v2.

Comment 8 Steven Hadfield 2015-06-19 03:45:17 UTC
I saw the initial errors posted above and tried the v2 patch, but taskcoach still doesn't fully load. I see the splash screen now, but the following errors:

$ taskcoach 
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'height >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:accel-group is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_visual_get_green_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_visual_get_blue_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_visual_get_depth: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed



The last message continues endlessly. I also tried uninstalling pygtk2, but I still see the issue. I just upgraded from F20 to F22, so I'm not sure if there's any other packages that may be conflicting.

Comment 9 Scott Talbert 2015-06-19 04:19:03 UTC
Interesting.  It launches OK for me with most of those warnings, but I don't get this one:

(taskcoach:6312): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

You say that one repeats over and over endlessly?

I wonder what is different about your system.  Standard GNOME-3 desktop, or something else?

Comment 10 Steven Hadfield 2015-06-19 16:14:08 UTC
GNOME 3 laptop.
I tried again today and I'm no longer seeing the last error, but the taskcoach screen still isn't showing.

Comment 11 Scott Talbert 2015-06-19 20:18:00 UTC
What is the last error you see now?

Comment 12 Steven Hadfield 2015-06-23 15:25:23 UTC
$ taskcoach 
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'height >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:accel-group is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:7899): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -4 and height 21

(taskcoach:7899): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:7899): Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:7899): Gdk-CRITICAL **: gdk_visual_get_green_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:7899): Gdk-CRITICAL **: gdk_visual_get_blue_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:7899): Gdk-CRITICAL **: gdk_visual_get_depth: assertion 'GDK_IS_VISUAL (visual)' failed

Comment 13 Scott Talbert 2015-06-25 20:55:57 UTC
*** Bug 1233164 has been marked as a duplicate of this bug. ***

Comment 14 Stefan Hoelldampf 2015-06-27 14:51:45 UTC
(In reply to Scott Talbert from comment #7)
> Created attachment 1040695 [details]
> Fix for GTK3 v2
> 
> OK, so I forgot I had modified a few other files which had GTK2 references. 
> Please try patch v2.

Taskcoach works now with this patch applied.

The following messages still appear:

$ /usr/bin/taskcoach 
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'height >= -1' failed

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'height >= -1' failed

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

(taskcoach:16914): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)
/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:12027: Warning: The property GtkImageMenuItem:accel-group is deprecated and shouldn't be used anymore. It will be removed in a future version.
  return _core_.Menu_AppendItem(*args, **kwargs)

(taskcoach:16914): Gdk-CRITICAL **: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_green_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_blue_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_depth: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_green_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_blue_pixel_details: assertion 'GDK_IS_VISUAL (visual)' failed

(taskcoach:16914): Gdk-CRITICAL **: gdk_visual_get_depth: assertion 'GDK_IS_VISUAL (visual)' failed

Comment 15 Scott Talbert 2015-06-28 01:49:11 UTC
@Stefan, thanks.  I see all those errors too, but they seem to not be fatal.  I'll try to investigate them further.

@Steven, I'm thinking perhaps you may be seeing a different bug, given that my patch works for some people?

Comment 16 Steven Hadfield 2015-06-28 07:05:19 UTC
@Scott I was starting to come to the same conclusion. Do you have any recommendations of additional info that I could include to help if I open a separate bug?

Comment 17 Scott Talbert 2015-06-28 14:30:08 UTC
@Steven, here are a couple of ideas:

a) Try running run "LANG=C python -mtrace --trace /usr/bin/taskcoach > log.txt 2>&1" and attach the output.

b) See if the problem goes away if you downgrade wxPython to version 2.8.  Note that F22 probably doesn't have a wxPython 2.8 package so you may have to grab the latest one from F21.  I think it should be relatively self contained, so this should be the only package you have to downgrade.

Comment 18 Scott Talbert 2015-06-28 14:30:49 UTC
BTW, reported this bug upstream, no response yet:
https://sourceforge.net/p/taskcoach/bugs/1593/

Comment 19 Ivan Romanov 2015-07-25 12:49:22 UTC
I got such error with gtk patch V2.

  File "/usr/lib/python2.7/site-packages/taskcoachlib/render.py", line 228, in <module>
    if 'gtk3' not in wx.PlatformInfo:
NameError: name 'wx' is not defined

After I added import wx to render.py I can start taskcoach.

Comment 20 Ivan Romanov 2015-07-25 12:55:23 UTC
Thanks for patch! It's worked for me. Now I can have installed both gimp and taskcoach in the same time!

Comment 21 Scott Talbert 2015-07-28 01:49:23 UTC
Created attachment 1056823 [details]
GTK3 patch v3

Ivan, good catch!  I fixed render.py and updated the patch.

I'll see if I can flag down someone with SCM rights to this package to include the patch.

Comment 22 Juan Jimenez 2015-07-31 13:34:22 UTC
Path works brilliantly well. Tested with Fedora 22. Libnotify works fine with gnome too

Comment 23 Viktor Pogrzebacz 2015-10-04 11:56:33 UTC
Thank you for the patch, it worked perfectly for me on Fedora 22.

Comment 24 Scott Talbert 2015-10-07 00:28:54 UTC
I applied for commitacls for the package.  Hopefully Tomas will approve soon so I can get this patch incorporated for everyone.

Comment 25 Fedora Update System 2015-11-06 04:12:21 UTC
taskcoach-1.4.2-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-98db4e2b64

Comment 26 Fedora Update System 2015-11-08 12:27:14 UTC
taskcoach-1.4.2-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update taskcoach'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b5c2eac8b3

Comment 27 Fedora Update System 2015-11-08 13:25:05 UTC
taskcoach-1.4.2-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update taskcoach'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-98db4e2b64

Comment 28 Juan Jimenez 2015-11-09 23:54:43 UTC
Just installed it from the updates-testing repo in a fresh install of Fedora 23. It works as expected.

Comment 29 Fedora Update System 2015-11-17 15:51:23 UTC
taskcoach-1.4.2-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2015-11-17 18:22:44 UTC
taskcoach-1.4.2-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.