Closed
Bug 68158
Opened 25 years ago
Closed 25 years ago
gtk embed crashes when you open more than one window and then close two of them
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.8
People
(Reporter: blizzard, Assigned: blizzard)
Details
(Whiteboard: critical for mozilla 0.8)
Attachments
(1 file)
|
1.31 KB,
patch
|
Details | Diff | Splinter Review |
If you do a window.open() in the embedding widget ( open a window
progromatically ) and you close the last window it will die in an X error. Bad
mojo.
| Assignee | ||
Updated•25 years ago
|
Whiteboard: critical for mozilla 0.8
Target Milestone: --- → mozilla0.8
| Assignee | ||
Comment 1•25 years ago
|
||
There's an easier way to crash it. Open up three or four windows and then close
two of them. It falls right over. You don't even have to load any pages. The
easiest way to do this is in TestGtkEmbed with the menu.
I'm not making a lot of headway into this. It's apparently some kind of
ordering problem with closing windows that I can't figure out. jst, can you
have a quick look?
Summary: gtk embed crashes when the last window closes after a window.open() has happened → gtk embed crashes when you open more than one window and then close two of them
Comment 2•25 years ago
|
||
Blizzard, I had a look but I can't reproduce this on my system, I opened up 10+
windows using the menu, closed a few of those, opened up a handful of windows
with window.open(), closed some more windows, opened a few more with the menu,
closed all of these windows, no crash, what am I doing wrong?
| Assignee | ||
Comment 3•25 years ago
|
||
Was it a debug build?
Comment 4•25 years ago
|
||
Nope, optimized, does this happen in debug builds only?
| Assignee | ||
Comment 5•25 years ago
|
||
Maybe. I have to be honest - I haven't tried it in an optimized build yet.
It's going to take me a while to generate that. In any case it makes debugging
other problems much harder.
In any case, here's some more information. This happens when you close the
second window. However, on the first window close there's a gdk warning:
Gdk-WARNING **: GdkWindow 0x3400035 unexpectedly destroyed
You get this warning when gdk gets a DestroyNotify and no one has explicitly
called gdk_destroy_window() on the window. This means that a child window is
being destroyed ( maybe an nsWindow ) without the Destroy() method being called
on it.
Strange stuff. I'm digging more.
Comment 6•25 years ago
|
||
Dan, any ideas about this? Blizzard, I won't be able to look into this until
Monday at the earliest, I'll be out of town most of this weekend.
| Assignee | ||
Comment 7•25 years ago
|
||
OK, major clue. The offscreen window is being destroyed. This is probably the
reason why it dies on the second window. What I don't know is why the offscreen
window is getting destroyed. Still looking...
| Assignee | ||
Comment 8•25 years ago
|
||
| Assignee | ||
Comment 9•25 years ago
|
||
I've attached a patch that fixes the problem. The patch is scary for the one
simple reason that I don't know how it works.
I worked on this for several hours and I couldn't find the reason that the
offscreen window was being destroyed. It was never explicitly destroyed by an
XDestroyWindow() call so the only thing that I can think of is that there's
something going on that I just don't understand.
In any case I'd like to get this in since it fixes the problem.
| Assignee | ||
Comment 10•25 years ago
|
||
So, the more that I think about this the more that I think that it's a good
thing to fix anyway. A dangling gdk window with no gtk widget anywhere in the
heirarchy is a bad thing.
Pav or bryner, can you review this for me? I'd like to get it into the tree.
Comment 11•25 years ago
|
||
r=bryner
Comment 12•25 years ago
|
||
sr=alecf
| Assignee | ||
Comment 13•25 years ago
|
||
Checked in on the tip and on the 0.8 branch.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•