After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744385 - Detaching tab cause crash in Windows
Detaching tab cause crash in Windows
Status: RESOLVED INVALID
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
3.14.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-02-12 11:22 UTC by Bakhtiar Hasmanan
Modified: 2015-02-13 17:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bakhtiar Hasmanan 2015-02-12 11:22:42 UTC
GTK 3.14.8 With MyPaint as Application.
referenced bugreport: https://github.com/mypaint/mypaint/issues/194

When detaching a tab into floating window, mypaint crashed with:
Gtk-CRITICAL **: gtk_widget_get_frame_clock: assertion 'GTK_IS_WIDGET (widget)' failed

backtrace also there in mypaint bugreport (not useful I think).

I suspect https://bugzilla.gnome.org/show_bug.cgi?id=732051 bugfix cause this new issue. 

Reverting the change in gtknotebook.c to 3.14.7 enough to prevent crash although the error message also relate to changes in gtkdnd.c
Comment 1 Bakhtiar Hasmanan 2015-02-12 11:39:32 UTC
However I can't reproduce this with testnotebookdnd.c which came with gtk's tests
Comment 2 Matthias Clasen 2015-02-12 12:04:36 UTC
There's something going wrong here, causing the drag cancel animation to be triggered in a case when it shouldn't. I see the animation also when dragging tabs between windows in gedit.
Comment 3 Matthias Clasen 2015-02-12 12:50:49 UTC
I can't even figure out how to open multiple tabs in mypaint, so reproducing this may be a challenge...
Comment 4 Bakhtiar Hasmanan 2015-02-12 12:55:15 UTC
Try Menu Layer > Layer Window

Right pane will show layer stacks window, there you could try drag the icon (tab) out from pane.
Comment 5 Matthias Clasen 2015-02-12 13:14:51 UTC
Arr, the mypaint in Fedora is using gtk2, so that won't reproduce your problem anyway.
Comment 6 Bakhtiar Hasmanan 2015-02-12 23:38:09 UTC
I'm sorry can't help you with Fedora packaging (not a linux user at all) but one of mypaint dev said that Ubuntu PPA is working with latest mypaint-git.
Comment 7 Matthias Clasen 2015-02-13 01:31:02 UTC
Sadly, building mypaint didn't succeed here either. So, I can only give some advice from glancing at the code. I found this in gui/workspace.py:

        def _create_window_cb(self, notebook, page, x, y):
            # Dragging into empty space creates a new stack in a new window,
            # and stashes the page there.
            win = ToolStackWindow()
            self._toolstack.workspace.floating_window_created(win)
            win.stack.workspace = self._toolstack.workspace
            self.remove(page)
            w, h = page.__prev_size
            new_nb = win.stack._get_first_notebook()
            tool_widget = page.get_child()
            page.remove(tool_widget)
            new_nb.append_tool_widget_page(tool_widget)
            new_placeholder = win.stack._append_new_placeholder(new_nb)
            new_paned = new_placeholder.get_parent()
            new_paned.set_position(h)
            # Initial position. Hopefully this will work.
            win.move(x, y)
            win.set_default_size(w, h)
            win.show_all()

This is suspicious, and does not quite follow the intended semantics of create-window:

   * A handler for this signal can create a window containing
   * a notebook where the tab will be attached. It is also
   * responsible for moving/resizing the window and adding the
   * necessary properties to the notebook (e.g. the
   * #GtkNotebook:group-name ).

The idea is that the signal handler creates a window with a notebook in it, and returns the notebook, but doesn't actually move the tab over itself.

If you want to keep doing the moving of the tab yourself, you might have more luck using the new gtk_notebook_detach_tab() function instead of gtk_container_remove().
Comment 8 Matthias Clasen 2015-02-13 01:40:33 UTC
forgot to mention: I just added gtk_notebok_detach_tab() an hour ago...
Comment 9 Matthias Clasen 2015-02-13 01:46:45 UTC
so that new function won't help you in 3.14.x