Main index > Announcements > adesklets <= 0.6.1 segmentation fault on new FontConfig

By syfou (Core Developer & Desklet Author), on Fri Sep 29 18:37:01 2006: adesklets <= 0.6.1 segmentation fault on new FontConfig.

The sickness:

adeskletsae fontconfigum influenza (the great adesklets fontconfig flu), is a fatal, but easy-to-cure disease that causes all adesklets versions released to date (<= 0.6.1) to cough and die instantly when put in contact with FontConfig >= 2.4, as well as other late 2.3.x releases and development versions.

The symptoms:

Is this happening to you? Assessing the diagnostic:

To make sure this applies to you, try to start an interactive session by invoking "adesklets :" from a shell. If and only if you get a segmentation fault similar to this:

Code:


sh$ adesklets :
adesklets 0.6.1 (Fri Sep 22 14:25:01 EDT 2006), on Linux 2.6.18
[i686-pc-linux-gnu-gcc 686-pc-linux-gnu-gcc (GCC) 4.1.0 (Gentoo 4.1.0)]
Press TAB for hints.
Segmentation fault


instead of the expected ">>>" prompt, there is a fair chance this applies. What is important to notice is if the system send some SEGV (segmentation fault) signal, causing the adesklets interpreter to be dumped -- it is possible, depending on your system, that you will get some more verbose output (for instance from your libc), complaining about memory corruption: that would be a similar message -- the finer details do not matter much.

The diagnostic:

What happens is that what is the code for releasing FontConfig objects in all adesklets releases since version 0.0.1 is no longer correct on the new cache-enabled Fontconfig releases, where those objects are no longer allocated on the process heap, but are shared by all processes using the library, causing a segmentation fault (memory allocation error) when they are tentatively freed.

The cure:

There is a patch in the code repository that fixes this (direct link to the diff file). For now, the right way to cure this is to: If you are not familiar with patch, a more detailed explanation can be found here. If for any reason you are not willing to do this, there are still two possible workarounds: The first workaround has the advantage that it works even for people using pre-compiled, system-specific versions: the problem is that if FontConfig got upgraded, there is probably another package somewhere that depends on the new library. The second workaround relieve the user from having to manually patch his code, but means that the ability to auto-detect the system fonts will be hampered: see the last entry of the FAQ for tips on how to work with FontConfig-disabled builts.

The future:

adesklets 0.6.2 will provide a definitive fix to this problem -- that the patch above will likely prove sufficient, but further regression tests on the various supported platforms are needed to assert that; it has been reported to work already by the initial reporters.

See also:
[Update]
[Update, again]


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.