GNOME Bugzilla – Bug 136625
assertion fails (parent_style != NULL) followed by a crash
Last modified: 2008-11-16 17:56:48 UTC
The GIMP-2.0 help-browser which is based on libgtkhtml2 crashes quite frequently when loading GIMP help pages. Every time the console output looks similar: HtmlDocument-ERROR **: file htmldocument.c: line 239 (html_document_node_inserted_traverser): assertion failed: (parent_style != NULL) aborting... The crash seems to reliable reproducable on certain help pages (gimp-tool-pencil) This could of course mean that the HTML is buggy but I don't think that this should cause the renderer to crash. I will attach a page that crashes together with the stylesheet it is using.
Created attachment 25379 [details] HTML file that crashes the renderer
Created attachment 25380 [details] stylesheet used
How do I reproduce this problem? What program do I use and where do I put the HTML file and stylesheet?
I assume there is some example libgtkhtml2 browser that you could use, isn't there? The crash occurs with the GIMP2 helpbrowser plug-in. But given that this is just a straight-forward minimal browser, it should be reproducable with any browser based on libgthkhtml2. The GIMP helpbrowser code can be found in GNOME CVS: http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gimp/plug-ins/helpbrowser
My first try woul be to use the test program testgtkhtml gtkhtml2/tests. If I try to extract the HTML file using netscape I get an error. If I use mozilla I can extract the HTML file but it does not crash in testgtkhtml. Could you email me the HTML file.
*** Bug 138275 has been marked as a duplicate of this bug. ***
I am attemping to build gimp. I have the helpbroswser built but when I attempt to run it it cannot find gimp-help.xml. What am I omitting?
You need to have gimp-help-2 installed. It's available from ftp://ftp.gimp.org/pub/gimp/help/testing/ Sorry for not replying earlier; bugzilla was down last time I tried to add this comment...
I am got the Gimp Help Browser runnning. How do I cause it to crash?
*** Bug 138400 has been marked as a duplicate of this bug. ***
*** Bug 140962 has been marked as a duplicate of this bug. ***
I am still wating for a reproducible test case. I have gimp and its help browser running but have not had it crash.
I already gave one in #140962. "Open help (F1) and click on point 3.3.2 or 3.3.3."
Try the help for the Airbrush tool. Crashes the help browser reproducibly here.
The problem seems to occur when parsing html statements of the form <img src=" /../images etc. That is when there are spaces in the string before the filename. When I remove the spaces in the files in gimp-help-2-0.2/html/en the crash went away. I have not yet determined what is causing the crash.
Created attachment 33168 [details] a more uptodate page from gimp-help-2 which reliably triggers this problem This HTML source from gimp-help-2 doesn't have spaces in the img src attribute but still triggers the assertion.
I am not sure but I think that the crash (failed assertion) always happens soon after the following warning has been output: (helpbrowser:31892): HtmlLayout-CRITICAL **: file htmlboxfactory.c: line 116 (html_box_factory_new_box): assertion `parent_box != NULL' failed (I am using a current CVS checkout of gtkhtml2.)
Ugh, I finally found out what's going wrong and it is indeed the GIMP help browser that is doing the wrong thing here. There's code to generate an error page in case a requested URL could not be loaded. That code is used from the "request_url" handler. Now what happens is that if an image is missing, a complete HTML error page is inserted where the image should have gone. This is of course the wrong thing to do. However I think that gtkhtml2 should be able to handle this and shouldn't crash. That's why I am leaving this report open for you. Lowering the priority though.
Is this still a problem? I moved some of the navigation images out of the way, but couldn't reproduce the bug.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!