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

Kiva doesn't work on Ubuntu 12.10 #74

Open
Snegovikufa opened this issue Oct 19, 2012 · 12 comments
Open

Kiva doesn't work on Ubuntu 12.10 #74

Snegovikufa opened this issue Oct 19, 2012 · 12 comments

Comments

@Snegovikufa
Copy link
Contributor

Hello I've recently updated my ubuntu to 12.10 version. Applications that use Enable doesn't work.
Here is valgrind output of running some enable's example : http://pastebin.com/M3ZPeqpQ

@jwiggins
Copy link
Member

This looks like a fun one... ;)

Here's what I think might be happening. Emphasis on might.

Kiva's agg statically links to freetype2 (specifically, v 2.3.12). During initialization, it calls module_init on what it thinks is one of its own internal modules, but instead calls into the system libfreetype. At that point, any number of crazy things could happen depending on how out of sync the two versions of freetype are. In this case, you got a segfault.

Now, I'm not quite sure yet how to avoid calling into the system freetype. The freetype sources are a bit twisty. There are lots of symbols that get prefixed with extern. So that's nice. Perhaps the Kiva build needs to redefine the FT_EXPORT_DEF() macro so that it only calls into itself. I don't have time to try this right now...

Any takers?

@Snegovikufa
Copy link
Contributor Author

On weekdays I've tried to connect to my work machine via ssh -X from my home laptop with ubuntu 12.04 installed and run some enable applications. There were no errors.

@Snegovikufa
Copy link
Contributor Author

I have found solution, but don't know what exactly of this helps :

  1. Get old libfreetype6 packages from Ubuntu 12.04 and install them.
  2. Delete all build folders inside of each folder in ets repository, delete all ets files from dist-packages.
  3. Run python ets.py build and sudo python ets.py install (Earlier I wrote sudo python ets.py develop)

@jdmarch
Copy link

jdmarch commented Oct 22, 2012

It is true that at times, deleting enable's build folder is required before
rebuilding it.

On Mon, Oct 22, 2012 at 5:13 AM, Rustam Safin notifications@github.comwrote:

I have found solution, but don't know what exactly of this helps :

  1. Get old libfreetype6 packages from Ubuntu 12.04 and install them.
  2. Delete all build folders inside of each folder in ets repository,
    delete all ets files from dist-packages.
  3. Run python ets.py build and sudo python ets.py install (Earlier I
    wrote sudo python ets.py develop)


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-9658635.

@Snegovikufa
Copy link
Contributor Author

Today I've tried to upgrade my home laptop from 12.04 to 12.10. Kiva doesn't want to work with libfreetype6 v2.4.10

@burnpanck
Copy link
Contributor

Bump!
I use the current git HEAD on Ubuntu 12.10. While some of the tests work, the some tests end in some
*** glibc detected *** python: malloc(): memory corruption
and related backtraces. Among them are:

kiva/tests/dummy.py
enable/tests/test_component_editor.py
enable/tests/kiva_graphics_context_test_case.py

I have to admit, I did not investigate the relation to this bug further.

@jwiggins
Copy link
Member

@bunrpanck I think what you are seeing is related to #97

@burnpanck
Copy link
Contributor

@jwiggins Thanks for pointing out that other issue. My symptoms surely look related, though a quick try using Ubuntu 12.10's gcc 4.6 did not solve the issues. Particularly, when running kiva/tests/dummy.py, I still get the following glibc complaint:

*** glibc detected *** /usr/bin/python: free(): invalid next size (fast): 0x0000000001bccc60 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7ffff6f62b96]
/home/yves/pkg-src/ets/enable/kiva/agg/_agg.so(FT_Add_Module+0x1d7)[0x7fffd6326e77]
/home/yves/pkg-src/ets/enable/kiva/agg/_agg.so(FT_Add_Default_Modules+0x2c)[0x7fffd632879c]
/home/yves/pkg-src/ets/enable/kiva/agg/_agg.so(FT_Init_FreeType+0x3f)[0x7fffd63287ef]
/home/yves/pkg-src/ets/enable/kiva/agg/_agg.so(_ZN5agg2425font_engine_freetype_baseC1Ebj+0x8f8)[0x7fffd63192e8]
/home/yves/pkg-src/ets/enable/kiva/agg/_agg.so(+0x520f0)[0x7fffd62540f0]
/lib64/ld-linux-x86-64.so.2(+0xf316)[0x7ffff7de9316]
...

After this, python stops with SIGABRT, with the following backtrace:

 #0  0x00007ffff6f1a425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6f1db8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6f5839e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6f62b96 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007fffd6326e77 in FT_Add_Module (library=0x1ef1250, clazz=0x7fffef246540 <t42_driver_class>) at kiva/agg/freetype2/src/base/ftobjs.c:4036
#5  0x00007fffd632879c in FT_Add_Default_Modules (library=0x1ef1250) at kiva/agg/freetype2/src/base/ftinit.c:188
#6  0x00007fffd63287ef in FT_Init_FreeType (alibrary=0x7fffd65bdc60 <gFontEngine+64>) at kiva/agg/freetype2/src/base/ftinit.c:225
#7  0x00007fffd63192e8 in agg24::font_engine_freetype_base::font_engine_freetype_base (this=0x7fffd65bdc20 <gFontEngine>, flag32=<optimized out>, 
    max_faces=<optimized out>) at kiva/agg/agg-24/font_freetype/agg_font_freetype.cpp:555
#8  0x00007fffd62540f0 in font_engine_freetype_int32 (this=0x7fffd65bdc20 <gFontEngine>, max_faces=32) at kiva/agg/agg-24/font_freetype/agg_font_freetype.h:190
#9  __static_initialization_and_destruction_0 (__initialize_p=<optimized out>, __priority=<optimized out>) at kiva/agg/src/kiva_graphics_context_base.cpp:20
#10 _GLOBAL__sub_I_kiva_graphics_context_base.cpp(void) () at kiva/agg/src/kiva_graphics_context_base.cpp:743
#11 0x00007ffff7de9316 in ?? () from /lib64/ld-linux-x86-64.so.2
...

Any ideas?

@jwiggins
Copy link
Member

@burnpanck That's definitely the freetype problem.

@aaronayres35
Copy link
Contributor

@rahulporuri We good to close this issue? (I found this while looking for issues mentioning ubuntu while reviewing #889).

@jwiggins
Copy link
Member

jwiggins commented Nov 8, 2021

This is technically still unresolved, but #553 is a more specific description (AFAICT).

Although I'm pretty sure the interest in Ubuntu 12 is considerable less than when this issue was created.

@aaronayres35
Copy link
Contributor

This is technically still unresolved, but #553 is a more specific description (AFAICT).

Ah I see, that makes sense

Although I'm pretty sure the interest in Ubuntu 12 is considerable less than when this issue was created.

Yeah this is sort of what I had been thinking. Nonetheless, if it is unresolved keeping the issue open is reasonable

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