jwilk-archive / ocrodjvu

OCR for DjVu
GNU General Public License v2.0
45 stars 19 forks source link

ocrodjvu hangs with DjVuLibre 3.5.26 #16

Closed jwilk closed 9 years ago

jwilk commented 9 years ago

Issue reported by madalu at Bitbucket:

It seems that ocrodjvu no longer works with the most recent djvulibre release 3.5.26 (http://sourceforge.net/p/djvu/djvulibre-git/ci/release.3.5.26/tree/).

Steps to replicate (on arch linux):

ocrodjvu works fine with djvulibre 3.5.25.4

Update: A bit more research reveals that the problem lies with the interaction between python-djvulibre and the most recent djvulibre. I did a git bisect on the djvulibre git repository (git://git.code.sf.net/p/djvu/djvulibre-git) and discovered that the following commit there introduced the problem: https://github.com/barak/djvulibre/commit/2475fcef383bf8c7e4323af51f3f3dc35fccbd48

Of course, this may very well be a djvulibre bug. However, discerning exactly how recent changes in djvulibre broke calls from ocrodjvu and python-djvulibre is beyond my ability.

If I call ocrodjvu with python2 -v /usr/bin/ocrodjvu, the output hangs as follows:


[...]
# /usr/lib/python2.7/site-packages/ocrodjvu/text_zones.pyc matches /usr/lib/python2.7/site-packages/ocrodjvu/text_zones.py
import ocrodjvu.text_zones # precompiled from /usr/lib/python2.7/site-packages/ocrodjvu/text_zones.pyc
import djvu # directory /usr/lib/python2.7/site-packages/djvu
# /usr/lib/python2.7/site-packages/djvu/__init__.pyc matches /usr/lib/python2.7/site-packages/djvu/__init__.py
import djvu # precompiled from /usr/lib/python2.7/site-packages/djvu/__init__.pyc
# /usr/lib/python2.7/site-packages/djvu/dllpath.pyc matches /usr/lib/python2.7/site-packages/djvu/dllpath.py
import djvu.dllpath # precompiled from /usr/lib/python2.7/site-packages/djvu/dllpath.pyc
# /usr/lib/python2.7/site-packages/djvu/const.pyc matches /usr/lib/python2.7/site-packages/djvu/const.py
import djvu.const # precompiled from /usr/lib/python2.7/site-packages/djvu/const.pyc
dlopen("/usr/lib/python2.7/site-packages/djvu/sexpr.so", 2);
import djvu.sexpr # dynamically loaded from /usr/lib/python2.7/site-packages/djvu/sexpr.so
jwilk commented 9 years ago

I've filed a bug against python-djvulibre:

https://github.com/jwilk/python-djvulibre/issues/3

jwilk commented 9 years ago

This should be fixed in DjVuLibre 3.5.27.

Could you try it out?

jwilk commented 9 years ago

I believe this is fixed in DjVuLibre 3.5.27; and there's not much ocrodjvu could do to work around the bug in the broken version.

Let's close the bug.