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 133584 - Occasional loss of window decorations
Occasional loss of window decorations
Status: RESOLVED DUPLICATE of bug 145131
Product: metacity
Classification: Other
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 138661 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-06 02:09 UTC by Luke Hutchison
Modified: 2005-01-26 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
no window decorations (261.69 KB, image/png)
2004-02-06 21:52 UTC, Luke Hutchison
Details
with window decorations (260.46 KB, image/png)
2004-02-06 21:52 UTC, Luke Hutchison
Details
the debug file (427.74 KB, text/plain)
2004-02-07 00:34 UTC, Luke Hutchison
Details

Description Luke Hutchison 2004-02-06 02:09:01 UTC
I encounter a strange bug with Metacity sometimes when I am launching a
program (specifically, launching "acroread" from an Emacs compile process),
in which the window decorations do not show, and the window doesn't get
input focus.  It doesn't always happen, but when it does it's a pain
because I can't resize the window etc.

To reproduce:  From emacs, type "M-x compile (Ret) acroread file.pdf".  You
might have to do it a few times, as it is an intermittent problem.

I don't know if this is a Metacity thing, or an Acrobat Reader thing, or an
Emacs thing, but Metacity probably should never let this happen.  It's a
very rare confluence of events for the average user though, so I imagine
it's low priority, but it might illustrate something fundamental that's out
of whack.
Comment 1 Rob Adams 2004-02-06 16:42:52 UTC
Is it just acrobat reader that has no decorations, or all windows? 
That is, did metacity just crash?
Comment 2 Luke Hutchison 2004-02-06 18:01:45 UTC
Just Acrobat reader.  Doesn't look like a crash.  I also tried gedit,
launched from "M-x compile", and couldn't get it to do the same thing.
Comment 3 Luke Hutchison 2004-02-06 21:51:24 UTC
Hmm.  Here's a simplification of the usage case: the same thing
happens if I launch acroread from the terminal.  I don't think it used
to do that.  It is still intermittent, so it may be a race condition.

Attaching two screenshots, with and without window decorations.
Comment 4 Luke Hutchison 2004-02-06 21:52:17 UTC
Created attachment 24161 [details]
no window decorations
Comment 5 Luke Hutchison 2004-02-06 21:52:51 UTC
Created attachment 24162 [details]
with window decorations
Comment 6 Luke Hutchison 2004-02-06 21:53:36 UTC
N.B. Metacity version is 2.6.4.
Comment 7 Luke Hutchison 2004-02-06 21:57:20 UTC
Is this helpful?

$ metacity --replace
 
(metacity:13194): GLib-CRITICAL **: file gstrfuncs.c: line 2129
(g_strsplit): assertion `string != NULL' failed
 
(metacity:13194): GLib-CRITICAL **: file gstrfuncs.c: line 2241
(g_strjoinv): assertion `str_array != NULL' failed

--

No additional errors are reported on the terminal when the decorations
fail to show up.
Comment 8 Rob Adams 2004-02-06 22:02:34 UTC
bizarre.  I use acroread all the time and I've never seen that happen.
 Is it perhaps just that theme?

Is that acroread 5.08?
Comment 9 Luke Hutchison 2004-02-06 23:42:34 UTC
Yes, same version.  And it's not doing it now either, without me
changing anything at all -- but I've seen this sporadically for the
last 2 months (usually many times a day) so I'm sure it'll come back :o)

I can't seem to turn any debug info on for Metacity -- is there a way
to do it?
Comment 10 Rob Adams 2004-02-06 23:46:54 UTC
run:

METACITY_VERBOSE=1 METACITY_USE_LOGFILE=1 metacity--replace &

then reproduce the problem, then restart metacity again with:

metacity --replace

You'll end up with a very very verbose debug spew in a file call
/tmp/metacity-[something].  gzip the file and attach it to this bug
report if you can get the problem reproduced again.

The only thing that I could possibly think of is that metacity
incorrectly decides that acroread is a borderless window.
Comment 11 Luke Hutchison 2004-02-07 00:34:23 UTC
Created attachment 24169 [details]
the debug file
Comment 12 Luke Hutchison 2004-02-07 00:36:08 UTC
Here it is -- I got the problem again.  The window you want comes up
as "(Fast Regis)" in the debug file.  Interestingly, by the time I had
gone through the two steps that you outlined, then pressed Ctrl-C to
kill the last version of Metacity and restart it for the third time,
the window decorations were back, and I don't know when they appeared.
 Can you see anything unusual in the debug file?
Comment 13 Luke Hutchison 2004-02-25 02:26:59 UTC
Looks like a Heisenbug -- it goes away if you look at it :)

I added the debug commands again after upgrading to Metacity 2.7.0,
and never had the problem once in 2 days.  Then I stopped running
Metacity in debug mode, and the problem came back.

It must be a race condition.  I hope there is some info in the log
file I attached above, because catching this with all the debug stuff
turned on is very difficult.
Comment 14 Elijah Newren 2004-12-30 18:08:25 UTC
*** Bug 138661 has been marked as a duplicate of this bug. ***
Comment 15 Elijah Newren 2004-12-30 18:11:50 UTC
There are some warnings that valgrind lists relating to uninitialized variables
and in dealing with the frame (i.e. decoration) code.  See bug 153338 (which was
marked as fixed merely because I was able to fix some of the issues, but I
didn't have the patience/time/understanding/desire to track down the other
problems).  It appears that running metacity under valgrind requires around
1.5GB of ram so most probably won't be able to do so, but I can generate a new
log upon demand.
Comment 16 Havoc Pennington 2004-12-30 19:13:04 UTC
The log file Luke posted claims that the windows were decorated correctly, so if
the bug happened during that log slice the problem would have to be something
like the X reparent into the frame failing, though that sounds far-fetched.

Those valgrind errors look like they would have to be a GDK bug - the args
metacity passes to gdk_window_new() are fully initialized as far as I can see.

Comment 17 Elijah Newren 2004-12-30 22:01:23 UTC
Havoc: uninitialized variables don't trigger errors in valgrind upon copy (e.g.
passing the varible to another function) until they are used for something such
as printing or such.  Thus, the valgrind stack trace is usually much deeper in
some other function than where the uninitialized variable really occurs.  See
the other bugs I fixed in 153338 for two examples.  While it's possible those
are uninitialized variables in gdk instead of metacity, I think it's likely that
they really are metacity problems.  Especially since I'm sure other programs
utilizing g_hash and such have already been valgrinded...
Comment 18 Havoc Pennington 2004-12-30 22:44:50 UTC
What I'm saying is just that if we pass only fully-initialized stuff to
gdk_window_new() then it must get uninitialized stuff from elsewhere.

The elsewhere could be some sort of global variable that metacity has affected,
of course.
Comment 19 Elijah Newren 2005-01-25 16:01:01 UTC
Bug 145131 has a simple test program that one can run, and which fairly often
results in at least one of the windows that it displays not getting decorations.
 I believe these two bugs are dupes, and that the test program from 145131 will
hopefully help us be able to track this down (I can at least duplicate at will
now, and valgrind does appear to give some warnings when that program is run,
though I haven't had much time to look into it...)
Comment 20 Elijah Newren 2005-01-26 16:55:54 UTC
I'm going to go ahead and mark this as a duplicate of 145131...

*** This bug has been marked as a duplicate of 145131 ***