Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pango: segfault in libpangoft2-1.0-0.dll #1265

Closed
Shreeshrii opened this issue Mar 31, 2016 · 19 comments
Closed

pango: segfault in libpangoft2-1.0-0.dll #1265

Shreeshrii opened this issue Mar 31, 2016 · 19 comments

Comments

@Shreeshrii
Copy link
Contributor

Is a debug version of pango available? Tesseract training tools (text2image) segfault when used under MSYS2. They work fine under linux, the problem seems to be with libpangoft2-1.0-0.dll


(gdb) run --fonts_dir=C:/WINDOWS/fonts/ --text ../langdata/eng/eng.training_text --font Arial --outputbase eng.Arial.exp0
Starting program: C:\msys64\home\ra\text2tif\text2tif.exe --fonts_dir=C:/WINDOWS/fonts/ --text ../langdata/eng/eng.training_text --font Arial --outputbase eng.Arial.exp0
[New Thread 8608.0x1134]
[New Thread 8608.0x1ed0]
[New Thread 8608.0x1b18]
[New Thread 8608.0xfe8]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006d702227 in ?? () from C:\msys64\mingw64\bin\libpangoft2-1.0-0.dll
(gdb) backtrace
#0  0x000000006d702227 in ?? ()
   from C:\msys64\mingw64\bin\libpangoft2-1.0-0.dll
#1  0x0000000000407992 in tesseract::PangoFontInfo::CanRenderString (
    this=0x8ef780,
    utf8_word=0x9d4d70 "different New Articles page 23 a To Service ~~ a details DC that don't as 7 «« Date: #1 : AZ\n___ Music am search this Please time each How at Online (7) get quality Advanced can | may such\na August "...,
    len=9, graphemes=0x8ef0c0) at ./training/pango_font_info.cpp:442
#2  0x00000000004076f9 in tesseract::PangoFontInfo::CanRenderString (
    this=0x8ef780,
    utf8_word=0x9d4d70 "different New Articles page 23 a To Service ~~ a details DC that don't as 7 «« Date: #1 : AZ\n___ Music am search this Please time each How at Online (7) get quality Advanced can | may such\na August "...,
    len=9) at ./training/pango_font_info.cpp:384
#3  0x000000000040b901 in tesseract::StringRenderer::StripUnrenderableWords (
    this=0x8ef780, utf8_text=0x8ef1a0) at ./training/stringrenderer.cpp:621
#4  0x000000000040c1d0 in tesseract::StringRenderer::RenderToImage (
    this=0x8ef780,
    text=0x987c50 "different New Articles page 23 a To Service ~~ a details DC that don't as 7 «« Date: #1 : AZ\n___ Music am search this Please time each How at Online (7) get quality Advanced can | may such\na August "...,
    text_length=6801, pix=0x8ef6e0) at ./training/stringrenderer.cpp:763
#5  0x000000000040eece in main (argc=1, argv=0x9199a8)
    at ./training/text2image.cpp:591

@Shreeshrii
Copy link
Contributor Author

I tried to build it with enable-debug, but that process is getting errors too.

ra@Shree MINGW64 ~/MINGW-packages/mingw-w64-pango
$ makepkg-mingw -sLf
==> Making package: mingw-w64-pango 1.40.0-1 (Thu, Mar 31, 2016 12:58:38 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading pango-1.40.0.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   348    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 1033k  100 1033k    0     0   337k      0  0:00:03  0:00:03 --:--:--  990k
  -> Found 0001-no-unconditional-xft-please.all.patch
  -> Found 0002-msvc-is-impotent-but-not.mingw.patch
==> Validating source files with sha256sums...
    pango-1.40.0.tar.xz ... Passed
    0001-no-unconditional-xft-please.all.patch ... Passed
    0002-msvc-is-impotent-but-not.mingw.patch ... Passed
==> Extracting sources...
  -> Extracting pango-1.40.0.tar.xz with bsdtar
==> Starting prepare()...
patching file docs/pango.types.in
patching file configure.ac
Hunk #1 succeeded at 243 (offset -14 lines).
Hunk #2 succeeded at 253 with fuzz 1 (offset -14 lines).
Hunk #3 succeeded at 626 (offset -318 lines).
patching file pango/pangocairo.def
acinclude.m4:68: warning: the serial number must appear before any macro definition
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
acinclude.m4:68: warning: the serial number must appear before any macro definition
configure.ac:115: installing './compile'
configure.ac:52: installing './missing'
gtk-doc.make:7: error: GTK_DOC_USE_LIBTOOL does not appear in AM_CONDITIONAL
docs/Makefile.am:101:   'gtk-doc.make' included from here
gtk-doc.make:60: error: GTK_DOC_BUILD_HTML does not appear in AM_CONDITIONAL
docs/Makefile.am:101:   'gtk-doc.make' included from here
gtk-doc.make:65: error: GTK_DOC_BUILD_PDF does not appear in AM_CONDITIONAL
docs/Makefile.am:101:   'gtk-doc.make' included from here
gtk-doc.make:74: error: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:101:   'gtk-doc.make' included from here
gtk-doc.make:274: error: HAVE_GTK_DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:101:   'gtk-doc.make' included from here
docs/Makefile.am:142: error: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:54: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
examples/Makefile.am:6: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
examples/Makefile.am: installing './depcomp'
pango-view/Makefile.am:30: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
pango/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
pango/mini-fribidi/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
tools/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
autoreconf: automake failed with exit status: 1
==> ERROR: A failure occurred in prepare().
    Aborting...


@Alexpux
Copy link
Member

Alexpux commented Mar 31, 2016

Update packages with pacman -Syuu to get rebuilded GCC and downgraded BINUTILS and try again.

@Shreeshrii
Copy link
Contributor Author

Alex,
I am still getting the segfault after updating packages with pacman -Syuu


(gdb) run --fonts_dir= --text ../langdata/eng/eng.training_text --font "Arial" --outputbase eng.Arial.exp0 --tlog_level=2 2>&1 | grep run
Starting program: C:\msys64\home\shree\text2tif\text2tif.exe --fonts_dir= --text ../langdata/eng/eng.training_text --font "Arial" --outputbase eng.Arial.exp0 --tlog_level=2 2>&1 | grep run
[New Thread 5524.0x11e8]
[New Thread 5524.0x13b4]
[New Thread 5524.0x17b8]
[New Thread 5524.0x16b4]

Thread 1 hit Breakpoint 2, tesseract::PangoFontInfo::CanRenderString (
    this=0x8ef780,
    utf8_word=0x4404970 "different New Articles page 23 a To Service ~~ a details DC that don't as 7 «« Date: #1 : AZ\n___ Music am search this Please time each How at Online (7) get quality Advanced can | may such\na August "...,
    len=9, graphemes=0x8ef0c0) at ./training/pango_font_info.cpp:442
442            fc_font, kDottedCircleGlyph);
(gdb)
(gdb) continue
Continuing.

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006d702227 in ?? () from C:\msys64\mingw64\bin\libpangoft2-1.0-0.dll

@Shreeshrii
Copy link
Contributor Author

the program works fine under cygwin64 also.

@Alexpux
Copy link
Member

Alexpux commented Mar 31, 2016

Try rebuild pango

@Shreeshrii
Copy link
Contributor Author

​​
shree@lenovo MINGW64 ~/MINGW-packages/mingw-w64-pango
$ pacman -Syuu
:: Synchronizing package databases...
mingw32 is up to date
0.0 B 0.00B/s 00:00
[-----------------------------------------------------------------------]
0%
mingw64 is up to date
0.0 B 0.00B/s 00:00
[-----------------------------------------------------------------------]
0%
msys is up to date
0.0 B 0.00B/s 00:00
[-----------------------------------------------------------------------]
0%
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do

shree@lenovo MINGW64 ~/MINGW-packages/mingw-w64-pango
$ makepkg-mingw -sLf
==> Making package: mingw-w64-pango 1.40.0-1 (Thu, Mar 31, 2016 11:01:13 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found pango-1.40.0.tar.xz
-> Found 0001-no-unconditional-xft-please.all.patch
-> Found 0002-msvc-is-impotent-but-not.mingw.patch
==> Validating source files with sha256sums...
pango-1.40.0.tar.xz ... Passed
0001-no-unconditional-xft-please.all.patch ... Passed
0002-msvc-is-impotent-but-not.mingw.patch ... Passed
==> Extracting sources...
-> Extracting pango-1.40.0.tar.xz with bsdtar
==> Starting prepare()...
patching file docs/pango.types.in
patching file configure.ac
Hunk #1 succeeded at 243 (offset -14 lines).
Hunk #2 succeeded at 253 with fuzz 1 (offset -14 lines).
Hunk #3 succeeded at 626 (offset -318 lines).
patching file pango/pangocairo.def
acinclude.m4:68: warning: the serial number must appear before any macro
definition
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
acinclude.m4:68: warning: the serial number must appear before any macro
definition
configure.ac:115: installing './compile'
configure.ac:52: installing './missing'
gtk-doc.make:7: error: GTK_DOC_USE_LIBTOOL does not appear in AM_CONDITIONAL
docs/Makefile.am:101: 'gtk-doc.make' included from here
gtk-doc.make:60: error: GTK_DOC_BUILD_HTML does not appear in AM_CONDITIONAL
docs/Makefile.am:101: 'gtk-doc.make' included from here
gtk-doc.make:65: error: GTK_DOC_BUILD_PDF does not appear in AM_CONDITIONAL
docs/Makefile.am:101: 'gtk-doc.make' included from here
gtk-doc.make:74: error: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:101: 'gtk-doc.make' included from here
gtk-doc.make:274: error: HAVE_GTK_DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:101: 'gtk-doc.make' included from here
docs/Makefile.am:142: error: ENABLE_GTK_DOC does not appear in
AM_CONDITIONAL
docs/Makefile.am:54: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '__CPPFLAGS')
examples/Makefile.am:6: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '__CPPFLAGS')
examples/Makefile.am: installing './depcomp'
pango-view/Makefile.am:30: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '__CPPFLAGS')
pango/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '__CPPFLAGS')
pango/mini-fribidi/Makefile.am:3: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '__CPPFLAGS')
tools/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '__CPPFLAGS')
autoreconf: automake failed with exit status: 1
==> ERROR: A failure occurred in prepare().
Aborting...

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Thu, Mar 31, 2016 at 10:56 PM, Алексей [email protected] wrote:

Try rebuild pango


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Alexpux/MINGW-packages/issues/1265#issuecomment-204037408

@Alexpux
Copy link
Member

Alexpux commented Mar 31, 2016

Seems you have some missing packages for build. Install gtk-doc package

@Shreeshrii
Copy link
Contributor Author

Shreeshrii commented Mar 31, 2016 via email

@Alexpux
Copy link
Member

Alexpux commented Mar 31, 2016

try install gtk-doc as I told you.

@mati865
Copy link
Collaborator

mati865 commented Mar 31, 2016

After installing gtk-doc prepare() pass. I'll edit comment when build() finish to let you know if everything is fine.

EDIT: Builds fine.

@Shreeshrii
Copy link
Contributor Author

Shreeshrii commented Apr 1, 2016 via email

@Alexpux
Copy link
Member

Alexpux commented Apr 9, 2016

Is it solved?

@mati865
Copy link
Collaborator

mati865 commented Apr 9, 2016

Probably not related to msys2 amitdo/text2tif-2016#1

@Alexpux
Copy link
Member

Alexpux commented Apr 9, 2016

we not have text2tif executable in our packages.

@Shreeshrii
Copy link
Contributor Author

Thanks. Appreciate the help.

You can close this.

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sat, Apr 9, 2016 at 5:01 PM, Алексей [email protected] wrote:

we not have text2tif comment in our packages.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Alexpux/MINGW-packages/issues/1265#issuecomment-207773529

@Alexpux
Copy link
Member

Alexpux commented Apr 9, 2016

@Shreeshrii, you solve this?

@Shreeshrii
Copy link
Contributor Author

I think it was application problem. Debug version of pango helped find it.

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sat, Apr 9, 2016 at 5:07 PM, Алексей [email protected] wrote:

@Shreeshrii https://github.com/Shreeshrii, you solve this?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Alexpux/MINGW-packages/issues/1265#issuecomment-207776043

@Shreeshrii
Copy link
Contributor Author

the original code of text2image from tesseract-ocr also has the same
problem.

Please see
amitdo/text2tif-2016@b055d43

Amit @amitdo has just added a workaround to avoid the crash under
msys2/mingw64 -

It works under linux and cygwin, if you have any suggestions please let us
know.

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sat, Apr 9, 2016 at 7:12 PM, ShreeDevi Kumar [email protected]
wrote:

I think it was application problem. Debug version of pango helped find it.

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sat, Apr 9, 2016 at 5:07 PM, Алексей [email protected] wrote:

@Shreeshrii https://github.com/Shreeshrii, you solve this?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Alexpux/MINGW-packages/issues/1265#issuecomment-207776043

@amitdo
Copy link

amitdo commented Apr 9, 2016

I will pull request the changes done in text2tif to tesseract sometime this month.

@elieux elieux closed this as completed Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants