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 360219 - Warning when running gedit in a terminal
Warning when running gedit in a terminal
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.16.x
Other Linux
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-06 16:55 UTC by Mike
Modified: 2006-10-07 12:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
patch (2.22 KB, patch)
2006-10-07 09:40 UTC, Paolo Borelli
committed Details | Review

Description Mike 2006-10-06 16:55:14 UTC
I'm using Ubuntu Edgy as my Linux distribution. WHen I open gedit from a terminal, after closing it these warnings appear:

sys:1: Warning: invalid uninstantiatable type `(null)' in cast to `GeditPanel'

** (gedit:5543): CRITICAL **: _gedit_panel_get_active_item_id: assertion `GEDIT_IS_PANEL (panel)' failed

** (gedit:5543): CRITICAL **: _gedit_panel_get_active_item_id: assertion `GEDIT_IS_PANEL (panel)' failed

Nothing strange happens when running gedit, just after closing it.
Comment 1 Paolo Borelli 2006-10-06 17:27:01 UTC
D'oh. My fault.

This happens if you don't have any plugin adding a bottom pane, so that window->priv->bottom_pane is NULL.

Comment 2 Paolo Borelli 2006-10-06 17:42:05 UTC
On closer inspection the bug is trickier than that: the problem is that we the save-state (save active panel page, save panel size, etc) on window::destroy(), however destroy may run more than once, so the second time it tryes to get the active page of panels which have already been destroyed. This also explain why I didn't see the problem, using other plugins even not related to panels affect the refcount of window and thus the destruction of its children.

This may also explain why from time to time the size of the bottom pane is wrong on startup.


I'll try to fix it tomorrow.
Comment 3 Sebastien Bacher 2006-10-06 22:59:28 UTC
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/gedit/+bug/63534
Comment 4 Paolo Borelli 2006-10-07 09:40:49 UTC
Created attachment 74195 [details] [review]
patch

patch fixing the issue.

I was looking for a cleaner alternative than using a flag, but I couldn't find a suitable signal emitted just once when the window is closed. "delete-event" comes near but as far as I can see it's not emitted when the window is destroyed programmatically.

A flag is not so bad afterall
Comment 5 Paolo Borelli 2006-10-07 10:16:38 UTC
committed.
Comment 6 Sebastien Bacher 2006-10-07 12:54:03 UTC
thank you for quick fix, I've uploaded a package with the patch to Ubuntu edgy