[patch] segfault when closing window while it is loading
Happy new year! Below is a small patch to fix a crash that happens when I open a new window (e.g. with the middle mouse button) and close it immediately while it is still loading the page. Johannes --- a/src/uicmd.cc Mon Dec 31 22:49:02 2007 +0100 +++ b/src/uicmd.cc Tue Jan 01 12:38:14 2008 +0100 @@ -125,6 +125,7 @@ void a_UIcmd_close_bw(void *vbw) Layout *layout = (Layout*)bw->render_layout; MSG("a_UIcmd_close_bw\n"); + a_Bw_stop_clients(bw, BW_Root + BW_Img + Bw_Force); ui->destroy(); delete(layout); a_Bw_free(bw);
On Tue, Jan 01, 2008 at 12:44:55PM +0100, Johannes Hofmann wrote:
Happy new year!
8-)
Below is a small patch to fix a crash that happens when I open a new window (e.g. with the middle mouse button) and close it immediately while it is still loading the page.
Johannes
--- a/src/uicmd.cc Mon Dec 31 22:49:02 2007 +0100 +++ b/src/uicmd.cc Tue Jan 01 12:38:14 2008 +0100 @@ -125,6 +125,7 @@ void a_UIcmd_close_bw(void *vbw) Layout *layout = (Layout*)bw->render_layout;
MSG("a_UIcmd_close_bw\n"); + a_Bw_stop_clients(bw, BW_Root + BW_Img + Bw_Force); ui->destroy(); delete(layout); a_Bw_free(bw);
It looks OK, but I can't make mine crash... Do you have an example URL? -- Cheers Jorge.-
Jorge wrote:
On Tue, Jan 01, 2008 at 12:44:55PM +0100, Johannes Hofmann wrote:
Below is a small patch to fix a crash that happens when I open a new window (e.g. with the middle mouse button) and close it immediately while it is still loading the page.
It looks OK, but I can't make mine crash... Do you have an example URL?
I used to get this with any http url, but the patch fixes it for them. With file urls, there's something else that still breaks when the layout is being deleted. The interesting part of the backtrace for that goes: #4 0x40345f00 in abort () from /lib/libc.so.6 #5 0x0809928c in misc::assertNotReached () at misc.hh:67 #6 0x080a87cd in object::Object::equals (this=0x8356b00, other=0x8356b00) at object.cc:49 #7 0x080a526a in container::untyped::List::remove0 (this=0x827a678, element=0x8356b00, compare=true, doNotDeleteAtAll=false) at container.cc:254 #8 0x08084b7b in container::untyped::List::remove (this=0x827a678, element=0x8356b00) at ../lout/container.hh:169 #9 0x08084b9f in container::typed::List<dw::fltk::FltkPlatform::IdleFunc>::remove (this=0x827b260, element=0x8356b00) at ../lout/container.hh:376 #10 0x080823ec in dw::fltk::FltkPlatform::removeIdle (this=0x827ac08, idleId=4) at fltkplatform.cc:303 #11 0x0809af40 in ~Layout (this=0x827b660) at layout.cc:114 #12 0x08054937 in a_UIcmd_close_bw (vbw=0x827b210) at uicmd.cc:129
On Wed, Jan 02, 2008 at 12:25:08PM -0300, Jorge Arellano Cid wrote:
On Tue, Jan 01, 2008 at 12:44:55PM +0100, Johannes Hofmann wrote:
Happy new year!
8-)
Below is a small patch to fix a crash that happens when I open a new window (e.g. with the middle mouse button) and close it immediately while it is still loading the page.
Johannes
--- a/src/uicmd.cc Mon Dec 31 22:49:02 2007 +0100 +++ b/src/uicmd.cc Tue Jan 01 12:38:14 2008 +0100 @@ -125,6 +125,7 @@ void a_UIcmd_close_bw(void *vbw) Layout *layout = (Layout*)bw->render_layout;
MSG("a_UIcmd_close_bw\n"); + a_Bw_stop_clients(bw, BW_Root + BW_Img + Bw_Force); ui->destroy(); delete(layout); a_Bw_free(bw);
It looks OK, but I can't make mine crash... Do you have an example URL?
Here it crashes with any remote URL, that takes long enough to load so I can close the child window while it is still loading. I'm using BSD, perhaps it does not happen on Linux? Cheers, Johannes
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Wed, Jan 02, 2008 at 06:53:20PM +0100, Johannes Hofmann wrote:
It looks OK, but I can't make mine crash... Do you have an example URL?
Here it crashes with any remote URL, that takes long enough to load so I can close the child window while it is still loading. I'm using BSD, perhaps it does not happen on Linux?
Committed! (Finally it segfaulted for me with: http://chlamydia.fs.ei.tum.de/pub/DragonFly/packages/stable/DragonFly-1.10.1... ) -- Cheers Jorge.-
participants (3)
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de
-
place@gobigwest.com