GNOME Bugzilla – Bug 79413
spontaneous crash in gnome-terminal with transparent background [zvt_background_set]
Last modified: 2004-12-22 21:47:04 UTC
Package: gnome-terminal Severity: critical Version: 1.9.3 Synopsis: spontaneous crash Bugzilla-Product: gnome-terminal Bugzilla-Component: general BugBuddy-GnomeVersion: 2.0 (1.114.0) Description: Description of Problem: terminal window was behind another window and not focused and it crashed. The background had not been changed recently either; the terminal was set to transparency. This is with a build from the 19th of April. It looks sort of similar to bug 75340 but isn't the same trace. Debugging Information: Backtrace was generated from '/usr/bin/gnome-terminal' [New Thread 1024 (LWP 20596)] 0x408ce319 in __wait4 () from /lib/libc.so.6
+ Trace 21120
Thread 1 (Thread 1024 (LWP 20596))
------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-04-21 14:38 ------- Reassigning to the default owner of the component, hp@redhat.com.
Saw this again this evening :/
Hmm, I think libzvt wins this bug. ;-)
Reassigning.
*** Bug 79705 has been marked as a duplicate of this bug. ***
*** Bug 79715 has been marked as a duplicate of this bug. ***
*** Bug 79887 has been marked as a duplicate of this bug. ***
*** Bug 80181 has been marked as a duplicate of this bug. ***
Moving to urgent because of the number of duplicates.
*** Bug 80189 has been marked as a duplicate of this bug. ***
Not puntable.
*** Bug 81598 has been marked as a duplicate of this bug. ***
*** Bug 80421 has been marked as a duplicate of this bug. ***
*** Bug 81190 has been marked as a duplicate of this bug. ***
*** Bug 81876 has been marked as a duplicate of this bug. ***
I am not able to reproduce the bug with the steps mentioned in the above dup bugs (ex setting terminal bakcground to transparent ..). But when I repeatedlly try to drag and drop the files from nautilus to archive-generator/desktop the whole desktop hangs, once I kill the nautilus it will be fine. I tested with the latest cvs source.
I think this bug happened because the background was not unloaded when a ZvtTerm object was destroyed, so the property filter for the root window pointing to the destroyed object still existed when the background was changed (by some strange reason when playing around with nautilus). Note the crash is at background.c:638, which was (before last commit): struct _zvtprivate *zp = _ZVT_PRIVATE(term); This should not happen again now that the background is unloaded at destruction time (and del_winwatch is called). Some of the duplicate bugs had a different backtrace though, related to resizing the window. I think those are a different thing: the ZvtTerm widget is unrealized when the configure event handler (which is connected to the toplevel) is called, and the handler expects the widget to have a GdkWindow. This doesn't happen right now probably because the handler is correctly destroyed when the widget is destroyed (zvt_term_update_toplevel_watch is called in zvt_term_destroy). But this still is a problem if the widget is unrealized for some reason. Also, the widget is assumed to be realized at zvt_background_set. I propose the following trivial patch to correct these.
Created attachment 8560 [details] [review] Check if the widget is realized in zvt_background_set and zvt_configure_window
Just for the record, I have just confirmed my suspicion. I commented out the code which unloads the background at destruction (lines 788 and 789 from zvtterm.c) and I could reproduce the bug. Just open a terminal, open a second tab (or another window), close it and change the background. Crashes at background.c:644 (same line as before). Again, this is because the property filter handler is not disconnected, so it points to a destroyed object.
i can't reproduce with these instructions... 1. from one terminal, run 'gnome-terminal --disable-factory' 2. set the profile of this terminal to one which has a transparent background 3. make a new tab, set this to the trans. profile 4. close 2nd tab 5. change bg is this exactly what you're doing?
Did you comment out the code in zvt_term_destroy which unloads the background? If the background is unloaded it works fine, but this was fixed a couple of days ago (patch from #79930, you applied it iirc). So, this shouldn't happen any more.
ok... so is this FIXED or not?
Yes, I think it is.
Marking fixed, then; I'll be switching back to a transparent terminal and working from there, so we'll see :)