site  contact  subhomenews

HelpSurfer crash fixed

February 21, 2020 — BarryK

I posted about HelpSurfer crashing, and a workaround:

I received an email from James ('jamesbond' in the Puppy Forum). James investigated a simple HTML viewer based on libgtkhtml, back in 2015:

Here is an extract of James' email:

Your discovery of HelpSurfer a couple of years ago triggered me to find something similar.
I found gtkhtml-browser and the latest patched version of libgtkhtml.
The source for both of these are now long gone.

I took the code, replaced the http-client backend, and spent hours and hours of fixing and debugging, to try to make it a bit more stable. I believe I have done that, but "for simple pages only!". The main source of the crash is the CSS parser - it is horrible, and should have been re-written, but I have no appetite for that.

Here is my blog report about it:

Here is the updated libgtkhtml:
Here is the browser:

You need curl and libxml2 to build it.

Here is how to compile it, to use the system shared libgtkhtml

cd /tmp/gtkhtml-browser*
install -m755 browser /usr/bin/htmlviewer

Or if build it like this:


it will build the browser using the static library from the included libgtkhtml in the source.

The included libgtkhtml is the same as the version 2.12 above - so if it is used elsewhere (e.g. Osmo), I suggest you updated it to version 2.12 and build the system shard libs instead.


I just re-read the readme that I wrote in 2015 (it's included in the libgtkhtml 2.12 source), and to my amazement, the sources of this final SVN copy of libgtkhtml is still preserved by yocto.

My copy of 2.12 has a few other stability patches in addition to those, though. Mainly on the CSS part :)

OK, I compiled James' libgtkhtml 2.12 in EasyOS 2.2.11. Uploaded the source here:

The compiled PETs here:

Now for the really great news -- the previous problem with crashing has been fixed!

The problem was that the hyperlink in /usr/share/doc/easy/help.htm:

<td valign="top"><b><a href="/usr/share/doc/easy/welcome.htm">welcome</a></b>

...crashed 'surfer', yet, opening welcome.htm directly did not crash:

# surfer 
The work that James has done on libgtkhtml has fixed it. James, you are a genius! And you have saved HelpSurfer. It lives on. 

Tags: easy