[sword-devel] crashing the diatheke and more

Chris Little chrislit at crosswire.org
Mon Oct 27 18:13:31 MST 2008

Peter von Kaehne wrote:
> Running diatheke threw up a few problems, some maybe known, some
> probably not.

Diatheke is fairly old and hasn't received any real attention in about 5 
years, so there could potentially be new incompatibilities resulting 
from development of the API that has not been reflected in continuing 
development of diatheke.

I wouldn't mind doing some updates to diatheke to include support for 
GenBooks and for alternate versifications, but it would have to wait 
until my semester is over, unless someone else wants to work on it.

> 1) diatheke -v causes a segmentation fault. Not sure whether it should
> do anything anyway, but I am sure that it should not crash. Maybe thsi
> exposed some more significant problem?

-v works fine on the crosswire.org (no segfault), so I can't recreate 
this. FWIW, that was built on May 14th of this year.

Just looking at your patch in the other email, it looks correct, but I 
have a feeling that the primary reading is the default setting within 
the variants filter, so the patch should have no effect on the variants 
filter. It is possible, but unlikely, that it could interfere with the 
transliteration setting.

> 2) the -or option does zilch for me. Farsi text looks the same in either
> way.

Do you meat "-o r"? The string "-or" shouldn't mean anything to diatheke.

I don't know that I've ever tested Arabic shaping. The Sword filter 
basically takes text and runs it through an Arabic shaping function of 
ICU. So you need ICU for it to operate at all, and given your third 
point, my suspicion is that you don't have ICU working correctly.

Additionally, if you renderer does shaping automatically (which it 
really should), you shouldn't expect to see any difference between 
shaped and unshaped input to the renderer.

So there might be a problem, but I would like to see some more 
conclusive proof.

> 3) the -t script option does nothing for me

-t works fine. You need ICU, minimally. Additionally, many of the 
script-to-script pathways will only exist if you are using our version 
of ICU with the extra data.

It works fine on the server, though.

> 4) adding accidentally nonexisting options to -o does not cause any
> error message e.g. diatheke -b FarsiOPV -ot Latin -k Mt1

Invalid argument/value pairs are ignored. So once you have an invalid 
argument like "-ot", it and its value "Latin" are ignored.

If you would like to see more error reporting, please feel free to make 
changes to the SVN or submit a patch.


More information about the sword-devel mailing list