CMB / edbrowse

A command-line editor and web browser.
Other
344 stars 31 forks source link

assertion fault on FreeBSD #53

Closed alfonsosiciliano closed 4 years ago

alfonsosiciliano commented 4 years ago

Hello,

I'm the FreeBSD maintainer of edbrowse, an user reported this problem:

% edbrowse .ebrc: unrecognized keyword linelength at line 49 edbrowse ready b www.freebsd.org 25613 Assertion failed: (option_defs[ optId ].type == TidyBoolean), function prvTidySetOptionBool, file config.c, line 397. Abort (core dumped)

I found the problem via lldb and printf() :-) the line 219 of src/html-tidy.c https://github.com/CMB/edbrowse/blob/master/src/html-tidy.c#L129 I commented the line to patch the FreeBSD port, now it runs, maybe we could find more intelligent solution

Alfonso

eklhad commented 4 years ago

This is just a guess on my part, so hang on.

html-tidy.c line 129 is tidyOptSetBool(tdoc, TidyStyleTags, no);

I added this line in May. TidyStyleTags is a relatively recent option in the html tidy system. You don't get a compile error, so you must be compiling against a recent version, with recent headers. Let's say TidyStyleTags is 17. But perhaps you are linking against a slightly older tidy library. Most distros have some version of tidy installed in them. That library might only have 16 options. So when it is passed the number 17, which is out of range, it indelicately asserts.

tidy --version

Some folks have had to remove the tidy library and exec in their distro and put in the newer, which they used to compile edbrowse. Leaving both versions in is chancy.

Honestly, your solution of just commenting that line out isn't terrible. It won't change very much. But yes it is unnerving to have to do that.

Karl Dahlke

alfonsosiciliano commented 4 years ago

Probably you are right: I' m linking a totally wrong library because FreeBSD has 2 libtidy,

the CMakeList.txt finds libtidy.so -> libtidy-0.99.so.0 while the right library is libtidy5.so -> libtidy.so.5 -> libtidy.so.5.7.28 from https://github.com/htacg/tidy-html5

I' ll test.

Alfonso Siciliano

alfonsosiciliano commented 4 years ago

... fix: https://github.com/CMB/edbrowse/pull/54