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?
- all
your desklets stopped working recently for no obvious
reason (most likely, soon after a non-related package
installation or system update)
- or you just successfully
installed adesklets <= 0.6.1, but you got a strange
"process exited" error
when testing any python desklet
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:
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:
- Download the diff
file.
- Apply it to the adesklets
0.6.1 tree with patch.
- Invoke autoreconf (you need a complete
autotools suite installed).
- Configure, compile and install
from source using the patched adesklets tree.
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:
- Downgrade FontConfig to a
version that works with adesklets; everything in the 2.2
serie will do.
- Compile adesklets without
FontConfig support (invoking the --without-fontconfig switch during
configuration)
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]